diff --git a/.eslintrc.json b/.eslintrc.json index 4bf21d6219..134c010ee3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -84,6 +84,7 @@ "local-rules/no-logical-bigint": "off", "es-x/no-bigint": "off", + "es-x/no-optional-catch-binding": "off", "es-x/no-optional-chaining": "off", "es-x/no-import-meta": "off", "es-x/no-dynamic-import": "off", diff --git a/.gitignore b/.gitignore index 266711b333..8fa8313fbd 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,6 @@ .pnp.js .vscode -# typechain-types -/src/typechain-types # lingui /src/locales/**/*.js diff --git a/sdk/.gitignore b/sdk/.gitignore index d62c46b176..0d035f1510 100644 --- a/sdk/.gitignore +++ b/sdk/.gitignore @@ -34,8 +34,6 @@ yarn-error.log* # For publish .npmrc -typechain-types - package-lock.json .yarn/* diff --git a/sdk/src/types/tradeHistory.ts b/sdk/src/types/tradeHistory.ts index 3c7c4b4bd9..adfc1768a6 100644 --- a/sdk/src/types/tradeHistory.ts +++ b/sdk/src/types/tradeHistory.ts @@ -45,7 +45,7 @@ export type PositionTradeAction = { orderKey: string; isLong: boolean; reason?: string; - reasonBytes?: string | Uint8Array; + reasonBytes?: string; shouldUnwrapNativeToken: boolean; totalImpactUsd?: bigint; liquidationFeeAmount?: bigint; @@ -78,7 +78,7 @@ export type SwapTradeAction = { orderType: OrderType; orderKey: string; reason?: string; - reasonBytes?: string | Uint8Array; + reasonBytes?: string; twapParams: | { twapGroupId: string; diff --git a/sdk/src/utils/__tests__/parseError.spec.ts b/sdk/src/utils/__tests__/parseError.spec.ts index d1aef4cce7..5e7baee229 100644 --- a/sdk/src/utils/__tests__/parseError.spec.ts +++ b/sdk/src/utils/__tests__/parseError.spec.ts @@ -1,6 +1,14 @@ +import { + CallExecutionError, + ContractFunctionExecutionError, + ContractFunctionRevertedError, + InvalidInputRpcError, + RpcRequestError, + InsufficientFundsError, +} from "viem"; import { describe, expect, it } from "vitest"; -import { parseError, ErrorLike } from "utils/errors"; +import { ErrorLike, parseError } from "utils/errors"; import { TxErrorType } from "utils/errors/transactionsErrors"; describe("parseError", () => { @@ -337,4 +345,67 @@ describe("parseError", () => { ); }); }); + + describe("viem errors", () => { + it("should handle viem ContractFunctionExecutionError", () => { + const error = new ContractFunctionExecutionError( + new ContractFunctionRevertedError({ + abi: [], + functionName: "test_function", + data: "0x4e48dcda", + message: "test message", + }), + { + abi: [], + functionName: "test_function", + } + ); + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + contractError: "EndOfOracleSimulation", + }) + ); + }); + + it("should handle viem InsufficientFundsError", () => { + const error = new ContractFunctionExecutionError( + new CallExecutionError( + new InsufficientFundsError({ + cause: new InvalidInputRpcError( + new InvalidInputRpcError( + new RpcRequestError({ + error: { + message: + "err: insufficient funds for gas * price + value: address 0x6f9f3106F0209dc560A53C6808f8BF32E38468C3 have 4174472651641805 want 10000000000000000000 (supplied gas 1100000000)", + code: -32000, + }, + body: {}, + url: "https://example.com", + }) + ) + ), + }), + {} + ), + { + abi: [], + functionName: "test_function", + } + ); + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + txErrorType: TxErrorType.NotEnoughFunds, + isUserError: true, + isUserRejectedError: false, + errorGroup: "Txn Error: NOT_ENOUGH_FUNDS", + }) + ); + }); + }); }); diff --git a/sdk/src/utils/errors/parseError.ts b/sdk/src/utils/errors/parseError.ts index 84f4a5b28d..8dc2e76f72 100644 --- a/sdk/src/utils/errors/parseError.ts +++ b/sdk/src/utils/errors/parseError.ts @@ -1,5 +1,12 @@ import cryptoJs from "crypto-js"; -import { Abi, decodeErrorResult } from "viem"; +import { + Abi, + AbiParameterToPrimitiveType, + ContractErrorName, + decodeErrorResult, + ExtractAbiItem, + BaseError as ViemBaseError, +} from "viem"; import { abis } from "abis"; @@ -12,6 +19,31 @@ import { getIsUserRejectedError, } from "./transactionsErrors"; +export function extractErrorDataFromViemError(error: any): string | undefined { + if (!("walk" in error && typeof error.walk === "function")) { + return undefined; + } + + let data: string | undefined; + (error as ViemBaseError).walk((e: any) => { + if (typeof e?.data === "string") { + data = e.data; + return true; + } + if (typeof e?.data?.data === "string") { + data = e.data.data; + return true; + } + if (typeof e?.raw === "string") { + data = e.raw; + return true; + } + return false; + }); + + return data; +} + export type OrderErrorContext = | "simulation" | "gasLimit" @@ -150,17 +182,25 @@ export function parseError(error: ErrorLike | string | undefined, errorDepth = 0 // } - if (errorMessage) { - const errorData = extractDataFromError(errorMessage) ?? extractDataFromError((error as any)?.message); + if (!contractError) { + const errorData = + (error && typeof error === "object" ? extractErrorDataFromViemError(error) : undefined) ?? + extractDataFromError(errorMessage) ?? + extractDataFromError((error as any)?.message); + if (errorData) { - const parsedError = decodeErrorResult({ - abi: abis.CustomErrors as Abi, - data: errorData, - }); - - if (parsedError) { - contractError = parsedError.errorName; - contractErrorArgs = parsedError.args; + try { + const parsedError = decodeErrorResult({ + abi: abis.CustomErrors as Abi, + data: errorData, + }); + + if (parsedError) { + contractError = parsedError.errorName; + contractErrorArgs = parsedError.args; + } + } catch { + // } } } @@ -244,28 +284,56 @@ export function isCustomError(error: Error | undefined): error is CustomError { return (error as CustomError)?.isGmxCustomError === true; } -export function getCustomError(error: Error): CustomError | Error { - const data = (error as any)?.info?.error?.data ?? (error as any)?.data; - - let prettyErrorName = error.name; - let prettyErrorMessage = error.message; - let prettyErrorArgs: any = undefined; +export type ParsedCustomError = { + name: string; + args?: { + [key in ExtractAbiItem< + typeof abis.CustomErrors, + ContractErrorName + >["inputs"][number]["name"]]: AbiParameterToPrimitiveType< + Extract< + ExtractAbiItem>["inputs"][number], + { + name: key; + } + >, + "inputs" + >; + }; +}; +export function tryDecodeCustomError(reasonBytes: string): ParsedCustomError | undefined { try { - const parsedError = decodeErrorResult({ + const decoded = decodeErrorResult({ abi: abis.CustomErrors, - data: data, + data: reasonBytes, }); - prettyErrorArgs = parsedError.args; + // Convert args array to key-value dictionary for backward compatibility + if ( + decoded.args && + Array.isArray(decoded.args) && + decoded.abiItem && + "inputs" in decoded.abiItem && + decoded.abiItem.inputs + ) { + const argsDict: Record = {}; + for (const [index, input] of decoded.abiItem.inputs.entries()) { + argsDict[input.name] = decoded.args[index]; + } + return { name: decoded.errorName, args: argsDict as any }; + } - prettyErrorName = parsedError.errorName; - prettyErrorMessage = JSON.stringify(parsedError, null, 2); - } catch (decodeError) { - return error; + return { name: decoded.errorName, args: undefined }; + } catch { + return undefined; } +} - const prettyError = new CustomError({ name: prettyErrorName, message: prettyErrorMessage, args: prettyErrorArgs }); - - return prettyError; +export function decodeErrorFromViemError(error: any): ParsedCustomError | undefined { + const data = extractErrorDataFromViemError(error); + if (!data) { + return undefined; + } + return tryDecodeCustomError(data); } diff --git a/src/App/App.tsx b/src/App/App.tsx index fb9fc62095..96667b625d 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -28,7 +28,6 @@ import { ThemeProvider } from "context/ThemeContext/ThemeContext"; import { TokenPermitsContextProvider } from "context/TokenPermitsContext/TokenPermitsContextProvider"; import { TokensBalancesContextProvider } from "context/TokensBalancesContext/TokensBalancesContextProvider"; import { TokensFavoritesContextProvider } from "context/TokensFavoritesContext/TokensFavoritesContextProvider"; -import { WebsocketContextProvider } from "context/WebsocketContext/WebsocketContextProvider"; import { useChainId } from "lib/chains"; import { defaultLocale, dynamicActivate } from "lib/i18n"; import { RainbowKitProviderWrapper } from "lib/wallets/WalletProvider"; @@ -72,7 +71,6 @@ function App() { app = {app}; app = {app}; app = {app}; - app = {app}; app = {app}; app = {app}; app = {app}; diff --git a/src/App/AppRoutes.tsx b/src/App/AppRoutes.tsx index 37d47bb718..ee449c4dc7 100644 --- a/src/App/AppRoutes.tsx +++ b/src/App/AppRoutes.tsx @@ -1,8 +1,7 @@ -import { ethers } from "ethers"; import { useCallback, useEffect, useState } from "react"; import { useHistory, useLocation } from "react-router-dom"; import { cssTransition, ToastContainer } from "react-toastify"; -import { Hash } from "viem"; +import { Hash, zeroHash } from "viem"; import { CONTRACTS_CHAIN_IDS, ContractsChainId } from "config/chains"; import { REFERRAL_CODE_KEY } from "config/localStorage"; @@ -71,7 +70,7 @@ export function AppRoutes() { if (referralCode && referralCode.length <= 20) { const encodedReferralCode = encodeReferralCode(referralCode); - if (encodedReferralCode !== ethers.ZeroHash) { + if (encodedReferralCode !== zeroHash) { localStorage.setItem(REFERRAL_CODE_KEY, encodedReferralCode); const queryParams = new URLSearchParams(location.search); if (queryParams.has(REFERRAL_CODE_QUERY_PARAM)) { @@ -96,7 +95,7 @@ export function AppRoutes() { const localStorageCode = window.localStorage.getItem(REFERRAL_CODE_KEY); const baseUrl = getAppBaseUrl(); let appRedirectUrl = baseUrl; - if (localStorageCode && localStorageCode.length > 0 && localStorageCode !== ethers.ZeroHash) { + if (localStorageCode && localStorageCode.length > 0 && localStorageCode !== zeroHash) { const decodedRefCode = decodeReferralCode(localStorageCode as Hash); if (decodedRefCode) { appRedirectUrl = `${appRedirectUrl}?ref=${decodedRefCode}`; diff --git a/src/components/Earn/Portfolio/AssetsList/GmxAssetCard/StakeModal.tsx b/src/components/Earn/Portfolio/AssetsList/GmxAssetCard/StakeModal.tsx index 6d17a1f449..79747378b3 100644 --- a/src/components/Earn/Portfolio/AssetsList/GmxAssetCard/StakeModal.tsx +++ b/src/components/Earn/Portfolio/AssetsList/GmxAssetCard/StakeModal.tsx @@ -1,7 +1,8 @@ import { Trans, t } from "@lingui/macro"; import cx from "classnames"; -import { ZeroAddress, ethers } from "ethers"; +import { ethers } from "ethers"; import { useCallback, useEffect, useMemo, useState } from "react"; +import { zeroAddress } from "viem"; import { ARBITRUM, ContractsChainId } from "config/chains"; import { BASIS_POINTS_DIVISOR_BIGINT } from "config/factors"; @@ -121,7 +122,7 @@ export function StakeModal(props: { }, [isVisible, setStakeValue, setUnstakeValue]); const needApproval = - stakeFarmAddress !== ZeroAddress && + stakeFarmAddress !== zeroAddress && tokenAllowance !== undefined && stakeAmount !== undefined && stakeAmount > tokenAllowance; diff --git a/src/components/GmxAccountModal/DepositView.tsx b/src/components/GmxAccountModal/DepositView.tsx index 386edf77f1..c895a14403 100644 --- a/src/components/GmxAccountModal/DepositView.tsx +++ b/src/components/GmxAccountModal/DepositView.tsx @@ -8,8 +8,8 @@ import { Hex, decodeErrorResult, zeroAddress } from "viem"; import { useAccount, useChains } from "wagmi"; import { - AnyChainId, AVALANCHE, + AnyChainId, SettlementChainId, SourceChainId, getChainName, @@ -31,8 +31,8 @@ import { useGmxAccountDepositViewTokenAddress, useGmxAccountDepositViewTokenInputValue, useGmxAccountModalOpen, - useGmxAccountSelector, useGmxAccountSelectedTransferGuid, + useGmxAccountSelector, useGmxAccountSettlementChainId, } from "context/GmxAccountContext/hooks"; import { selectGmxAccountDepositViewTokenInputAmount } from "context/GmxAccountContext/selectors"; @@ -66,7 +66,6 @@ import { } from "lib/metrics"; import { USD_DECIMALS, adjustForDecimals, formatAmountFree, formatUsd } from "lib/numbers"; import { EMPTY_ARRAY, EMPTY_OBJECT, getByKey } from "lib/objects"; -import { useJsonRpcProvider } from "lib/rpc"; import { TxnCallback, TxnEventName, WalletTxnCtx } from "lib/transactions"; import { useHasOutdatedUi } from "lib/useHasOutdatedUi"; import { useIsNonEoaAccountOnAnyChain } from "lib/wallets/useAccountType"; @@ -124,7 +123,6 @@ export const DepositView = () => { const [, setSettlementChainId] = useGmxAccountSettlementChainId(); const [depositViewChain, setDepositViewChain] = useGmxAccountDepositViewChain(); const walletSigner = useEthersSigner({ chainId: srcChainId }); - const { provider: sourceChainProvider } = useJsonRpcProvider(depositViewChain); const [isVisibleOrView, setIsVisibleOrView] = useGmxAccountModalOpen(); const [, setSelectedTransferGuid] = useGmxAccountSelectedTransferGuid(); @@ -349,7 +347,6 @@ export const DepositView = () => { const quoteOft = useQuoteOft({ sendParams: sendParamsWithoutSlippage, fromStargateAddress: selectedTokenSourceChainTokenId?.stargate, - fromChainProvider: sourceChainProvider, fromChainId: depositViewChain, toChainId: settlementChainId, }); diff --git a/src/components/GmxAccountModal/WithdrawalView.tsx b/src/components/GmxAccountModal/WithdrawalView.tsx index b1f7ea0426..fa9a4f8211 100644 --- a/src/components/GmxAccountModal/WithdrawalView.tsx +++ b/src/components/GmxAccountModal/WithdrawalView.tsx @@ -264,7 +264,6 @@ export const WithdrawalView = () => { const quoteOft = useQuoteOft({ sendParams: sendParamsWithoutSlippage, fromStargateAddress: selectedTokenSettlementChainTokenId?.stargate, - fromChainProvider: provider, fromChainId: chainId, toChainId: withdrawalViewChain, }); diff --git a/src/components/Referrals/JoinReferralCode.tsx b/src/components/Referrals/JoinReferralCode.tsx index d043bbc07a..7e8052800c 100644 --- a/src/components/Referrals/JoinReferralCode.tsx +++ b/src/components/Referrals/JoinReferralCode.tsx @@ -1,8 +1,7 @@ import { t, Trans } from "@lingui/macro"; import { useConnectModal } from "@rainbow-me/rainbowkit"; -import { Contract } from "ethers"; import { useEffect, useMemo, useRef, useState } from "react"; -import { encodeFunctionData, zeroAddress } from "viem"; +import { createWalletClient, encodeFunctionData, publicActions, zeroAddress } from "viem"; import { usePublicClient } from "wagmi"; import { @@ -10,8 +9,7 @@ import { FAKE_INPUT_AMOUNT_MAP, getMappedTokenId, isSettlementChain, - IStargateAbi, - RANDOM_WALLET, + RANDOM_ACCOUNT, } from "config/multichain"; import { usePendingTxns } from "context/PendingTxnsContext/PendingTxnsContext"; import { selectExpressGlobalParams } from "context/SyntheticsStateContext/selectors/expressSelectors"; @@ -32,14 +30,17 @@ import { helperToast } from "lib/helperToast"; import { formatUsd, numberToBigint } from "lib/numbers"; import { useJsonRpcProvider } from "lib/rpc"; import { sendWalletTransaction } from "lib/transactions"; +import { ISigner } from "lib/transactions/iSigner"; import { useHasOutdatedUi } from "lib/useHasOutdatedUi"; import { useThrottledAsync } from "lib/useThrottledAsync"; +import { getPublicClientWithRpc, getRpcTransport } from "lib/wallets/rainbowKitConfig"; import useWallet from "lib/wallets/useWallet"; +import { abis } from "sdk/abis"; +import { getViemChain } from "sdk/configs/chains"; import { DEFAULT_EXPRESS_ORDER_DEADLINE_DURATION } from "sdk/configs/express"; import { getEmptyExternalCallsPayload } from "sdk/utils/orderTransactions"; import { encodeReferralCode } from "sdk/utils/referrals"; import { nowInSeconds } from "sdk/utils/time"; -import type { IStargate } from "typechain-types-stargate"; import Button from "components/Button/Button"; import { useMultichainTradeTokensRequest } from "components/GmxAccountModal/hooks"; @@ -253,12 +254,18 @@ function ReferralCodeFormMultichain({ const hasOutdatedUi = useHasOutdatedUi(); const simulationSigner = useMemo(() => { - if (!signer?.provider) { + if (srcChainId === undefined) { return; } - return RANDOM_WALLET.connect(signer?.provider); - }, [signer?.provider]); + return ISigner.fromViemSigner( + createWalletClient({ + chain: getViemChain(srcChainId), + account: RANDOM_ACCOUNT, + transport: getRpcTransport(srcChainId, "default"), + }).extend(publicActions) + ); + }, [srcChainId]); const globalExpressParams = useSelector(selectExpressGlobalParams); @@ -344,8 +351,6 @@ function ReferralCodeFormMultichain({ const sourceChainStargateAddress = p.sourceChainTokenId.stargate; - const iStargateInstance = new Contract(sourceChainStargateAddress, IStargateAbi, signer) as unknown as IStargate; - const tokenAmount = FAKE_INPUT_AMOUNT_MAP[p.sourceChainTokenId.symbol] ?? numberToBigint(0.02, p.sourceChainTokenId.decimals); @@ -360,7 +365,14 @@ function ReferralCodeFormMultichain({ action, }); - const [limit, oftFeeDetails] = await iStargateInstance.quoteOFT(sendParamsWithRoughAmount); + const sourceChainPublicClient = getPublicClientWithRpc(p.srcChainId); + + const [limit, oftFeeDetails] = await sourceChainPublicClient.readContract({ + address: sourceChainStargateAddress, + abi: abis.IStargate, + functionName: "quoteOFT", + args: [sendParamsWithRoughAmount], + }); let negativeFee = 0n; for (const oftFeeDetail of oftFeeDetails) { @@ -379,7 +391,12 @@ function ReferralCodeFormMultichain({ minAmountLD: 0n, }; - const quoteSend = await iStargateInstance.quoteSend(sendParamsWithMinimumAmount, false); + const quoteSend = await sourceChainPublicClient.readContract({ + address: sourceChainStargateAddress, + abi: abis.IStargate, + functionName: "quoteSend", + args: [sendParamsWithMinimumAmount, false], + }); return { nativeFee: quoteSend.nativeFee, @@ -498,7 +515,7 @@ function ReferralCodeFormMultichain({ to: sourceChainStargateAddress, signer: signer, callData: encodeFunctionData({ - abi: IStargateAbi, + abi: abis.IStargate, functionName: "sendToken", args: [sendParams, { nativeFee: result.data.nativeFee, lzTokenFee: 0n }, account], }), diff --git a/src/components/TradeHistory/TradeHistoryRow/utils/position.ts b/src/components/TradeHistory/TradeHistoryRow/utils/position.ts index f429dc2453..6fc6758a73 100644 --- a/src/components/TradeHistory/TradeHistoryRow/utils/position.ts +++ b/src/components/TradeHistory/TradeHistoryRow/utils/position.ts @@ -6,6 +6,7 @@ import { getMarketFullName, getMarketIndexName, getMarketPoolName } from "domain import { OrderType, isDecreaseOrderType, isIncreaseOrderType, isLiquidationOrderType } from "domain/synthetics/orders"; import { convertToUsd, parseContractPrice } from "domain/synthetics/tokens/utils"; import { getShouldUseMaxPrice } from "domain/synthetics/trade"; +import { tryDecodeCustomError } from "lib/errors"; import { BN_NEGATIVE_ONE, BN_ONE, @@ -32,7 +33,6 @@ import { infoRow, lines, numberToState, - tryGetError, } from "./shared"; import { actionTextMap, getActionTitle } from "../../keys"; @@ -212,18 +212,20 @@ export const formatPositionMessage = ( const customAction = sizeDeltaUsd > 0 ? action : i18n._(actionTextMap["Deposit-OrderCancelled"]!); const customSize = sizeDeltaUsd > 0 ? sizeDeltaText : formattedCollateralDelta; const customPrice = acceptablePriceInequality + formattedAcceptablePrice; - const error = tradeAction.reasonBytes ? tryGetError(tradeAction.reasonBytes) ?? undefined : undefined; + const error = tradeAction.reasonBytes ? tryDecodeCustomError(tradeAction.reasonBytes) ?? undefined : undefined; + const priceComment = lines( t`Acceptable price for the order.`, - error?.args?.price && "", - error?.args?.price && - infoRow( - t`Order Execution Price`, - formatUsd(parseContractPrice(error.args.price, tradeAction.indexToken.decimals), { - displayDecimals: marketPriceDecimals, - visualMultiplier: tradeAction.indexToken.visualMultiplier, - }) - ) + error?.args?.price !== undefined ? "" : undefined, + error?.args?.price !== undefined + ? infoRow( + t`Order Execution Price`, + formatUsd(parseContractPrice(error.args.price, tradeAction.indexToken.decimals), { + displayDecimals: marketPriceDecimals, + visualMultiplier: tradeAction.indexToken.visualMultiplier, + }) + ) + : undefined ); result = { @@ -258,7 +260,7 @@ export const formatPositionMessage = ( pnlState: numberToState(tradeAction.pnlUsd), }; } else { - const error = tradeAction.reasonBytes ? tryGetError(tradeAction.reasonBytes) ?? undefined : undefined; + const error = tradeAction.reasonBytes ? tryDecodeCustomError(tradeAction.reasonBytes) ?? undefined : undefined; const errorComment = error ? lines({ text: getErrorTooltipTitle(error.name, false), @@ -316,7 +318,7 @@ export const formatPositionMessage = ( (ot === OrderType.LimitIncrease && ev === TradeActionType.OrderFrozen) || (ot === OrderType.StopIncrease && ev === TradeActionType.OrderFrozen) ) { - let error = tradeAction.reasonBytes ? tryGetError(tradeAction.reasonBytes) ?? undefined : undefined; + let error = tradeAction.reasonBytes ? tryDecodeCustomError(tradeAction.reasonBytes) ?? undefined : undefined; const isAcceptablePriceUseful = !isBoundaryAcceptablePrice(tradeAction.acceptablePrice); result = { @@ -333,14 +335,15 @@ export const formatPositionMessage = ( isAcceptablePriceUseful ? infoRow(t`Order Acceptable Price`, acceptablePriceInequality + formattedAcceptablePrice) : undefined, - error?.args?.price && - infoRow( - t`Order Execution Price`, - formatUsd(parseContractPrice(error.args.price, tradeAction.indexToken.decimals), { - displayDecimals: marketPriceDecimals, - visualMultiplier: tradeAction.indexToken.visualMultiplier, - }) - ) + error?.args?.price !== undefined + ? infoRow( + t`Order Execution Price`, + formatUsd(parseContractPrice(error.args.price, tradeAction.indexToken.decimals), { + displayDecimals: marketPriceDecimals, + visualMultiplier: tradeAction.indexToken.visualMultiplier, + }) + ) + : undefined ), acceptablePrice: isAcceptablePriceUseful ? acceptablePriceInequality + formattedAcceptablePrice : undefined, isActionError: true, @@ -364,18 +367,19 @@ export const formatPositionMessage = ( const customAction = sizeDeltaUsd > 0 ? action : i18n._(actionTextMap["Withdraw-OrderCreated"]!); const customSize = sizeDeltaUsd > 0 ? sizeDeltaText : formattedCollateralDelta; const customPrice = acceptablePriceInequality + formattedAcceptablePrice; - const error = tradeAction.reasonBytes ? tryGetError(tradeAction.reasonBytes) ?? undefined : undefined; + const error = tradeAction.reasonBytes ? tryDecodeCustomError(tradeAction.reasonBytes) ?? undefined : undefined; const priceComment = lines( t`Acceptable price for the order.`, - error?.args?.price && "", - error?.args?.price && - infoRow( - t`Order Execution Price`, - formatUsd(parseContractPrice(error.args.price, tradeAction.indexToken.decimals), { - displayDecimals: marketPriceDecimals, - visualMultiplier: tradeAction.indexToken.visualMultiplier, - }) - ) + error?.args?.price !== undefined ? "" : undefined, + error?.args?.price !== undefined + ? infoRow( + t`Order Execution Price`, + formatUsd(parseContractPrice(error.args.price, tradeAction.indexToken.decimals), { + displayDecimals: marketPriceDecimals, + visualMultiplier: tradeAction.indexToken.visualMultiplier, + }) + ) + : undefined ); result = { @@ -444,7 +448,7 @@ export const formatPositionMessage = ( pnlState: numberToState(tradeAction.pnlUsd), }; } else if (ot === OrderType.LimitDecrease && ev === TradeActionType.OrderFrozen) { - let error = tradeAction.reasonBytes ? tryGetError(tradeAction.reasonBytes) ?? undefined : undefined; + let error = tradeAction.reasonBytes ? tryDecodeCustomError(tradeAction.reasonBytes) ?? undefined : undefined; result = { actionComment: @@ -458,14 +462,15 @@ export const formatPositionMessage = ( "", infoRow(t`Order Trigger Price`, triggerPriceInequality + formattedTriggerPrice), infoRow(t`Order Acceptable Price`, acceptablePriceInequality + formattedAcceptablePrice), - error?.args?.price && - infoRow( - t`Order Execution Price`, - formatUsd(parseContractPrice(error.args.price, tradeAction.indexToken.decimals), { - displayDecimals: marketPriceDecimals, - visualMultiplier: tradeAction.indexToken.visualMultiplier, - }) - ) + error?.args?.price !== undefined + ? infoRow( + t`Order Execution Price`, + formatUsd(parseContractPrice(error.args.price, tradeAction.indexToken.decimals), { + displayDecimals: marketPriceDecimals, + visualMultiplier: tradeAction.indexToken.visualMultiplier, + }) + ) + : undefined ), acceptablePrice: acceptablePriceInequality + formattedAcceptablePrice, isActionError: true, @@ -503,7 +508,7 @@ export const formatPositionMessage = ( pnlState: numberToState(tradeAction.pnlUsd), }; } else if (ot === OrderType.StopLossDecrease && ev === TradeActionType.OrderFrozen) { - let error = tradeAction.reasonBytes ? tryGetError(tradeAction.reasonBytes) ?? undefined : undefined; + let error = tradeAction.reasonBytes ? tryDecodeCustomError(tradeAction.reasonBytes) ?? undefined : undefined; const isAcceptablePriceUseful = !isBoundaryAcceptablePrice(tradeAction.acceptablePrice); result = { @@ -520,14 +525,15 @@ export const formatPositionMessage = ( isAcceptablePriceUseful ? infoRow(t`Order Acceptable Price`, acceptablePriceInequality + formattedAcceptablePrice) : undefined, - error?.args?.price && - infoRow( - t`Order Execution Price`, - formatUsd(parseContractPrice(error.args.price, tradeAction.indexToken.decimals), { - displayDecimals: marketPriceDecimals, - visualMultiplier: tradeAction.indexToken.visualMultiplier, - }) - ) + error?.args?.price !== undefined + ? infoRow( + t`Order Execution Price`, + formatUsd(parseContractPrice(error.args.price, tradeAction.indexToken.decimals), { + displayDecimals: marketPriceDecimals, + visualMultiplier: tradeAction.indexToken.visualMultiplier, + }) + ) + : undefined ), isActionError: true, }; diff --git a/src/components/TradeHistory/TradeHistoryRow/utils/shared.ts b/src/components/TradeHistory/TradeHistoryRow/utils/shared.ts index 21b3b0ef44..bcce3bda35 100644 --- a/src/components/TradeHistory/TradeHistoryRow/utils/shared.ts +++ b/src/components/TradeHistory/TradeHistoryRow/utils/shared.ts @@ -5,10 +5,8 @@ import type { Locale as DateLocale } from "date-fns"; import { format } from "date-fns/format"; import { formatRelative } from "date-fns/formatRelative"; import { enUS as dateEn } from "date-fns/locale/en-US"; -import { BytesLike, ethers } from "ethers"; import words from "lodash/words"; -import { abis } from "sdk/abis"; import { TradeActionType } from "sdk/types/tradeHistory"; import { LOCALE_DATE_LOCALE_MAP } from "components/DateRangeSelect/DateRangeSelect"; @@ -168,20 +166,6 @@ export function formatTradeActionTimestampUTC(timestamp: number) { export type MakeOptional = Omit & Partial>; -const customErrors = new ethers.Contract(ethers.ZeroAddress, abis.CustomErrors); - -export function tryGetError(reasonBytes: BytesLike): ReturnType | undefined { - let error: ReturnType | undefined; - - try { - error = customErrors.interface.parseError(reasonBytes); - } catch (error) { - return undefined; - } - - return error; -} - export function getErrorTooltipTitle(errorName: string, isMarketOrder: boolean) { if (errorName === CustomErrorName.OrderNotFulfillableAtAcceptablePrice && !isMarketOrder) { return t`The execution price didn't meet acceptable price. The order will fill when the condition is met.`; diff --git a/src/components/TradeHistory/TradeHistoryRow/utils/swap.ts b/src/components/TradeHistory/TradeHistoryRow/utils/swap.ts index 91a7420481..042d5f882b 100644 --- a/src/components/TradeHistory/TradeHistoryRow/utils/swap.ts +++ b/src/components/TradeHistory/TradeHistoryRow/utils/swap.ts @@ -5,6 +5,7 @@ import { getMarketIndexName, getMarketPoolName } from "domain/synthetics/markets import { OrderType } from "domain/synthetics/orders"; import type { TokenData } from "domain/synthetics/tokens"; import { adaptToV1TokenInfo, getTokensRatioByAmounts } from "domain/synthetics/tokens/utils"; +import { tryDecodeCustomError } from "lib/errors"; import { getExchangeRateDisplay } from "lib/legacy"; import { formatBalanceAmount } from "lib/numbers"; import type { Token, TokenInfo } from "sdk/types/tokens"; @@ -20,7 +21,6 @@ import { getErrorTooltipTitle, infoRow, lines, - tryGetError, } from "./shared"; import { getActionTitle } from "../../keys"; @@ -137,7 +137,7 @@ export const formatSwapMessage = ( swapToTokenAmount: toExecutionAmountText, }; } else { - const error = tradeAction.reasonBytes ? tryGetError(tradeAction.reasonBytes) ?? undefined : undefined; + const error = tradeAction.reasonBytes ? tryDecodeCustomError(tradeAction.reasonBytes) ?? undefined : undefined; const errorComment = error ? lines({ text: getErrorTooltipTitle(error.name, false), @@ -193,7 +193,7 @@ export const formatSwapMessage = ( swapToTokenAmount: toExecutionAmountText, }; } else if (ot === OrderType.LimitSwap && ev === TradeActionType.OrderFrozen) { - const error = tradeAction.reasonBytes ? tryGetError(tradeAction.reasonBytes) ?? undefined : undefined; + const error = tradeAction.reasonBytes ? tryDecodeCustomError(tradeAction.reasonBytes) ?? undefined : undefined; const outputAmount = error?.args?.outputAmount as bigint | undefined; const ratio = outputAmount !== undefined @@ -261,7 +261,7 @@ export const formatSwapMessage = ( swapToTokenAmount: toExecutionAmountText, }; } else if (ot === OrderType.MarketSwap && ev === TradeActionType.OrderCancelled) { - const error = tradeAction.reasonBytes ? tryGetError(tradeAction.reasonBytes) ?? undefined : undefined; + const error = tradeAction.reasonBytes ? tryDecodeCustomError(tradeAction.reasonBytes) ?? undefined : undefined; const outputAmount = error?.args?.outputAmount as bigint | undefined; const ratio = outputAmount !== undefined diff --git a/src/config/contracts.ts b/src/config/contracts.ts index f85d04fad6..ee20f30231 100644 --- a/src/config/contracts.ts +++ b/src/config/contracts.ts @@ -1,40 +1,11 @@ -import { Contract, ContractRunner, ethers, InterfaceAbi } from "ethers"; import type { Address } from "viem"; import { ContractName, getContract } from "sdk/configs/contracts"; -import { GlvRouter__factory } from "typechain-types"; -import { DataStore__factory } from "typechain-types/factories/DataStore__factory"; -import { ExchangeRouter__factory } from "typechain-types/factories/ExchangeRouter__factory"; -import { Multicall__factory } from "typechain-types/factories/Multicall__factory"; -import { ContractsChainId } from "./chains"; - -const { ZeroAddress } = ethers; +import type { ContractsChainId } from "./chains"; export { getContract } from "sdk/configs/contracts"; -export const XGMT_EXCLUDED_ACCOUNTS = [ - "0x330eef6b9b1ea6edd620c825c9919dc8b611d5d5", - "0xd9b1c23411adbb984b1c4be515fafc47a12898b2", - "0xa633158288520807f91ccc98aa58e0ea43acb400", - "0xffd0a93b4362052a336a7b22494f1b77018dd34b", -]; - -function makeGetContract unknown }>( - name: ContractName, - factory: T -) { - return (chainId: ContractsChainId, provider?: ContractRunner) => - new Contract(getContract(chainId, name), factory.abi, provider) as unknown as ReturnType; -} - -export const getDataStoreContract = makeGetContract("DataStore", DataStore__factory); -export const getMulticallContract = makeGetContract("Multicall", Multicall__factory); -export const getExchangeRouterContract = makeGetContract("ExchangeRouter", ExchangeRouter__factory); -export const getGlvRouterContract = makeGetContract("GlvRouter", GlvRouter__factory); - -export const getZeroAddressContract = (provider?: ContractRunner) => new Contract(ZeroAddress, [], provider); - export function tryGetContract(chainId: ContractsChainId, name: ContractName): Address | undefined { try { return getContract(chainId, name); diff --git a/src/config/multichain.ts b/src/config/multichain.ts index 1f36d4b02f..f746b87ece 100644 --- a/src/config/multichain.ts +++ b/src/config/multichain.ts @@ -1,5 +1,4 @@ import { errors as _StargateErrorsAbi } from "@stargatefinance/stg-evm-sdk-v2"; -import { abi as IStargateAbi } from "@stargatefinance/stg-evm-sdk-v2/artifacts/src/interfaces/IStargate.sol/IStargate.json"; import { address as ethPoolArbitrum } from "@stargatefinance/stg-evm-sdk-v2/deployments/arbitrum-mainnet/StargatePoolNative.json"; import { address as usdcPoolArbitrum } from "@stargatefinance/stg-evm-sdk-v2/deployments/arbitrum-mainnet/StargatePoolUSDC.json"; import { address as usdtPoolArbitrum } from "@stargatefinance/stg-evm-sdk-v2/deployments/arbitrum-mainnet/StargatePoolUSDT.json"; @@ -20,12 +19,12 @@ import { address as usdcSgPoolOptimismSepolia } from "@stargatefinance/stg-evm-s import { address as ethPoolSepolia } from "@stargatefinance/stg-evm-sdk-v2/deployments/sepolia-testnet/StargatePoolNative.json"; import { address as usdcSgPoolSepolia } from "@stargatefinance/stg-evm-sdk-v2/deployments/sepolia-testnet/StargatePoolUSDC.json"; import { address as usdtPoolSepolia } from "@stargatefinance/stg-evm-sdk-v2/deployments/sepolia-testnet/StargatePoolUSDT.json"; -import { Wallet } from "ethers"; import invert from "lodash/invert"; import mapValues from "lodash/mapValues"; import uniq from "lodash/uniq"; import type { Abi, Hex } from "viem"; import { maxUint256, zeroAddress } from "viem"; +import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; import { AnyChainId, @@ -44,6 +43,7 @@ import { import { isDevelopment } from "config/env"; import { LayerZeroEndpointId } from "domain/multichain/types"; import { numberToBigint } from "lib/numbers"; +import { ISigner } from "lib/transactions/iSigner"; import { isSettlementChain, isSourceChain, SOURCE_CHAINS } from "sdk/configs/multichain"; import { convertTokenAddress, getTokenBySymbol } from "sdk/configs/tokens"; @@ -55,7 +55,6 @@ export { ethPoolArbitrumSepolia, ethPoolOptimismSepolia, ethPoolSepolia, - IStargateAbi, usdcSgPoolArbitrumSepolia, usdcSgPoolOptimismSepolia, usdcSgPoolSepolia, @@ -480,7 +479,8 @@ export const FAKE_INPUT_AMOUNT_MAP: Record = { }; export const RANDOM_SLOT = "0x23995301f0ea59f7cace2ae906341fc4662f3f5d23f124431ee3520d1070148c"; -export const RANDOM_WALLET = Wallet.createRandom(); +export const RANDOM_ACCOUNT = privateKeyToAccount(generatePrivateKey()); +export const RANDOM_WALLET: ISigner = ISigner.fromPrivateKeyAccount(RANDOM_ACCOUNT); /** * Uses maxUint256 / 100n to avoid number overflows in EVM operations. diff --git a/src/context/SyntheticsEvents/SyntheticsEventsProvider.tsx b/src/context/SyntheticsEvents/SyntheticsEventsProvider.tsx index 02a89aed9e..235f828856 100644 --- a/src/context/SyntheticsEvents/SyntheticsEventsProvider.tsx +++ b/src/context/SyntheticsEvents/SyntheticsEventsProvider.tsx @@ -14,7 +14,6 @@ import { subscribeToTransferEvents, subscribeToV2Events, } from "context/WebsocketContext/subscribeToEvents"; -import { useWebsocketProvider } from "context/WebsocketContext/WebsocketContextProvider"; import { MultichainTransferProgress } from "domain/multichain/progress/MultichainTransferProgress"; import { useMultichainTransferProgressView } from "domain/multichain/progress/MultichainTransferProgressView"; import { useMarketsInfoRequest } from "domain/synthetics/markets"; @@ -106,7 +105,6 @@ export function SyntheticsEventsProvider({ children }: { children: ReactNode }) const { chainId, srcChainId } = useChainId(); const { account: currentAccount } = useWallet(); const provider = getProvider(undefined, chainId); - const { wsProvider } = useWebsocketProvider(); const { hasV2LostFocus, hasPageLostFocus } = useHasLostFocus(); const { executionFeeBufferBps, setIsSettingsVisible } = useSettings(); @@ -916,31 +914,34 @@ export function SyntheticsEventsProvider({ children }: { children: ReactNode }) useEffect( function subscribe() { - if (hasV2LostFocus || !wsProvider || !currentAccount) { + if (hasV2LostFocus || !currentAccount) { return; } - const unsubscribe = subscribeToV2Events(chainId, wsProvider, currentAccount, eventLogHandlers); + const unsubscribe = subscribeToV2Events({ + chainId, + account: currentAccount, + eventLogHandlers, + }); return function cleanup() { unsubscribe(); }; }, - [chainId, currentAccount, hasV2LostFocus, wsProvider] + [chainId, currentAccount, hasV2LostFocus] ); useEffect( function subscribeTokenTransferEvents() { - if (hasPageLostFocus || !wsProvider || !currentAccount || !marketTokensAddressesString) { + if (hasPageLostFocus || !currentAccount || !marketTokensAddressesString) { return; } - const unsubscribeFromTokenEvents = subscribeToTransferEvents( + const unsubscribeFromTokenEvents = subscribeToTransferEvents({ chainId, - wsProvider, - currentAccount, - marketTokensAddressesString.split("-"), - (tokenAddress, amount) => { + account: currentAccount, + marketTokensAddresses: marketTokensAddressesString.split("-"), + onTransfer: (tokenAddress, amount) => { setWebsocketTokenBalancesUpdates((old) => { const oldDiff = old[tokenAddress]?.diff || 0n; @@ -953,8 +954,8 @@ export function SyntheticsEventsProvider({ children }: { children: ReactNode }) setOptimisticTokensBalancesUpdates((old) => { return updateByKey(old, tokenAddress, { isPending: false }); }); - } - ); + }, + }); return function cleanup() { unsubscribeFromTokenEvents(); @@ -968,21 +969,19 @@ export function SyntheticsEventsProvider({ children }: { children: ReactNode }) marketTokensAddressesString, setOptimisticTokensBalancesUpdates, setWebsocketTokenBalancesUpdates, - wsProvider, ] ); useEffect( function subscribeApproval() { - if (!wsProvider || !currentAccount) { + if (!currentAccount) { return; } - const unsubscribeApproval = subscribeToApprovalEvents( + const unsubscribeApproval = subscribeToApprovalEvents({ chainId, - wsProvider, - currentAccount, - (tokenAddress, spender, value) => { + account: currentAccount, + onApprove: (tokenAddress, spender, value) => { setApprovalStatuses((old) => ({ ...old, [tokenAddress]: { @@ -996,14 +995,14 @@ export function SyntheticsEventsProvider({ children }: { children: ReactNode }) action: "ApproveSuccess", }, }); - } - ); + }, + }); return function cleanup() { unsubscribeApproval(); }; }, - [chainId, currentAccount, wsProvider] + [chainId, currentAccount] ); useEffect(() => { diff --git a/src/context/SyntheticsEvents/useMultichainEvents.ts b/src/context/SyntheticsEvents/useMultichainEvents.ts index 021e0e4628..85d40061e9 100644 --- a/src/context/SyntheticsEvents/useMultichainEvents.ts +++ b/src/context/SyntheticsEvents/useMultichainEvents.ts @@ -22,8 +22,6 @@ import { subscribeToOftReceivedEvents, subscribeToOftSentEvents, } from "context/WebsocketContext/subscribeToEvents"; -import { useWebsocketProvider, useWsAdditionalSourceChains } from "context/WebsocketContext/WebsocketContextProvider"; -import { CodecUiHelper } from "domain/multichain/codecs/CodecUiHelper"; import { MultichainFundingHistoryItem } from "domain/multichain/types"; import { isStepGreater } from "domain/multichain/useGmxAccountFundingHistory"; import { useChainId } from "lib/chains"; @@ -35,7 +33,7 @@ import { MultichainWithdrawalMetricData, sendOrderExecutedMetric, } from "lib/metrics"; -import { EMPTY_ARRAY, EMPTY_OBJECT } from "lib/objects"; +import { EMPTY_ARRAY, EMPTY_OBJECT, getByKey } from "lib/objects"; import { sendMultichainDepositSuccessEvent, sendMultichainWithdrawalSuccessEvent } from "lib/userAnalytics/utils"; import { getToken } from "sdk/configs/tokens"; import { adjustForDecimals } from "sdk/utils/numbers"; @@ -94,9 +92,6 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo const { address: currentAccount } = useAccount(); - const { wsProvider, wsSourceChainProviders } = useWebsocketProvider(); - const wsSourceChainProvider = srcChainId ? wsSourceChainProviders[srcChainId] : undefined; - const [, setSelectedTransferGuid] = useGmxAccountSelectedTransferGuid(); const [multichainFundingPendingIds, setMultichainFundingPendingIds] = useState>(EMPTY_OBJECT); @@ -176,7 +171,11 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo return; } const stargatePoolAddress = info.sender; - const sourceChainTokenId = tokenIdByStargate[stargatePoolAddress]; + const sourceChainTokenId = getByKey(tokenIdByStargate, stargatePoolAddress); + if (!sourceChainTokenId) { + continue; + } + const settlementChainTokenId = getMappedTokenId(sourceChainTokenId.chainId, sourceChainTokenId.address, chainId); const tokenAddress = settlementChainTokenId?.address; if (!tokenAddress) { @@ -249,13 +248,7 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo useEffect( function subscribeSourceChainOftSentEvents() { - if ( - srcChainId === undefined || - hasPageLostFocus || - !currentAccount || - !wsSourceChainProvider || - !isSettlementChain(chainId) - ) { + if (srcChainId === undefined || hasPageLostFocus || !currentAccount || !isSettlementChain(chainId)) { return; } @@ -269,11 +262,11 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo debugLog("subscribing to OFTSent events for", srcChainId); - const unsubscribeFromOftSentEvents = subscribeToOftSentEvents( - wsSourceChainProvider, - currentAccount, - sourceChainStargates, - (info) => { + const unsubscribeFromOftSentEvents = subscribeToOftSentEvents({ + chainId: srcChainId, + account: currentAccount, + stargates: sourceChainStargates, + onOftSent: (info) => { setTimeout(function clear() { debugLog("clearing OFTSent event for", srcChainId, info.txnHash); setSourceChainOftSentQueue((prev) => { @@ -284,36 +277,31 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo setSourceChainOftSentQueue((prev) => { return uniqBy(prev.concat(info), (item) => item.txnHash); }); - } - ); + }, + }); return function cleanup() { debugLog("unsubscribing from OFTSent events for", srcChainId); unsubscribeFromOftSentEvents(); }; }, - [chainId, currentAccount, hasPageLostFocus, setSelectedTransferGuid, srcChainId, wsSourceChainProvider] + [chainId, currentAccount, hasPageLostFocus, setSelectedTransferGuid, srcChainId] ); useEffect( function subscribeOftReceivedEvents() { - if ( - hasPageLostFocus || - !wsProvider || - !isSettlementChain(chainId) || - pendingReceiveDepositGuidsRef.current.length === 0 - ) { + if (hasPageLostFocus || !isSettlementChain(chainId) || pendingReceiveDepositGuidsRef.current.length === 0) { return; } const tokenIdMap = CHAIN_ID_TO_TOKEN_ID_MAP[chainId]; const settlementChainStargates = Object.values(tokenIdMap).map((tokenId) => tokenId.stargate); - const unsubscribeFromOftReceivedEvents = subscribeToOftReceivedEvents( - wsProvider, - settlementChainStargates, - pendingReceiveDepositGuidsRef.current, - (info) => { + const unsubscribeFromOftReceivedEvents = subscribeToOftReceivedEvents({ + chainId, + stargates: settlementChainStargates, + guids: pendingReceiveDepositGuidsRef.current, + onOftReceive: (info) => { setPendingMultichainFunding((prev) => { const newPendingMultichainFunding = structuredClone(prev); @@ -338,8 +326,8 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo return newPendingMultichainFunding; }); - } - ); + }, + }); const timeoutId = setTimeout(() => { setPendingMultichainFunding((prev) => { @@ -359,27 +347,22 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo clearTimeout(timeoutId); }; }, - [chainId, hasPageLostFocus, pendingReceiveDepositGuidsKey, wsProvider] + [chainId, hasPageLostFocus, pendingReceiveDepositGuidsKey] ); useEffect( function subscribeComposeDeliveredEvents() { - if ( - hasPageLostFocus || - !wsProvider || - !isSettlementChain(chainId) || - pendingExecuteDepositGuidsRef.current.length === 0 - ) { + if (hasPageLostFocus || !isSettlementChain(chainId) || pendingExecuteDepositGuidsRef.current.length === 0) { return; } - const lzEndpoint = CodecUiHelper.getLzEndpoint(chainId); + const lzEndpoint = getContract(chainId, "LayerZeroEndpoint"); - const unsubscribeFromComposeDeliveredEvents = subscribeToComposeDeliveredEvents( - wsProvider, - lzEndpoint, - pendingExecuteDepositGuidsRef.current, - (info) => { + const unsubscribeFromComposeDeliveredEvents = subscribeToComposeDeliveredEvents({ + chainId, + layerZeroEndpoint: lzEndpoint, + guids: pendingExecuteDepositGuidsRef.current, + onComposeDelivered: (info) => { scheduleMultichainFundingItemClearing([info.guid]); setPendingMultichainFunding((prev) => { @@ -404,8 +387,8 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo return newPendingMultichainFunding; }); - } - ); + }, + }); const timeoutId = setTimeout(() => { setPendingMultichainFunding((prev) => { @@ -425,7 +408,7 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo clearTimeout(timeoutId); }; }, - [chainId, hasPageLostFocus, pendingExecuteDepositGuidsKey, scheduleMultichainFundingItemClearing, wsProvider] + [chainId, hasPageLostFocus, pendingExecuteDepositGuidsKey, scheduleMultichainFundingItemClearing] ); //#endregion Deposits @@ -473,7 +456,10 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo debugLog("withdrawal got OFTSent event for", srcChainId, info.txnHash); const stargatePoolAddress = info.sender; - const tokenId = tokenIdByStargate[stargatePoolAddress]; + const tokenId = getByKey(tokenIdByStargate, stargatePoolAddress); + if (!tokenId) { + continue; + } const tokenAddress = tokenId.address; @@ -546,13 +532,7 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo useEffect( function subscribeSettlementChainOftSentEvents() { - if ( - hasPageLostFocus || - !currentAccount || - !wsProvider || - !isSettlementChain(chainId) || - srcChainId === undefined - ) { + if (hasPageLostFocus || !currentAccount || !isSettlementChain(chainId) || srcChainId === undefined) { return; } @@ -564,11 +544,11 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo const settlementChainStargates = Object.values(tokenIdMap).map((tokenId) => tokenId.stargate); - const unsubscribeFromOftSentEvents = subscribeToOftSentEvents( - wsProvider, - getContract(chainId, "LayerZeroProvider"), - settlementChainStargates, - (info) => { + const unsubscribeFromOftSentEvents = subscribeToOftSentEvents({ + chainId, + account: getContract(chainId, "LayerZeroProvider"), + stargates: settlementChainStargates, + onOftSent: (info) => { setTimeout(function clear() { debugLog("clearing OFTSent event for", chainId, info.txnHash); setSettlementChainOftSentQueue((prev) => { @@ -580,27 +560,21 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo setSettlementChainOftSentQueue((prev) => { return uniqBy(prev.concat(info), (item) => item.txnHash); }); - } - ); + }, + }); return function cleanup() { unsubscribeFromOftSentEvents(); }; }, - [chainId, currentAccount, hasPageLostFocus, setSelectedTransferGuid, srcChainId, wsProvider] + [chainId, currentAccount, hasPageLostFocus, setSelectedTransferGuid, srcChainId] ); useEffect( function subscribeSourceChainOftReceivedEvents() { const guids = pendingReceiveWithdrawalGuidsRef.current; - if ( - hasPageLostFocus || - !wsSourceChainProvider || - !isSettlementChain(chainId) || - srcChainId === undefined || - guids.length === 0 - ) { + if (hasPageLostFocus || !isSettlementChain(chainId) || srcChainId === undefined || guids.length === 0) { return; } @@ -615,11 +589,11 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo debugLog("subscribing to source chain OFTReceive events for", srcChainId, guids); - const unsubscribeFromOftReceivedEvents = subscribeToOftReceivedEvents( - wsSourceChainProvider, - sourceChainStargates, + const unsubscribeFromOftReceivedEvents = subscribeToOftReceivedEvents({ + chainId: srcChainId, + stargates: sourceChainStargates, guids, - (info) => { + onOftReceive: (info) => { debugLog("withdrawal on source chain got OFTReceive event for", srcChainId, info.txnHash); scheduleMultichainFundingItemClearing([info.guid]); @@ -640,14 +614,18 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo pendingSentWithdrawal.step = "received"; - const sourceChainTokenId = tokenIdByStargate[info.sender]; + const sourceChainTokenId = getByKey(tokenIdByStargate, info.sender); + if (!sourceChainTokenId) { + return newPendingMultichainFunding; + } + const settlementChainTokenId = getMappedTokenId( sourceChainTokenId.chainId, sourceChainTokenId.address, chainId ); - if (!sourceChainTokenId || !settlementChainTokenId) { + if (!settlementChainTokenId) { // eslint-disable-next-line no-console console.warn("No settlement chain token address for OFTReceive event", info); return newPendingMultichainFunding; @@ -665,8 +643,8 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo return newPendingMultichainFunding; }); - } - ); + }, + }); // in 5 minutes clean up pending withdrawals that are not received const timeoutId = setTimeout(() => { @@ -687,14 +665,7 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo clearTimeout(timeoutId); }; }, - [ - chainId, - hasPageLostFocus, - pendingReceiveWithdrawalGuidsKey, - scheduleMultichainFundingItemClearing, - srcChainId, - wsSourceChainProvider, - ] + [chainId, hasPageLostFocus, pendingReceiveWithdrawalGuidsKey, scheduleMultichainFundingItemClearing, srcChainId] ); //#endregion Withdrawals @@ -738,13 +709,11 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo continue; } - const wsSomeSourceChainProvider = wsSourceChainProviders[someSourceChainId]; - if (!wsSomeSourceChainProvider) { - debugLog("no ws source chain provider for source chain approval listener", someSourceChainId); + const tokenIdMap = CHAIN_ID_TO_TOKEN_ID_MAP[someSourceChainId]; + if (!tokenIdMap) { continue; } - const tokenIdMap = CHAIN_ID_TO_TOKEN_ID_MAP[someSourceChainId]; const tokenAddresses = Object.values(tokenIdMap) .filter((tokenId) => tokenId.address !== zeroAddress) .map((tokenId) => tokenId.address); @@ -752,13 +721,22 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo .filter((tokenId) => tokenId.address !== zeroAddress) .map((tokenId) => tokenId.stargate); - debugLog("subscribing to source chain approval events for", someSourceChainId); - const unsubscribeApproval = subscribeToMultichainApprovalEvents( - wsSomeSourceChainProvider, + debugLog( + "subscribing to source chain approval events for", + someSourceChainId, + "account:", currentAccount, + "tokenAddresses:", + tokenAddresses.length, + "stargates:", + stargates.length + ); + const unsubscribeApproval = subscribeToMultichainApprovalEvents({ + srcChainId: someSourceChainId, + account: currentAccount, tokenAddresses, - stargates, - (tokenAddress, spender, value) => { + spenders: stargates, + onApprove: (tokenAddress, spender, value) => { debugLog("got approval event for", someSourceChainId, tokenAddress, spender, value); setSourceChainApprovalStatuses((old) => ({ @@ -768,8 +746,8 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo [spender]: { value, createdAt: Date.now() }, }, })); - } - ); + }, + }); newUnsubscribers[someSourceChainId] = unsubscribeApproval; } @@ -799,9 +777,25 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo }; }, // eslint-disable-next-line react-hooks/exhaustive-deps - [currentAccount, JSON.stringify(sourceChainApprovalActiveListeners), wsSourceChainProviders] + [currentAccount, JSON.stringify(sourceChainApprovalActiveListeners)] ); + const setMultichainSourceChainApprovalsActiveListener = useCallback((chainId: SourceChainId, name: string) => { + setSourceChainApprovalActiveListeners((old) => { + const newListeners = structuredClone(old); + newListeners[chainId] = [...(newListeners[chainId] || []), name]; + return newListeners; + }); + }, []); + + const removeMultichainSourceChainApprovalsActiveListener = useCallback((chainId: SourceChainId, name: string) => { + setSourceChainApprovalActiveListeners((old) => { + const newListeners = structuredClone(old); + newListeners[chainId] = newListeners[chainId]?.filter((listener) => listener !== name) || []; + return newListeners; + }); + }, []); + const multichainEventsState = useMemo( (): MultichainEventsState => ({ pendingMultichainFunding, @@ -916,20 +910,8 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo }); }, multichainSourceChainApprovalStatuses: sourceChainApprovalStatuses, - setMultichainSourceChainApprovalsActiveListener: (chainId: SourceChainId, name: string) => { - setSourceChainApprovalActiveListeners((old) => { - const newListeners = structuredClone(old); - newListeners[chainId] = [...(newListeners[chainId] || []), name]; - return newListeners; - }); - }, - removeMultichainSourceChainApprovalsActiveListener: (chainId: SourceChainId, name: string) => { - setSourceChainApprovalActiveListeners((old) => { - const newListeners = structuredClone(old); - newListeners[chainId] = newListeners[chainId]?.filter((listener) => listener !== name) || []; - return newListeners; - }); - }, + setMultichainSourceChainApprovalsActiveListener, + removeMultichainSourceChainApprovalsActiveListener, updatePendingMultichainFunding: (items) => { const intermediateStepGuids = getIntermediateStepGuids(pendingMultichainFunding); @@ -977,6 +959,8 @@ export function useMultichainEvents({ hasPageLostFocus }: { hasPageLostFocus: bo chainId, setSelectedTransferGuid, scheduleMultichainFundingItemClearing, + setMultichainSourceChainApprovalsActiveListener, + removeMultichainSourceChainApprovalsActiveListener, ] ); @@ -1105,8 +1089,6 @@ export function useMultichainApprovalsActiveListener(chainId: SourceChainId | un const { setMultichainSourceChainApprovalsActiveListener, removeMultichainSourceChainApprovalsActiveListener } = useSyntheticsEvents(); - useWsAdditionalSourceChains(chainId, name); - useEffect(() => { if (!chainId) { return; diff --git a/src/context/SyntheticsStateContext/SyntheticsStateContextProvider.tsx b/src/context/SyntheticsStateContext/SyntheticsStateContextProvider.tsx index 4bbd498add..44ed3298ff 100644 --- a/src/context/SyntheticsStateContext/SyntheticsStateContextProvider.tsx +++ b/src/context/SyntheticsStateContext/SyntheticsStateContextProvider.tsx @@ -1,6 +1,6 @@ -import { ethers } from "ethers"; import { ReactNode, useMemo, useState } from "react"; import { useParams } from "react-router-dom"; +import { getAddress, isAddress } from "viem"; import type { ContractsChainId, SourceChainId } from "config/chains"; import { getKeepLeverageKey } from "config/localStorage"; @@ -172,8 +172,8 @@ export function SyntheticsStateContextProvider({ let checkSummedAccount: string | undefined; - if (paramsAccount && ethers.isAddress(paramsAccount)) { - checkSummedAccount = ethers.getAddress(paramsAccount); + if (paramsAccount && isAddress(paramsAccount, { strict: false })) { + checkSummedAccount = getAddress(paramsAccount); } const isLeaderboardPage = pageType === "competitions" || pageType === "leaderboard"; diff --git a/src/context/WebsocketContext/WebsocketContextProvider.tsx b/src/context/WebsocketContext/WebsocketContextProvider.tsx deleted file mode 100644 index 370fcd80dd..0000000000 --- a/src/context/WebsocketContext/WebsocketContextProvider.tsx +++ /dev/null @@ -1,330 +0,0 @@ -import { JsonRpcProvider, WebSocketProvider } from "ethers"; -import uniq from "lodash/uniq"; -import { createContext, ReactNode, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react"; -import { useAccount } from "wagmi"; - -import { SourceChainId } from "config/chains"; -import { isDevelopment } from "config/env"; -import { isSourceChain } from "config/multichain"; -import { useChainId } from "lib/chains"; -import { - metrics, - WsProviderConnected, - WsProviderDisconnected, - WsProviderHealthCheckFailed, - WsSourceChainProviderConnectedCounter, - WsSourceChainProviderDisconnectedCounter, -} from "lib/metrics"; -import { EMPTY_OBJECT } from "lib/objects"; -import { closeWsConnection, getWsProvider, isProviderInClosedState, isWebsocketProvider } from "lib/rpc"; -import { useHasLostFocus } from "lib/useHasPageLostFocus"; - -import { getTotalSubscribersEventsCount } from "./subscribeToEvents"; - -const WS_HEALTH_CHECK_INTERVAL = 1000 * 30; -const WS_RECONNECT_INTERVAL = 1000 * 5; -const WS_ADDITIONAL_SOURCE_CHAIN_DISCONNECT_DELAY = 1 * 60 * 1000; - -const DEBUG_WEBSOCKETS_LOGGING = false; - -const debugLog = (...args: any[]) => { - if (DEBUG_WEBSOCKETS_LOGGING) { - // eslint-disable-next-line no-console - console.log("[ws]", ...args); - } -}; - -export type WebsocketContextType = { - wsProvider: WebSocketProvider | JsonRpcProvider | undefined; - wsSourceChainProviders: Partial>; - - setAdditionalSourceChain: (chainId: SourceChainId, name: string) => void; - removeAdditionalSourceChain: (chainId: SourceChainId, name: string) => void; -}; - -export const WsContext = createContext({} as WebsocketContextType); - -export function useWebsocketProvider() { - return useContext(WsContext) as WebsocketContextType; -} - -export function WebsocketContextProvider({ children }: { children: ReactNode }) { - const { isConnected } = useAccount(); - const { chainId, srcChainId } = useChainId(); - const [wsProvider, setWsProvider] = useState(); - const [additionalSourceChains, setAdditionalSourceChains] = - useState>>(EMPTY_OBJECT); - const additionalSourceChainsCleanupTimersRef = useRef>>({}); - const [wsSourceChainProviders, setWsSourceChainProviders] = - useState>>(EMPTY_OBJECT); - - const { hasPageLostFocus, hasV2LostFocus } = useHasLostFocus(); - const initializedTime = useRef(); - const healthCheckTimerId = useRef(); - const lostFocusRef = useRef({ hasV2LostFocus }); - - lostFocusRef.current.hasV2LostFocus = hasV2LostFocus; - - useEffect( - function updateProviderEffect() { - if (!isConnected || hasPageLostFocus) { - return; - } - - const newProvider = getWsProvider(chainId); - setWsProvider(newProvider); - - if (newProvider) { - initializedTime.current = Date.now(); - // eslint-disable-next-line no-console - console.log(`ws provider for chain ${chainId} initialized at ${initializedTime.current}`); - metrics.pushEvent({ - event: "wsProvider.connected", - isError: false, - data: {}, - }); - } - - return function cleanup() { - initializedTime.current = undefined; - clearTimeout(healthCheckTimerId.current); - - if (isWebsocketProvider(newProvider)) { - closeWsConnection(newProvider); - } - - // eslint-disable-next-line no-console - console.log(`ws provider for chain ${chainId} disconnected at ${Date.now()}`); - metrics.pushEvent({ - event: "wsProvider.disconnected", - isError: false, - data: {}, - }); - }; - }, - [isConnected, chainId, hasPageLostFocus, srcChainId] - ); - - useEffect( - function updateSourceChainProviderEffect() { - if (!isConnected || hasPageLostFocus || srcChainId === undefined) { - return; - } - - if (additionalSourceChainsCleanupTimersRef.current[srcChainId]) { - window.clearTimeout(additionalSourceChainsCleanupTimersRef.current[srcChainId]); - delete additionalSourceChainsCleanupTimersRef.current[srcChainId]; - debugLog("cancelling cleanup timer for source chain", srcChainId); - } - - let newSourceChainProvider = getWsProvider(srcChainId); - - if (newSourceChainProvider) { - debugLog("source chain provider connected", srcChainId); - - metrics.pushCounter("wsSourceChainProvider.connected", { - srcChainId, - }); - setWsSourceChainProviders((prev) => { - const newProviders = { ...prev }; - newProviders[srcChainId] = newSourceChainProvider; - return newProviders; - }); - } - - return function cleanup() { - const timer = window.setTimeout(() => { - if (isWebsocketProvider(newSourceChainProvider)) { - debugLog("source chain provider disconnected", srcChainId); - closeWsConnection(newSourceChainProvider); - } - debugLog("source chain provider cleanup", srcChainId); - setWsSourceChainProviders((prev) => { - const newProviders = { ...prev }; - delete newProviders[srcChainId]; - return newProviders; - }); - - metrics.pushCounter("wsSourceChainProvider.disconnected", { - srcChainId, - }); - }, WS_ADDITIONAL_SOURCE_CHAIN_DISCONNECT_DELAY); - - // eslint-disable-next-line react-hooks/exhaustive-deps - additionalSourceChainsCleanupTimersRef.current[srcChainId] = timer; - debugLog("scheduling cleanup timer for source chain", srcChainId); - }; - }, - [hasPageLostFocus, isConnected, srcChainId] - ); - - useEffect( - function updateAdditionalSourceChainEffect() { - if (!isConnected || hasPageLostFocus) { - return; - } - - const distinctChains = Object.keys(additionalSourceChains) - .map((chainId) => parseInt(chainId) as SourceChainId) - .filter((chainId) => chainId !== srcChainId && isSourceChain(chainId)); - - if (distinctChains.length === 0) { - return; - } - - const wsProviders: Partial> = {}; - - for (const additionalSourceChain of distinctChains) { - if (additionalSourceChainsCleanupTimersRef.current[additionalSourceChain]) { - window.clearTimeout(additionalSourceChainsCleanupTimersRef.current[additionalSourceChain]); - delete additionalSourceChainsCleanupTimersRef.current[additionalSourceChain]; - debugLog("cancelling cleanup timer for additional source chain", additionalSourceChain); - } - - const newSourceChainProvider = getWsProvider(additionalSourceChain); - - if (newSourceChainProvider) { - wsProviders[additionalSourceChain] = newSourceChainProvider; - } - } - - if (Object.keys(wsProviders).length !== 0) { - setWsSourceChainProviders((prev) => { - return { ...prev, ...wsProviders }; - }); - } - - return function cleanup() { - for (const additionalSourceChain in wsProviders) { - debugLog("scheduling cleanup timer for additional source chain", additionalSourceChain); - - const timer = window.setTimeout(() => { - debugLog("disconnecting from additional source chain", additionalSourceChain); - if (isWebsocketProvider(wsProviders[additionalSourceChain])) { - closeWsConnection(wsProviders[additionalSourceChain]); - } - setWsSourceChainProviders((prev) => { - const newProviders = { ...prev }; - delete newProviders[additionalSourceChain]; - return newProviders; - }); - // eslint-disable-next-line react-hooks/exhaustive-deps - delete additionalSourceChainsCleanupTimersRef.current[additionalSourceChain]; - }, WS_ADDITIONAL_SOURCE_CHAIN_DISCONNECT_DELAY); - - // eslint-disable-next-line react-hooks/exhaustive-deps - additionalSourceChainsCleanupTimersRef.current[additionalSourceChain] = timer; - } - }; - }, - [additionalSourceChains, hasPageLostFocus, isConnected, srcChainId] - ); - - useEffect( - function healthCheckEffect() { - if (!isConnected || hasPageLostFocus || !isWebsocketProvider(wsProvider)) { - return; - } - - async function nextHealthCheck() { - if (!isWebsocketProvider(wsProvider)) { - return; - } - - // wait ws provider to be connected and avoid too often reconnects - const isReconnectingIntervalPassed = - initializedTime.current && Date.now() - initializedTime.current > WS_RECONNECT_INTERVAL; - const listenerCount = await wsProvider.listenerCount(); - const requiredListenerCount = getTotalSubscribersEventsCount(chainId, wsProvider, { - v2: !lostFocusRef.current.hasV2LostFocus, - }); - - if (isDevelopment() && isReconnectingIntervalPassed) { - // eslint-disable-next-line no-console - console.log( - `ws provider health check, state: ${wsProvider.websocket.readyState}, subs: ${listenerCount} / ${requiredListenerCount}` - ); - } - - if ( - (isProviderInClosedState(wsProvider) && isReconnectingIntervalPassed) || - (listenerCount < requiredListenerCount && isReconnectingIntervalPassed) - ) { - closeWsConnection(wsProvider); - const nextProvider = getWsProvider(chainId); - setWsProvider(nextProvider); - initializedTime.current = Date.now(); - // eslint-disable-next-line no-console - console.log("ws provider health check failed, reconnecting", initializedTime.current, { - requiredListenerCount, - listenerCount, - }); - metrics.pushEvent({ - event: "wsProvider.healthCheckFailed", - isError: false, - data: { - requiredListenerCount, - listenerCount, - }, - }); - } else { - healthCheckTimerId.current = setTimeout(nextHealthCheck, WS_HEALTH_CHECK_INTERVAL); - } - } - - nextHealthCheck(); - - return function cleanup() { - clearTimeout(healthCheckTimerId.current); - }; - }, - [isConnected, chainId, hasPageLostFocus, wsProvider] - ); - - const setAdditionalSourceChain = useCallback((chainId: SourceChainId, name: string) => { - setAdditionalSourceChains((prev) => { - const newAdditionalSourceChains = structuredClone(prev); - newAdditionalSourceChains[chainId] = uniq((newAdditionalSourceChains[chainId] || []).concat(name)); - return newAdditionalSourceChains; - }); - }, []); - - const removeAdditionalSourceChain = useCallback((chainId: SourceChainId, name: string) => { - setAdditionalSourceChains((prev) => { - const newAdditionalSourceChains = structuredClone(prev); - newAdditionalSourceChains[chainId] = newAdditionalSourceChains[chainId]?.filter((c) => c !== name) || []; - return newAdditionalSourceChains; - }); - }, []); - - const state: WebsocketContextType = useMemo(() => { - return { - wsProvider, - wsSourceChainProviders, - setAdditionalSourceChain, - removeAdditionalSourceChain, - }; - }, [removeAdditionalSourceChain, setAdditionalSourceChain, wsProvider, wsSourceChainProviders]); - - return {children}; -} - -export function useWsAdditionalSourceChains(chainId: SourceChainId | undefined, name: string) { - const { setAdditionalSourceChain, removeAdditionalSourceChain } = useWebsocketProvider(); - - useEffect(() => { - if (!chainId) { - return; - } - - debugLog("setting up additional source chain", chainId); - - setAdditionalSourceChain(chainId, name); - - return () => { - debugLog("tearing down additional source chain", chainId); - - removeAdditionalSourceChain(chainId, name); - }; - }, [chainId, name, setAdditionalSourceChain, removeAdditionalSourceChain]); -} diff --git a/src/context/WebsocketContext/subscribeToEvents.ts b/src/context/WebsocketContext/subscribeToEvents.ts index 364c52eff2..c3a8c25b10 100644 --- a/src/context/WebsocketContext/subscribeToEvents.ts +++ b/src/context/WebsocketContext/subscribeToEvents.ts @@ -1,55 +1,21 @@ -import { AbiCoder, ethers, isAddress, LogParams, Provider, ProviderEvent, ZeroAddress } from "ethers"; import { MutableRefObject } from "react"; -import { Abi, decodeEventLog, Hex } from "viem"; -import type { ContractEventArgsFromTopics } from "viem/_types/types/contract"; +import { Abi, ContractEventArgs, DecodeEventLogReturnType, encodeAbiParameters, isAddress, zeroAddress } from "viem"; +import type { ContractEventArgsFromTopics, ContractEventName } from "viem/_types/types/contract"; import { getContract, tryGetContract } from "config/contracts"; import type { EventLogData, EventTxnParams } from "context/SyntheticsEvents/types"; +import { getPublicClientWithRpc } from "lib/wallets/rainbowKitConfig"; import { abis } from "sdk/abis"; -import type { ContractsChainId } from "sdk/configs/chains"; +import type { ContractsChainId, SourceChainId } from "sdk/configs/chains"; import { getTokens, NATIVE_TOKEN_ADDRESS } from "sdk/configs/tokens"; +import { keccakString } from "sdk/utils/hash"; -const coder = AbiCoder.defaultAbiCoder(); +type RawEventLogData = DecodeEventLogReturnType["args"]["eventData"]; -const DEPOSIT_CREATED_HASH = ethers.id("DepositCreated"); -const DEPOSIT_EXECUTED_HASH = ethers.id("DepositExecuted"); -const DEPOSIT_CANCELLED_HASH = ethers.id("DepositCancelled"); +const encodeAddress = (address: string) => encodeAbiParameters([{ type: "address" }], [address]); -const WITHDRAWAL_CREATED_HASH = ethers.id("WithdrawalCreated"); -const WITHDRAWAL_EXECUTED_HASH = ethers.id("WithdrawalExecuted"); -const WITHDRAWAL_CANCELLED_HASH = ethers.id("WithdrawalCancelled"); - -const SHIFT_CREATED_HASH = ethers.id("ShiftCreated"); -const SHIFT_EXECUTED_HASH = ethers.id("ShiftExecuted"); -const SHIFT_CANCELLED_HASH = ethers.id("ShiftCancelled"); - -const ORDER_CREATED_HASH = ethers.id("OrderCreated"); -const ORDER_EXECUTED_HASH = ethers.id("OrderExecuted"); -const ORDER_CANCELLED_HASH = ethers.id("OrderCancelled"); -const ORDER_UPDATED_HASH = ethers.id("OrderUpdated"); - -const POSITION_INCREASE_HASH = ethers.id("PositionIncrease"); -const POSITION_DECREASE_HASH = ethers.id("PositionDecrease"); - -const GLV_DEPOSIT_CREATED_HASH = ethers.id("GlvDepositCreated"); -const GLV_DEPOSIT_EXECUTED_HASH = ethers.id("GlvDepositExecuted"); -const GLV_DEPOSIT_CANCELLED_HASH = ethers.id("GlvDepositCancelled"); - -const GLV_WITHDRAWAL_CREATED_HASH = ethers.id("GlvWithdrawalCreated"); -const GLV_WITHDRAWAL_EXECUTED_HASH = ethers.id("GlvWithdrawalExecuted"); -const GLV_WITHDRAWAL_CANCELLED_HASH = ethers.id("GlvWithdrawalCancelled"); - -const APPROVED_HASH = ethers.id("Approval(address,address,uint256)"); -const TRANSFER_HASH = ethers.id("Transfer(address,address,uint256)"); - -const MULTICHAIN_BRIDGE_IN_HASH = ethers.id("MultichainBridgeIn"); -const MULTICHAIN_TRANSFER_OUT_HASH = ethers.id("MultichainTransferOut"); -const MULTICHAIN_TRANSFER_IN_HASH = ethers.id("MultichainTransferIn"); - -const OFT_SENT_HASH = ethers.id("OFTSent(bytes32,uint32,address,uint256,uint256)"); -const OFT_RECEIVED_HASH = ethers.id("OFTReceived(bytes32,uint32,address,uint256)"); -export const COMPOSE_DELIVERED_HASH = ethers.id("ComposeDelivered(address,address,bytes32,uint16)"); -export const LZ_COMPOSE_ALERT_HASH = ethers.id( +export const COMPOSE_DELIVERED_HASH = keccakString("ComposeDelivered(address,address,bytes32,uint16)"); +export const LZ_COMPOSE_ALERT_HASH = keccakString( "LzComposeAlert(address,address,address,bytes32,uint16,uint256,uint256,bytes,bytes,bytes)" ); @@ -112,181 +78,188 @@ export const LZ_COMPOSE_ALERT_ABI = [ }, ] as const satisfies Abi; -export function subscribeToV2Events( - chainId: ContractsChainId, - provider: Provider, - account: string, +export function subscribeToV2Events({ + chainId, + account, + eventLogHandlers, +}: { + chainId: ContractsChainId; + account: string; eventLogHandlers: MutableRefObject< Record void)> - > -) { - const eventEmitter = new ethers.Contract(getContract(chainId, "EventEmitter"), abis.EventEmitter, provider); - - function handleEventLog(sender, eventName, eventNameHash, eventData, txnOpts) { - eventLogHandlers.current[eventName]?.(parseEventLogData(eventData), txnOpts); - } - - function handleEventLog1(sender, eventName, eventNameHash, topic1, eventData, txnOpts) { - eventLogHandlers.current[eventName]?.(parseEventLogData(eventData), txnOpts); - } - - function handleEventLog2(msgSender, eventName, eventNameHash, topic1, topic2, eventData, txnOpts) { - eventLogHandlers.current[eventName]?.(parseEventLogData(eventData), txnOpts); - } - - function handleCommonLog(e) { - const txnOpts: EventTxnParams = { - transactionHash: e.transactionHash, - blockNumber: e.blockNumber, - }; - - try { - const parsed = eventEmitter.interface.parseLog(e); - - if (!parsed) throw new Error("Could not parse event"); - if (parsed.name === "EventLog") { - handleEventLog(parsed.args[0], parsed.args[1], parsed.args[2], parsed.args[3], txnOpts); - } else if (parsed.name === "EventLog1") { - handleEventLog1(parsed.args[0], parsed.args[1], parsed.args[2], parsed.args[3], parsed.args[4], txnOpts); - } else if (parsed.name === "EventLog2") { - handleEventLog2( - parsed.args[0], - parsed.args[1], - parsed.args[2], - parsed.args[3], - parsed.args[4], - parsed.args[5], - txnOpts - ); + >; +}) { + const client = getPublicClientWithRpc(chainId, { withWs: true }); + + const filters = createV2EventFilters(account); + const eventEmitterAddress = getContract(chainId, "EventEmitter"); + + const unsubscribeEventLog1 = client.watchContractEvent({ + abi: abis.EventEmitter, + address: eventEmitterAddress, + eventName: filters.EventLog1.eventName, + args: filters.EventLog1.args, + onLogs: (logs) => { + for (const log of logs) { + const txnOpts: EventTxnParams = { + transactionHash: log.transactionHash, + blockNumber: Number(log.blockNumber), + }; + + try { + eventLogHandlers.current[log.args.eventName]?.(parseEventLogData(log.args.eventData), txnOpts); + } catch (e) { + // eslint-disable-next-line no-console + console.error("error parsing event", e); + } } - } catch (e) { - // eslint-disable-next-line no-console - console.error("error parsing event", e); - } - } - - const filters: ProviderEvent[] = createV2EventFilters(chainId, account, provider); + }, + strict: true, + }); - filters.forEach((filter) => { - provider.on(filter, handleCommonLog); + const unsubscribeEventLog2 = client.watchContractEvent({ + abi: abis.EventEmitter, + address: eventEmitterAddress, + eventName: filters.EventLog2.eventName, + args: filters.EventLog2.args, + onLogs: (logs) => { + for (const log of logs) { + const txnOpts: EventTxnParams = { + transactionHash: log.transactionHash, + blockNumber: Number(log.blockNumber), + }; + + try { + eventLogHandlers.current[log.args.eventName]?.(parseEventLogData(log.args.eventData), txnOpts); + } catch (e) { + // eslint-disable-next-line no-console + console.error("error parsing event", e); + } + } + }, + strict: true, }); return () => { - filters.forEach((filter) => { - provider.off(filter, handleCommonLog); - }); + unsubscribeEventLog1(); + unsubscribeEventLog2(); }; } -export function subscribeToTransferEvents( - chainId: ContractsChainId, - provider: Provider, - account: string, - marketTokensAddresses: string[], - onTransfer: (tokenAddress: string, amount: bigint) => void -) { +export function subscribeToTransferEvents({ + chainId, + account, + marketTokensAddresses, + onTransfer, +}: { + chainId: ContractsChainId; + account: string; + marketTokensAddresses: string[]; + onTransfer: (tokenAddress: string, amount: bigint) => void; +}) { + const client = getPublicClientWithRpc(chainId, { withWs: true }); + const vaults = [ tryGetContract(chainId, "OrderVault"), tryGetContract(chainId, "ShiftVault"), tryGetContract(chainId, "DepositVault"), tryGetContract(chainId, "WithdrawalVault"), tryGetContract(chainId, "GlvVault"), - ].filter(Boolean); - const vaultHashes = vaults.map((vault) => coder.encode(["address"], [vault])); - - const senderHashes = [ZeroAddress, ...marketTokensAddresses].map((address) => coder.encode(["address"], [address])); + ].filter((v): v is string => Boolean(v)); - const accountHash = coder.encode(["address"], [account]); + const senders = [zeroAddress, ...marketTokensAddresses]; const tokenAddresses = getTokens(chainId) .filter((token) => !token.isSynthetic && isAddress(token.address) && token.address !== NATIVE_TOKEN_ADDRESS) .map((token) => token.address); const allTokenAddresses = [...marketTokensAddresses, ...tokenAddresses]; - const tokenContract = new ethers.Contract(ZeroAddress, abis.Token, provider); - - const sendFilters: ProviderEvent = { + const unsubscribeSend = client.watchContractEvent({ + abi: abis.Token, + eventName: "Transfer", address: allTokenAddresses, - topics: [TRANSFER_HASH, accountHash, vaultHashes], - }; + args: { + from: account, + to: vaults, + }, + onLogs: (logs) => { + for (const log of logs) { + const tokenAddress = log.address; + const amount = log.args.value; + onTransfer(tokenAddress, -amount); + } + }, + strict: true, + }); - const receiveFilters: ProviderEvent = { + const unsubscribeReceive = client.watchContractEvent({ + abi: abis.Token, + eventName: "Transfer", address: allTokenAddresses, - topics: [TRANSFER_HASH, senderHashes, accountHash], - }; - - const handleSend = (log: LogParams) => { - const tokenAddress = log.address; - const data = tokenContract.interface.parseLog(log); - - if (!data) { - return; - } - - const amount = BigInt(data.args[2]); - - onTransfer(tokenAddress, -amount); - }; - - const handleReceive = (log: LogParams) => { - const tokenAddress = log.address; - const data = tokenContract.interface.parseLog(log); - - if (!data) { - return; - } - - const amount = BigInt(data.args[2]); - - onTransfer(tokenAddress, amount); - }; - - provider.on(sendFilters, handleSend); - provider.on(receiveFilters, handleReceive); + args: { + from: senders, + to: account, + }, + onLogs: (logs) => { + for (const log of logs) { + const tokenAddress = log.address; + const amount = log.args.value; + onTransfer(tokenAddress, amount); + } + }, + strict: true, + }); return () => { - provider.off(sendFilters, handleSend); - provider.off(receiveFilters, handleReceive); + unsubscribeSend(); + unsubscribeReceive(); }; } -export function subscribeToApprovalEvents( - chainId: ContractsChainId, - provider: Provider, - account: string, - onApprove: (tokenAddress: string, spender: string, value: bigint) => void -) { +export function subscribeToApprovalEvents({ + chainId, + account, + onApprove, +}: { + chainId: ContractsChainId; + account: string; + onApprove: (tokenAddress: string, spender: string, value: bigint) => void; +}) { + const client = getPublicClientWithRpc(chainId, { withWs: true }); + const spenders = [ - ZeroAddress, + zeroAddress, tryGetContract(chainId, "StakedGmxTracker"), tryGetContract(chainId, "GlpManager"), tryGetContract(chainId, "SyntheticsRouter"), tryGetContract(chainId, "Router"), - ].filter(Boolean); + ].filter((s): s is string => Boolean(s)); - const spenderTopics = spenders.map((spender) => AbiCoder.defaultAbiCoder().encode(["address"], [spender])); - const addressHash = AbiCoder.defaultAbiCoder().encode(["address"], [account]); const tokenAddresses = getTokens(chainId) .filter((token) => isAddress(token.address) && token.address !== NATIVE_TOKEN_ADDRESS) .map((token) => token.address); - const approvalsFilter: ProviderEvent = { + const unsubscribe = client.watchContractEvent({ + abi: abis.Token, + eventName: "Approval", address: tokenAddresses, - topics: [APPROVED_HASH, addressHash, spenderTopics], - }; - - const handleApprovalsLog = (log: LogParams) => { - const tokenAddress = log.address; - const spender = ethers.AbiCoder.defaultAbiCoder().decode(["address"], log.topics[2])[0]; - const value = ethers.AbiCoder.defaultAbiCoder().decode(["uint256"], log.data)[0]; - - onApprove(tokenAddress, spender, value); - }; - - provider.on(approvalsFilter, handleApprovalsLog); + args: { + owner: account, + spender: spenders, + }, + onLogs: (logs) => { + for (const log of logs) { + const tokenAddress = log.address; + const spender = log.args.spender; + const value = log.args.value; + onApprove(tokenAddress, spender, value); + } + }, + strict: true, + }); return () => { - provider.off(approvalsFilter, handleApprovalsLog); + unsubscribe(); }; } @@ -295,157 +268,174 @@ export type OftSentInfo = { txnHash: string; } & ContractEventArgsFromTopics; -export function subscribeToOftSentEvents( - provider: Provider, - account: string, - stargates: string[], - onOftSent: (info: OftSentInfo) => void -): () => void { - const addressHash = AbiCoder.defaultAbiCoder().encode(["address"], [account]); - - const providerFilter: ProviderEvent = { +export function subscribeToOftSentEvents({ + chainId, + account, + stargates, + onOftSent, +}: { + chainId: ContractsChainId | SourceChainId; + account: string; + stargates: string[]; + onOftSent: (info: OftSentInfo) => void; +}): () => void { + const client = getPublicClientWithRpc(chainId, { withWs: true }); + + const unsubscribe = client.watchContractEvent({ + abi: OFT_SENT_ABI, + eventName: "OFTSent", address: stargates, - topics: [OFT_SENT_HASH, null, addressHash], - }; - - const handleOftSentLog = (log: LogParams) => { - const args = decodeEventLog({ - abi: OFT_SENT_ABI, - eventName: "OFTSent", - topics: log.topics as any, - data: log.data as Hex, - }).args; - - onOftSent({ - sender: log.address, - txnHash: log.transactionHash, - ...args, - }); - }; - - provider.on(providerFilter, handleOftSentLog); + args: { + fromAddress: account, + }, + onLogs: (logs) => { + for (const log of logs) { + onOftSent({ + sender: log.address, + txnHash: log.transactionHash, + ...log.args, + }); + } + }, + strict: true, + }); return () => { - provider.off(providerFilter, handleOftSentLog); + unsubscribe(); }; } -export function subscribeToOftReceivedEvents( - provider: Provider, - stargates: string[], - guids: string[], +export function subscribeToOftReceivedEvents({ + chainId, + stargates, + guids, + onOftReceive, +}: { + chainId: ContractsChainId | SourceChainId; + stargates: string[]; + guids: string[]; onOftReceive: ( info: { sender: string; txnHash: string } & ContractEventArgsFromTopics - ) => void -) { + ) => void; +}) { if (guids.length === 0) { return undefined; } - const providerFilter: ProviderEvent = { - address: stargates, - topics: [OFT_RECEIVED_HASH, guids, null], - }; - - const handleOftReceivedLog = (log: LogParams) => { - const args = decodeEventLog({ - abi: OFT_RECEIVED_ABI, - eventName: "OFTReceived", - topics: log.topics as any, - data: log.data as Hex, - }).args; - - onOftReceive({ - sender: log.address, - txnHash: log.transactionHash, - ...args, - }); - }; + const client = getPublicClientWithRpc(chainId, { withWs: true }); - provider.on(providerFilter, handleOftReceivedLog); + const unsubscribe = client.watchContractEvent({ + abi: OFT_RECEIVED_ABI, + eventName: "OFTReceived", + address: stargates, + args: { + guid: guids, + }, + onLogs: (logs) => { + for (const log of logs) { + onOftReceive({ + sender: log.address, + txnHash: log.transactionHash, + ...log.args, + }); + } + }, + strict: true, + }); return () => { - provider.off(providerFilter, handleOftReceivedLog); + unsubscribe(); }; } -export function subscribeToComposeDeliveredEvents( - provider: Provider, - layerZeroEndpoint: string, - guids: string[], +export function subscribeToComposeDeliveredEvents({ + chainId, + layerZeroEndpoint, + guids, + onComposeDelivered, +}: { + chainId: ContractsChainId; + layerZeroEndpoint: string; + guids: string[]; onComposeDelivered: ( info: { sender: string; txnHash: string } & ContractEventArgsFromTopics< typeof COMPOSE_DELIVERED_ABI, "ComposeDelivered" > - ) => void -) { + ) => void; +}) { if (guids.length === 0) { return undefined; } - const providerFilter: ProviderEvent = { - address: layerZeroEndpoint, - topics: [COMPOSE_DELIVERED_HASH], - }; - - const handleComposeDeliveredLog = (log: LogParams) => { - const args = decodeEventLog({ - abi: COMPOSE_DELIVERED_ABI, - eventName: "ComposeDelivered", - topics: log.topics as any, - data: log.data as Hex, - }).args; - - // Manual filtering because event params are not indexed - if (!guids.includes(args.guid)) { - return; - } - - onComposeDelivered({ - sender: log.address, - txnHash: log.transactionHash, - ...args, - }); - }; + const client = getPublicClientWithRpc(chainId, { withWs: true }); - provider.on(providerFilter, handleComposeDeliveredLog); + const unsubscribe = client.watchContractEvent({ + abi: COMPOSE_DELIVERED_ABI, + eventName: "ComposeDelivered", + address: layerZeroEndpoint, + onLogs: (logs) => { + for (const log of logs) { + // Manual filtering because event params are not indexed + if (!guids.includes(log.args.guid)) { + continue; + } + + onComposeDelivered({ + sender: log.address, + txnHash: log.transactionHash, + ...log.args, + }); + } + }, + strict: true, + }); return () => { - provider.off(providerFilter, handleComposeDeliveredLog); + unsubscribe(); }; } -export function subscribeToMultichainApprovalEvents( - provider: Provider, - account: string, - tokenAddresses: string[], - spenders: string[], - onApprove: (tokenAddress: string, spender: string, value: bigint) => void -) { - const spenderTopics = spenders.map((spender) => AbiCoder.defaultAbiCoder().encode(["address"], [spender])); - const addressHash = AbiCoder.defaultAbiCoder().encode(["address"], [account]); - - const approvalsFilter: ProviderEvent = { +export function subscribeToMultichainApprovalEvents({ + srcChainId, + account, + tokenAddresses, + spenders, + onApprove, +}: { + srcChainId: SourceChainId; + account: string; + tokenAddresses: string[]; + spenders: string[]; + onApprove: (tokenAddress: string, spender: string, value: bigint) => void; +}) { + const client = getPublicClientWithRpc(srcChainId, { withWs: true }); + + const unsubscribe = client.watchContractEvent({ + abi: abis.ERC20, + eventName: "Approval", address: tokenAddresses, - topics: [APPROVED_HASH, addressHash, spenderTopics], - }; - - const handleApprovalsLog = (log: LogParams) => { - const tokenAddress = log.address; - const spender = ethers.AbiCoder.defaultAbiCoder().decode(["address"], log.topics[2])[0]; - const value = ethers.AbiCoder.defaultAbiCoder().decode(["uint256"], log.data)[0]; - onApprove(tokenAddress, spender, value); - }; - - provider.on(approvalsFilter, handleApprovalsLog); + args: { + owner: account, + spender: spenders, + }, + onLogs: (logs) => { + for (const log of logs) { + const tokenAddress = log.address; + const spender = log.args.spender; + const value = log.args.value; + onApprove(tokenAddress, spender, value); + } + }, + strict: true, + }); return () => { - provider.off(approvalsFilter, handleApprovalsLog); + unsubscribe(); }; } -export function parseEventLogData(eventData): EventLogData { +export function parseEventLogData(eventData: RawEventLogData): EventLogData { const ret: any = {}; for (const typeKey of [ "addressItems", @@ -470,105 +460,68 @@ export function parseEventLogData(eventData): EventLogData { return ret as EventLogData; } -function createV2EventFilters(chainId: ContractsChainId, account: string, wsProvider: Provider): ProviderEvent[] { - const addressHash = AbiCoder.defaultAbiCoder().encode(["address"], [account]); - const eventEmitter = new ethers.Contract(getContract(chainId, "EventEmitter"), abis.EventEmitter, wsProvider); - const EVENT_LOG_TOPIC = eventEmitter.interface.getEvent("EventLog")?.topicHash ?? null; - const EVENT_LOG1_TOPIC = eventEmitter.interface.getEvent("EventLog1")?.topicHash ?? null; - const EVENT_LOG2_TOPIC = eventEmitter.interface.getEvent("EventLog2")?.topicHash ?? null; - - const GLV_TOPICS_FILTER = [ - GLV_DEPOSIT_CREATED_HASH, - GLV_DEPOSIT_CANCELLED_HASH, - GLV_DEPOSIT_EXECUTED_HASH, - GLV_WITHDRAWAL_CREATED_HASH, - GLV_WITHDRAWAL_EXECUTED_HASH, - GLV_WITHDRAWAL_CANCELLED_HASH, - ]; - - return [ - // DEPOSITS AND WITHDRAWALS AND SHIFTS - { - address: getContract(chainId, "EventEmitter"), - topics: [ - EVENT_LOG2_TOPIC, - [DEPOSIT_CREATED_HASH, WITHDRAWAL_CREATED_HASH, SHIFT_CREATED_HASH], - null, - addressHash, - ], - }, - { - address: getContract(chainId, "EventEmitter"), - topics: [ - EVENT_LOG_TOPIC, - [DEPOSIT_CANCELLED_HASH, DEPOSIT_EXECUTED_HASH, WITHDRAWAL_CANCELLED_HASH, WITHDRAWAL_EXECUTED_HASH], - ], - }, - // NEW CONTRACTS - { - address: getContract(chainId, "EventEmitter"), - topics: [ - EVENT_LOG2_TOPIC, - [ - DEPOSIT_CANCELLED_HASH, - DEPOSIT_EXECUTED_HASH, - - WITHDRAWAL_CANCELLED_HASH, - WITHDRAWAL_EXECUTED_HASH, - - SHIFT_CANCELLED_HASH, - SHIFT_EXECUTED_HASH, +type ViemEventFilter = ContractEventName> = { + [key in eventName]: { + eventName: key; + args: ContractEventArgs; + }; +}[eventName]; + +function createV2EventFilters(account: string): { + EventLog1: ViemEventFilter; + EventLog2: ViemEventFilter; +} { + const addressHash = encodeAddress(account); + + return { + // POSITIONS AND MULTICHAIN - All EventLog1 with same topic1 + EventLog1: { + eventName: "EventLog1", + args: { + eventNameHash: [ + "PositionIncrease", + "PositionDecrease", + + "MultichainBridgeIn", + "MultichainTransferOut", + "MultichainTransferIn", ], - null, - addressHash, - ], - }, - // ORDERS - { - address: getContract(chainId, "EventEmitter"), - topics: [EVENT_LOG2_TOPIC, ORDER_CREATED_HASH, null, addressHash], - }, - { - address: getContract(chainId, "EventEmitter"), - topics: [EVENT_LOG1_TOPIC, [ORDER_CANCELLED_HASH, ORDER_UPDATED_HASH, ORDER_EXECUTED_HASH]], - }, - // NEW CONTRACTS - { - address: getContract(chainId, "EventEmitter"), - topics: [EVENT_LOG2_TOPIC, [ORDER_CANCELLED_HASH, ORDER_UPDATED_HASH, ORDER_EXECUTED_HASH], null, addressHash], - }, - // POSITIONS - { - address: getContract(chainId, "EventEmitter"), - topics: [EVENT_LOG1_TOPIC, [POSITION_INCREASE_HASH, POSITION_DECREASE_HASH], addressHash], - }, - // GLV DEPOSITS - { - address: getContract(chainId, "EventEmitter"), - topics: [EVENT_LOG_TOPIC, GLV_TOPICS_FILTER, null, addressHash], + topic1: addressHash, + }, }, - { - address: getContract(chainId, "EventEmitter"), - topics: [EVENT_LOG1_TOPIC, GLV_TOPICS_FILTER, null, addressHash], - }, - { - address: getContract(chainId, "EventEmitter"), - topics: [EVENT_LOG2_TOPIC, GLV_TOPICS_FILTER, null, addressHash], - }, - // Multichain - { - address: getContract(chainId, "EventEmitter"), - topics: [ - EVENT_LOG1_TOPIC, - [MULTICHAIN_BRIDGE_IN_HASH, MULTICHAIN_TRANSFER_OUT_HASH, MULTICHAIN_TRANSFER_IN_HASH], - addressHash, - ], + // DEPOSITS, WITHDRAWALS, SHIFTS, ORDERS, AND GLV - All EventLog2 with same topic1/topic2 + EventLog2: { + eventName: "EventLog2", + args: { + eventNameHash: [ + "DepositCreated", + "DepositCancelled", + "DepositExecuted", + + "WithdrawalCreated", + "WithdrawalCancelled", + "WithdrawalExecuted", + + "ShiftCreated", + "ShiftCancelled", + "ShiftExecuted", + + "OrderCreated", + "OrderCancelled", + "OrderUpdated", + "OrderExecuted", + + "GlvDepositCreated", + "GlvDepositCancelled", + "GlvDepositExecuted", + + "GlvWithdrawalCreated", + "GlvWithdrawalExecuted", + "GlvWithdrawalCancelled", + ], + topic1: null, + topic2: addressHash, + }, }, - ]; -} - -export function getTotalSubscribersEventsCount(chainId: ContractsChainId, provider: Provider, { v2 }: { v2: boolean }) { - const v1Count = 0; - const v2Count = v2 ? createV2EventFilters(chainId, ZeroAddress, provider).length : 0; - return v1Count + v2Count; + }; } diff --git a/src/domain/multichain/fallbackCustomError.tsx b/src/domain/multichain/fallbackCustomError.tsx index c262726cbf..545d19192a 100644 --- a/src/domain/multichain/fallbackCustomError.tsx +++ b/src/domain/multichain/fallbackCustomError.tsx @@ -1,36 +1,24 @@ -import { BaseError, decodeErrorResult, Hex } from "viem"; - -import { CustomError, extendError, getCustomError, OrderErrorContext } from "lib/errors"; -import { abis } from "sdk/abis"; +import { decodeErrorFromViemError } from "lib/errors"; +import { CustomError, extendError, OrderErrorContext } from "lib/errors"; export async function fallbackCustomError(f: () => Promise, errorContext: OrderErrorContext) { try { return await f(); } catch (error) { - if ("walk" in error && typeof error.walk === "function") { - const errorWithData = (error as BaseError).walk((e) => "data" in (e as any)) as (Error & { data: string }) | null; - - if (errorWithData && errorWithData.data) { - const data = errorWithData.data; - - const decodedError = decodeErrorResult({ - abi: abis.CustomErrors, - data: data as Hex, - }); - - const prettyError = new CustomError({ - name: decodedError.errorName, - message: JSON.stringify(decodedError, null, 2), - args: decodedError.args, - }); + const parsedError = decodeErrorFromViemError(error); + if (parsedError) { + const prettyError = new CustomError({ + name: parsedError.name, + message: JSON.stringify(parsedError, null, 2), + args: parsedError.args, + }); - throw extendError(prettyError, { - errorContext, - }); - } + throw extendError(prettyError, { + errorContext, + }); } - throw extendError(getCustomError(error), { + throw extendError(error, { errorContext, }); } diff --git a/src/domain/multichain/sendSameChainDepositTxn.ts b/src/domain/multichain/sendSameChainDepositTxn.ts index 2efc6c076b..f268d41899 100644 --- a/src/domain/multichain/sendSameChainDepositTxn.ts +++ b/src/domain/multichain/sendSameChainDepositTxn.ts @@ -1,5 +1,4 @@ -import { Contract } from "ethers"; -import { Address, encodeFunctionData, zeroAddress } from "viem"; +import { encodeFunctionData, zeroAddress } from "viem"; import type { SettlementChainId } from "config/chains"; import { getContract } from "config/contracts"; @@ -24,12 +23,7 @@ export async function sendSameChainDepositTxn({ callback?: TxnCallback; }) { const multichainVaultAddress = getContract(chainId, "MultichainVault"); - - const contract = new Contract( - getContract(chainId, "MultichainTransferRouter")!, - abis.MultichainTransferRouter, - signer - ); + const multichainTransferRouterAddress = getContract(chainId, "MultichainTransferRouter"); if (tokenAddress === zeroAddress) { const token = getToken(chainId, tokenAddress); @@ -39,47 +33,54 @@ export async function sendSameChainDepositTxn({ throw new Error("Wrapped address is not set"); } + const encodedCalls = [ + encodeFunctionData({ + abi: abis.MultichainTransferRouter, + functionName: "sendWnt", + args: [multichainVaultAddress, amount], + }), + encodeFunctionData({ + abi: abis.MultichainTransferRouter, + functionName: "bridgeIn", + args: [account, wrappedAddress], + }), + ]; + await sendWalletTransaction({ chainId: chainId, signer: signer, - to: await contract.getAddress(), - callData: contract.interface.encodeFunctionData("multicall", [ - [ - encodeFunctionData({ - abi: abis.MultichainTransferRouter, - functionName: "sendWnt", - args: [multichainVaultAddress, amount], - }), - encodeFunctionData({ - abi: abis.MultichainTransferRouter, - functionName: "bridgeIn", - args: [account, wrappedAddress as Address], - }), - ], - ]), + to: multichainTransferRouterAddress, + callData: encodeFunctionData({ + abi: abis.MultichainTransferRouter, + functionName: "multicall", + args: [encodedCalls], + }), value: amount, callback, }); } else { + const encodedCalls = [ + encodeFunctionData({ + abi: abis.MultichainTransferRouter, + functionName: "sendTokens", + args: [tokenAddress, multichainVaultAddress, amount], + }), + encodeFunctionData({ + abi: abis.MultichainTransferRouter, + functionName: "bridgeIn", + args: [account, tokenAddress], + }), + ]; + await sendWalletTransaction({ chainId: chainId, signer: signer, - to: await contract.getAddress(), - callData: contract.interface.encodeFunctionData("multicall", [ - [ - encodeFunctionData({ - abi: abis.MultichainTransferRouter, - functionName: "sendTokens", - args: [tokenAddress as Address, multichainVaultAddress, amount], - }), - - encodeFunctionData({ - abi: abis.MultichainTransferRouter, - functionName: "bridgeIn", - args: [account, tokenAddress as Address], - }), - ], - ]), + to: multichainTransferRouterAddress, + callData: encodeFunctionData({ + abi: abis.MultichainTransferRouter, + functionName: "multicall", + args: [encodedCalls], + }), callback, }); } diff --git a/src/domain/multichain/toastCustomOrStargateError.ts b/src/domain/multichain/toastCustomOrStargateError.ts index 4155953e5d..c717a7f045 100644 --- a/src/domain/multichain/toastCustomOrStargateError.ts +++ b/src/domain/multichain/toastCustomOrStargateError.ts @@ -1,7 +1,9 @@ +import type { CallExceptionError, EthersError } from "ethers"; import { Abi, decodeErrorResult } from "viem"; import type { AnyChainId } from "config/chains"; import { StargateErrorsAbi } from "config/multichain"; +import { extractErrorDataFromViemError } from "lib/errors"; import { helperToast } from "lib/helperToast"; import { abis } from "sdk/abis"; @@ -11,7 +13,10 @@ export function toastCustomOrStargateError(chainId: AnyChainId, error: Error) { let prettyErrorName = error.name; let prettyErrorMessage = error.message; - const data = (error as any)?.info?.error?.data ?? (error as any)?.data; + const data = + extractErrorDataFromViemError(error) ?? + (error as EthersError)?.info?.error?.data ?? + (error as CallExceptionError)?.data; if (data) { try { const parsedError = decodeErrorResult({ diff --git a/src/domain/multichain/types.ts b/src/domain/multichain/types.ts index 265602f57c..4acf46752e 100644 --- a/src/domain/multichain/types.ts +++ b/src/domain/multichain/types.ts @@ -57,7 +57,7 @@ export type OFTReceipt = { export type QuoteOft = { limit: OFTLimit; - oftFeeDetails: OFTFeeDetail[]; + oftFeeDetails: readonly OFTFeeDetail[] | OFTFeeDetail[]; receipt: OFTReceipt; }; diff --git a/src/domain/multichain/useQuoteOft.ts b/src/domain/multichain/useQuoteOft.ts index 090f485ec6..f0c0b34821 100644 --- a/src/domain/multichain/useQuoteOft.ts +++ b/src/domain/multichain/useQuoteOft.ts @@ -1,51 +1,49 @@ -import { Contract, Provider } from "ethers"; import useSWR from "swr"; import type { AnyChainId } from "config/chains"; -import { IStargateAbi } from "config/multichain"; import { CONFIG_UPDATE_INTERVAL } from "lib/timeConstants"; -import { IStargate } from "typechain-types-stargate"; +import { getPublicClientWithRpc } from "lib/wallets/rainbowKitConfig"; +import { abis } from "sdk/abis"; -import type { OFTFeeDetail, OFTLimit, OFTReceipt, QuoteOft, SendParam } from "./types"; +import type { QuoteOft, SendParam } from "./types"; export function useQuoteOft({ sendParams, fromStargateAddress, - fromChainProvider, fromChainId, toChainId, }: { sendParams: SendParam | undefined; fromStargateAddress: string | undefined; - fromChainProvider: Provider | undefined; fromChainId: AnyChainId | undefined; toChainId: AnyChainId | undefined; }): QuoteOft | undefined { const quoteOftCondition = sendParams !== undefined && fromStargateAddress !== undefined && - fromChainProvider !== undefined && toChainId !== undefined && fromChainId !== undefined && fromChainId !== toChainId; const quoteOftQuery = useSWR( - quoteOftCondition ? ["quoteOft", sendParams.dstEid, sendParams.to, sendParams.amountLD, fromStargateAddress] : null, + quoteOftCondition + ? ["quoteOft", sendParams.dstEid, sendParams.to, sendParams.amountLD, fromStargateAddress, fromChainId] + : null, { fetcher: async () => { - if (!quoteOftCondition) { + if (!quoteOftCondition || !fromChainId) { return; } - const iStargateInstance = new Contract( - fromStargateAddress, - IStargateAbi, - fromChainProvider - ) as unknown as IStargate; + const publicClient = getPublicClientWithRpc(fromChainId); // TODO: add timing metrics - const [limit, oftFeeDetails, receipt]: [OFTLimit, OFTFeeDetail[], OFTReceipt] = - await iStargateInstance.quoteOFT(sendParams); + const [limit, oftFeeDetails, receipt] = await publicClient.readContract({ + address: fromStargateAddress, + abi: abis.IStargate, + functionName: "quoteOFT", + args: [sendParams], + }); return { limit, diff --git a/src/domain/referrals/hooks/index.ts b/src/domain/referrals/hooks/index.ts index e65051110e..1749e5258b 100644 --- a/src/domain/referrals/hooks/index.ts +++ b/src/domain/referrals/hooks/index.ts @@ -1,8 +1,8 @@ import { gql } from "@apollo/client"; -import { BigNumberish, ethers, isAddress, Signer } from "ethers"; +import { BigNumberish, ethers, Signer } from "ethers"; import { useEffect, useMemo, useState } from "react"; import useSWR from "swr"; -import { Hash, zeroAddress } from "viem"; +import { Hash, isAddress, zeroAddress, zeroHash } from "viem"; import { BOTANIX } from "config/chains"; import { getContract } from "config/contracts"; @@ -12,8 +12,8 @@ import { helperToast } from "lib/helperToast"; import { getReferralsGraphClient } from "lib/indexers"; import { isAddressZero, isHashZero } from "lib/legacy"; import { basisPointsToFloat } from "lib/numbers"; -import { getProvider } from "lib/rpc"; import { CONFIG_UPDATE_INTERVAL } from "lib/timeConstants"; +import { getPublicClientWithRpc } from "lib/wallets/rainbowKitConfig"; import { abis } from "sdk/abis"; import { ContractsChainId } from "sdk/configs/chains"; import { decodeReferralCode, encodeReferralCode } from "sdk/utils/referrals"; @@ -164,9 +164,13 @@ export async function getReferralCodeOwner(chainId: ContractsChainId, referralCo if (referralStorageAddress === zeroAddress) { return zeroAddress; } - const provider = getProvider(undefined, chainId); - const contract = new ethers.Contract(referralStorageAddress, abis.ReferralStorage, provider); - const codeOwner = await contract.codeOwners(referralCode); + const publicClient = getPublicClientWithRpc(chainId); + const codeOwner = await publicClient.readContract({ + address: referralStorageAddress, + abi: abis.ReferralStorage, + functionName: "codeOwners", + args: [referralCode], + }); return codeOwner; } @@ -195,7 +199,7 @@ export function useUserReferralCode(signer, chainId, account, skipLocalReferralC let attachedOnChain = false; let userReferralCode: string | undefined = undefined; let userReferralCodeString: string | undefined = undefined; - let referralCodeForTxn = ethers.ZeroHash; + let referralCodeForTxn: string = zeroHash; if (skipLocalReferralCode || (onChainCode && !isHashZero(onChainCode))) { attachedOnChain = true; diff --git a/src/domain/referrals/hooks/useReferralsData.ts b/src/domain/referrals/hooks/useReferralsData.ts index 04722dbe61..add04a6a9a 100644 --- a/src/domain/referrals/hooks/useReferralsData.ts +++ b/src/domain/referrals/hooks/useReferralsData.ts @@ -1,8 +1,9 @@ import { gql } from "@apollo/client"; -import { BigNumberish, ethers } from "ethers"; +import { BigNumberish } from "ethers"; import { useEffect, useState } from "react"; +import { getAddress } from "viem"; -import { ContractsChainId, CONTRACTS_CHAIN_IDS } from "config/chains"; +import { CONTRACTS_CHAIN_IDS, ContractsChainId } from "config/chains"; import { getReferralsGraphClient, REFERRAL_SUPPORTED_CHAIN_IDS } from "lib/indexers"; import { BN_ZERO } from "lib/numbers"; import { EMPTY_ARRAY } from "lib/objects"; @@ -119,9 +120,9 @@ export function useReferralsData(account?: string | null) { res.data.distributions.forEach((d) => { const item = { typeId: d.typeId, - receiver: ethers.getAddress(d.receiver), - markets: d.markets.map((market) => ethers.getAddress(market)), - tokens: d.tokens.map((token) => ethers.getAddress(token)), + receiver: getAddress(d.receiver), + markets: d.markets.map((market) => getAddress(market)), + tokens: d.tokens.map((token) => getAddress(token)), amounts: d.amounts.map((a) => BigInt(a)), amountsInUsd: d.amountsInUsd.map((a) => BigInt(a)), timestamp: parseInt(d.timestamp), diff --git a/src/domain/synthetics/__tests__/fees/priceImpact.spec.ts b/src/domain/synthetics/__tests__/fees/priceImpact.spec.ts index 93bf494695..767ecf63b5 100644 --- a/src/domain/synthetics/__tests__/fees/priceImpact.spec.ts +++ b/src/domain/synthetics/__tests__/fees/priceImpact.spec.ts @@ -1,4 +1,4 @@ -import { ethers } from "ethers"; +import { parseUnits } from "viem"; import { describe, expect, it } from "vitest"; import { applyImpactFactor } from "domain/synthetics/fees"; @@ -41,9 +41,9 @@ describe("applyImpactFactor", () => { ]) { it(`should keep difference >1/1e10 from the contract value: ${expected}`, () => { const result = applyImpactFactor( - ethers.parseUnits(String(diffUsd), 30), - ethers.parseUnits(String(impactFactor), 30), - ethers.parseUnits(String(exponentFactor), 30) + parseUnits(String(diffUsd), 30), + parseUnits(String(impactFactor), 30), + parseUnits(String(exponentFactor), 30) ); const _expected = BigInt(expected); diff --git a/src/domain/synthetics/claimHistory/useClaimHistory.ts b/src/domain/synthetics/claimHistory/useClaimHistory.ts index 78cbee5269..e5ca22d4a4 100644 --- a/src/domain/synthetics/claimHistory/useClaimHistory.ts +++ b/src/domain/synthetics/claimHistory/useClaimHistory.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; -import { getAddress } from "ethers"; import { useMemo } from "react"; import useSWRInfinite, { SWRInfiniteResponse } from "swr/infinite"; +import { getAddress } from "viem"; import { useSettings } from "context/SettingsContext/SettingsContextProvider"; import { useMarketsInfoData, useTokensData } from "context/SyntheticsStateContext/hooks/globalsHooks"; diff --git a/src/domain/synthetics/express/expressOrderUtils.ts b/src/domain/synthetics/express/expressOrderUtils.ts index c7e5b96790..5e5679020a 100644 --- a/src/domain/synthetics/express/expressOrderUtils.ts +++ b/src/domain/synthetics/express/expressOrderUtils.ts @@ -1025,7 +1025,7 @@ export async function signSetTraderReferralCode({ srcChainId, shouldUseSignerMethod, }: { - signer: AbstractSigner; + signer: AbstractSigner | ISigner; relayParams: RelayParamsPayload; referralCode: string; chainId: ContractsChainId; diff --git a/src/domain/synthetics/fees/useRebatesInfo.ts b/src/domain/synthetics/fees/useRebatesInfo.ts index 9089db805d..ff692563b4 100644 --- a/src/domain/synthetics/fees/useRebatesInfo.ts +++ b/src/domain/synthetics/fees/useRebatesInfo.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; -import { getAddress } from "ethers"; import { useMemo } from "react"; import useSWR from "swr"; +import { getAddress } from "viem"; import { getSubsquidGraphClient } from "lib/indexers"; import { expandDecimals, PRECISION } from "lib/numbers"; diff --git a/src/domain/synthetics/markets/createDepositTxn.ts b/src/domain/synthetics/markets/createDepositTxn.ts index 137eecc374..ead3b54acb 100644 --- a/src/domain/synthetics/markets/createDepositTxn.ts +++ b/src/domain/synthetics/markets/createDepositTxn.ts @@ -1,5 +1,6 @@ import { t } from "@lingui/macro"; import { Contract, Signer } from "ethers"; +import { Abi, encodeFunctionData } from "viem"; import { getContract } from "config/contracts"; import type { SetPendingDeposit } from "context/SyntheticsEvents"; @@ -96,9 +97,13 @@ export async function createDepositTxn({ }, ]; - const encodedPayload = multicall - .filter(Boolean) - .map((call) => contract.interface.encodeFunctionData(call!.method, call!.params)); + const encodedPayload = multicall.filter(Boolean).map((call) => + encodeFunctionData({ + abi: abis.ExchangeRouter as Abi, + functionName: call!.method, + args: call!.params, + }) + ); const simulationPromise = !skipSimulation ? simulateExecuteTxn(chainId, { diff --git a/src/domain/synthetics/markets/createGlvDepositTxn.ts b/src/domain/synthetics/markets/createGlvDepositTxn.ts index 91dedda10c..483fe7ff30 100644 --- a/src/domain/synthetics/markets/createGlvDepositTxn.ts +++ b/src/domain/synthetics/markets/createGlvDepositTxn.ts @@ -1,5 +1,6 @@ import { t } from "@lingui/macro"; import { Signer, ethers } from "ethers"; +import { Abi, encodeFunctionData } from "viem"; import { getContract } from "config/contracts"; import type { SetPendingDeposit } from "context/SyntheticsEvents"; @@ -102,9 +103,13 @@ export async function createGlvDepositTxn({ }, ]; - const encodedPayload = multicall - .filter(Boolean) - .map((call) => contract.interface.encodeFunctionData(call!.method, call!.params)); + const encodedPayload = multicall.filter(Boolean).map((call) => + encodeFunctionData({ + abi: abis.GlvRouter as Abi, + functionName: call!.method, + args: call!.params, + }) + ); const simulationPromise = !skipSimulation ? simulateExecuteTxn(chainId, { diff --git a/src/domain/synthetics/markets/createGlvWithdrawalTxn.ts b/src/domain/synthetics/markets/createGlvWithdrawalTxn.ts index 8596c1e955..c9ebfb1cf3 100644 --- a/src/domain/synthetics/markets/createGlvWithdrawalTxn.ts +++ b/src/domain/synthetics/markets/createGlvWithdrawalTxn.ts @@ -1,5 +1,6 @@ import { t } from "@lingui/macro"; import { ethers } from "ethers"; +import { Abi, ContractFunctionParameters, encodeFunctionData, zeroAddress } from "viem"; import { getContract } from "config/contracts"; import { UI_FEE_RECEIVER_ACCOUNT } from "config/ui"; @@ -10,7 +11,6 @@ import { BlockTimestampData } from "lib/useBlockTimestampRequest"; import { WalletSigner } from "lib/wallets"; import { abis } from "sdk/abis"; import type { ContractsChainId } from "sdk/configs/chains"; -import { IGlvWithdrawalUtils } from "typechain-types/GlvRouter"; import { validateSignerAddress } from "components/Errors/errorToasts"; @@ -61,8 +61,8 @@ export async function createGlvWithdrawalTxn({ { addresses: { receiver: params.addresses.receiver, - callbackContract: ethers.ZeroAddress, - uiFeeReceiver: UI_FEE_RECEIVER_ACCOUNT ?? ethers.ZeroAddress, + callbackContract: zeroAddress, + uiFeeReceiver: UI_FEE_RECEIVER_ACCOUNT ?? zeroAddress, market: params.addresses.market, glv: params.addresses.glv, longTokenSwapPath: params.addresses.longTokenSwapPath, @@ -74,14 +74,18 @@ export async function createGlvWithdrawalTxn({ executionFee: params.executionFee, callbackGasLimit: 0n, dataList: [], - } satisfies IGlvWithdrawalUtils.CreateGlvWithdrawalParamsStruct, - ], + }, + ] satisfies ContractFunctionParameters["args"], }, ]; - const encodedPayload = multicall - .filter(Boolean) - .map((call) => contract.interface.encodeFunctionData(call!.method, call!.params)); + const encodedPayload = multicall.filter(Boolean).map((call) => + encodeFunctionData({ + abi: abis.GlvRouter as Abi, + functionName: call!.method, + args: call!.params, + }) + ); const simulationPromise = !skipSimulation ? simulateExecuteTxn(chainId, { diff --git a/src/domain/synthetics/markets/createShiftTxn.ts b/src/domain/synthetics/markets/createShiftTxn.ts index 6fea23f0a9..d4c15bcff3 100644 --- a/src/domain/synthetics/markets/createShiftTxn.ts +++ b/src/domain/synthetics/markets/createShiftTxn.ts @@ -1,5 +1,6 @@ import { t } from "@lingui/macro"; import { Signer, ethers } from "ethers"; +import { Abi, ContractFunctionParameters, encodeFunctionData, zeroAddress } from "viem"; import { getContract } from "config/contracts"; import { UI_FEE_RECEIVER_ACCOUNT } from "config/ui"; @@ -9,7 +10,6 @@ import { OrderMetricId } from "lib/metrics/types"; import { BlockTimestampData } from "lib/useBlockTimestampRequest"; import { abis } from "sdk/abis"; import type { ContractsChainId } from "sdk/configs/chains"; -import type { IShiftUtils } from "typechain-types/ExchangeRouter"; import { validateSignerAddress } from "components/Errors/errorToasts"; @@ -52,8 +52,8 @@ export async function createShiftTxn(chainId: ContractsChainId, signer: Signer, { addresses: { receiver: p.account, - callbackContract: ethers.ZeroAddress, - uiFeeReceiver: UI_FEE_RECEIVER_ACCOUNT ?? ethers.ZeroAddress, + callbackContract: zeroAddress, + uiFeeReceiver: UI_FEE_RECEIVER_ACCOUNT ?? zeroAddress, fromMarket: p.fromMarketTokenAddress, toMarket: p.toMarketTokenAddress, }, @@ -61,12 +61,18 @@ export async function createShiftTxn(chainId: ContractsChainId, signer: Signer, executionFee: p.executionFee, callbackGasLimit: 0n, dataList: [], - } satisfies IShiftUtils.CreateShiftParamsStruct, - ], + }, + ] satisfies ContractFunctionParameters["args"], }, ]; - const encodedPayload = multicall.map((call) => contract.interface.encodeFunctionData(call!.method, call!.params)); + const encodedPayload = multicall.map((call) => + encodeFunctionData({ + abi: abis.ExchangeRouter as Abi, + functionName: call!.method, + args: call!.params, + }) + ); const simulationPromise = !p.skipSimulation ? simulateExecuteTxn(chainId, { diff --git a/src/domain/synthetics/markets/createSourceChainDepositTxn.ts b/src/domain/synthetics/markets/createSourceChainDepositTxn.ts index 9a30e8a476..ac8e46bdbb 100644 --- a/src/domain/synthetics/markets/createSourceChainDepositTxn.ts +++ b/src/domain/synthetics/markets/createSourceChainDepositTxn.ts @@ -2,7 +2,7 @@ import { t } from "@lingui/macro"; import { encodeFunctionData, zeroAddress } from "viem"; import { SettlementChainId, SourceChainId } from "config/chains"; -import { getMappedTokenId, getMultichainTokenId, IStargateAbi } from "config/multichain"; +import { getMappedTokenId, getMultichainTokenId } from "config/multichain"; import { MultichainAction, MultichainActionType } from "domain/multichain/codecs/CodecUiHelper"; import { getMultichainTransferSendParams } from "domain/multichain/getSendParams"; import { sendQuoteFromNative } from "domain/multichain/sendQuoteFromNative"; @@ -12,6 +12,7 @@ import { CreateDepositParams, RawCreateDepositParams } from "domain/synthetics/m import { adjustForDecimals } from "lib/numbers"; import { sendWalletTransaction, WalletTxnResult } from "lib/transactions"; import { WalletSigner } from "lib/wallets"; +import { abis } from "sdk/abis"; import { convertTokenAddress } from "sdk/configs/tokens"; import { estimateSourceChainDepositFees, SourceChainDepositFees } from "./feeEstimation/estimateSourceChainDepositFees"; @@ -117,7 +118,7 @@ export async function createSourceChainDepositTxn({ } : undefined, callData: encodeFunctionData({ - abi: IStargateAbi, + abi: abis.IStargate, functionName: "sendToken", args: [sendParams, sendQuoteFromNative(ensuredFees.txnEstimatedNativeFee), params.addresses.receiver], }), diff --git a/src/domain/synthetics/markets/createWithdrawalTxn.ts b/src/domain/synthetics/markets/createWithdrawalTxn.ts index 56358922da..42a2f82573 100644 --- a/src/domain/synthetics/markets/createWithdrawalTxn.ts +++ b/src/domain/synthetics/markets/createWithdrawalTxn.ts @@ -1,5 +1,6 @@ import { t } from "@lingui/macro"; import { Signer, ethers } from "ethers"; +import { Abi, encodeFunctionData, zeroAddress } from "viem"; import { getContract } from "config/contracts"; import { UI_FEE_RECEIVER_ACCOUNT } from "config/ui"; @@ -57,11 +58,11 @@ export async function createWithdrawalTxn({ { addresses: { receiver: params.addresses.receiver, - callbackContract: ethers.ZeroAddress, + callbackContract: zeroAddress, market: params.addresses.market, longTokenSwapPath: params.addresses.longTokenSwapPath, shortTokenSwapPath: params.addresses.shortTokenSwapPath, - uiFeeReceiver: UI_FEE_RECEIVER_ACCOUNT ?? ethers.ZeroAddress, + uiFeeReceiver: UI_FEE_RECEIVER_ACCOUNT ?? zeroAddress, }, minLongTokenAmount: params.minLongTokenAmount, minShortTokenAmount: params.minShortTokenAmount, @@ -74,9 +75,13 @@ export async function createWithdrawalTxn({ }, ]; - const encodedPayload = multicall - .filter(Boolean) - .map((call) => contract.interface.encodeFunctionData(call!.method, call!.params)); + const encodedPayload = multicall.filter(Boolean).map((call) => + encodeFunctionData({ + abi: abis.ExchangeRouter as Abi, + functionName: call!.method, + args: call!.params, + }) + ); const simulationPromise = !skipSimulation ? simulateExecuteTxn(chainId, { diff --git a/src/domain/synthetics/markets/signCreateDeposit.ts b/src/domain/synthetics/markets/signCreateDeposit.ts index 9d43e765e5..616aaab347 100644 --- a/src/domain/synthetics/markets/signCreateDeposit.ts +++ b/src/domain/synthetics/markets/signCreateDeposit.ts @@ -2,7 +2,8 @@ import type { AbstractSigner, Wallet } from "ethers"; import type { ContractsChainId, SourceChainId } from "config/chains"; import { getContract } from "config/contracts"; -import { TransferRequests } from "domain/multichain/types"; +import type { TransferRequests } from "domain/multichain/types"; +import type { ISigner } from "lib/transactions/iSigner"; import type { WalletSigner } from "lib/wallets"; import { signTypedData } from "lib/wallets/signing"; @@ -19,7 +20,7 @@ export async function signCreateDeposit({ params, shouldUseSignerMethod, }: { - signer: WalletSigner | Wallet | AbstractSigner; + signer: WalletSigner | Wallet | AbstractSigner | ISigner; relayParams: RelayParamsPayload; transferRequests: TransferRequests; params: CreateDepositParams; diff --git a/src/domain/synthetics/markets/signCreateGlvDeposit.ts b/src/domain/synthetics/markets/signCreateGlvDeposit.ts index 81b4351044..a5a1f30032 100644 --- a/src/domain/synthetics/markets/signCreateGlvDeposit.ts +++ b/src/domain/synthetics/markets/signCreateGlvDeposit.ts @@ -1,8 +1,9 @@ -import { AbstractSigner } from "ethers"; +import type { AbstractSigner } from "ethers"; import type { ContractsChainId, SourceChainId } from "config/chains"; import { getContract } from "config/contracts"; -import { TransferRequests } from "domain/multichain/types"; +import type { TransferRequests } from "domain/multichain/types"; +import type { ISigner } from "lib/transactions/iSigner"; import { signTypedData } from "lib/wallets/signing"; import type { CreateGlvDepositParams } from "."; @@ -19,7 +20,7 @@ export function signCreateGlvDeposit({ }: { chainId: ContractsChainId; srcChainId: SourceChainId | undefined; - signer: AbstractSigner; + signer: AbstractSigner | ISigner; relayParams: RelayParamsPayload; transferRequests: TransferRequests; params: CreateGlvDepositParams; diff --git a/src/domain/synthetics/markets/signCreateWithdrawal.ts b/src/domain/synthetics/markets/signCreateWithdrawal.ts index 02a11a7cb8..ad8587dc26 100644 --- a/src/domain/synthetics/markets/signCreateWithdrawal.ts +++ b/src/domain/synthetics/markets/signCreateWithdrawal.ts @@ -2,7 +2,8 @@ import type { AbstractSigner, Wallet } from "ethers"; import type { ContractsChainId, SourceChainId } from "config/chains"; import { getContract } from "config/contracts"; -import { TransferRequests } from "domain/multichain/types"; +import type { TransferRequests } from "domain/multichain/types"; +import type { ISigner } from "lib/transactions/iSigner"; import type { WalletSigner } from "lib/wallets"; import { signTypedData } from "lib/wallets/signing"; @@ -17,9 +18,9 @@ export async function signCreateWithdrawal({ relayParams, transferRequests, params, - shouldUseSignerMethod = false, + shouldUseSignerMethod, }: { - signer: AbstractSigner | WalletSigner | Wallet; + signer: AbstractSigner | WalletSigner | Wallet | ISigner; relayParams: RelayParamsPayload; transferRequests: TransferRequests; params: CreateWithdrawalParams; diff --git a/src/domain/synthetics/markets/useMarkets.ts b/src/domain/synthetics/markets/useMarkets.ts index df7d7fd24d..446397760b 100644 --- a/src/domain/synthetics/markets/useMarkets.ts +++ b/src/domain/synthetics/markets/useMarkets.ts @@ -1,5 +1,5 @@ -import { ethers } from "ethers"; import { useMemo } from "react"; +import { zeroAddress } from "viem"; import { MARKETS, isMarketEnabled } from "config/markets"; import { convertTokenAddress, getToken } from "sdk/configs/tokens"; @@ -35,7 +35,7 @@ export function useMarkets(chainId: number): MarketsResult { const shortToken = getToken(chainId, market.shortTokenAddress); const isSameCollaterals = market.longTokenAddress === market.shortTokenAddress; - const isSpotOnly = market.indexTokenAddress === ethers.ZeroAddress; + const isSpotOnly = market.indexTokenAddress === zeroAddress; const name = getMarketFullName({ indexToken, longToken, shortToken, isSpotOnly }); diff --git a/src/domain/synthetics/orders/__tests__/simulation.spec.ts b/src/domain/synthetics/orders/__tests__/simulation.spec.ts new file mode 100644 index 0000000000..4811a925df --- /dev/null +++ b/src/domain/synthetics/orders/__tests__/simulation.spec.ts @@ -0,0 +1,136 @@ +import { + CallExecutionError, + ContractFunctionExecutionError, + ContractFunctionRevertedError, + HttpRequestError, + InsufficientFundsError, + InvalidInputRpcError, + RpcRequestError, + TimeoutError, + WebSocketRequestError, +} from "viem"; +import { describe, expect, it } from "vitest"; + +import { isInsufficientFundsError, isTemporaryError } from "../simulation"; + +describe("simulation", () => { + describe("isTemporaryError", () => { + it("should return true for RpcRequestError with header not found message", () => { + const error = new ContractFunctionExecutionError( + new CallExecutionError( + new RpcRequestError({ + url: "https://example.com", + body: {}, + error: { + code: -32000, + message: "header not found", + }, + }), + {} + ), + { + abi: [], + functionName: "test_function", + } + ); + + expect(isTemporaryError(error)).toBe(true); + }); + + it("should return true for HttpRequestError", () => { + const error = new HttpRequestError({ + body: {}, + details: "failed to fetch", + headers: new Headers(), + status: 500, + url: "https://example.com", + }); + + expect(isTemporaryError(error)).toBe(true); + }); + + it("should return true for TimeoutError", () => { + const error = new TimeoutError({ + body: {}, + url: "https://example.com", + }); + + expect(isTemporaryError(error)).toBe(true); + }); + + it("should return true for WebSocketRequestError", () => { + const error = new WebSocketRequestError({ + body: {}, + url: "wss://example.com", + }); + + expect(isTemporaryError(error)).toBe(true); + }); + + it("should return true for RpcRequestError with temporary error codes", () => { + const error = new RpcRequestError({ + body: {}, + error: { + code: -32001, + message: "Resource not found", + }, + url: "https://example.com", + }); + + expect(isTemporaryError(error)).toBe(true); + }); + + it("should return false for ContractFunctionRevertedError", () => { + const error = new ContractFunctionRevertedError({ + abi: [], + functionName: "test", + data: "0x1234", + }); + + expect(isTemporaryError(error)).toBe(false); + }); + + it("should return false for non-viem errors", () => { + const error = new Error("Some error"); + + expect(isTemporaryError(error)).toBe(false); + }); + }); + + describe("isInsufficientFundsError", () => { + it("should return true for ContractFunctionExecutionError wrapping InsufficientFundsError", () => { + const error = new ContractFunctionExecutionError( + new CallExecutionError( + new InsufficientFundsError({ + cause: new InvalidInputRpcError( + new InvalidInputRpcError( + new RpcRequestError({ + error: { + message: + "err: insufficient funds for gas * price + value: address 0x6f9f3106F0209dc560A53C6808f8BF32E38468C3 have 4174472651641805 want 10000000000000000000 (supplied gas 1100000000)", + code: -32000, + }, + body: {}, + url: "https://example.com", + }) + ) + ), + }), + {} + ), + { + abi: [], + functionName: "test_function", + } + ); + + expect(isInsufficientFundsError(error)).toBe(true); + }); + + it("should return false for base Error", () => { + const error = new Error("Some error"); + + expect(isInsufficientFundsError(error)).toBe(false); + }); + }); +}); diff --git a/src/domain/synthetics/orders/cancelOrdersTxn.ts b/src/domain/synthetics/orders/cancelOrdersTxn.ts index db213d65b8..7d0bd33f2f 100644 --- a/src/domain/synthetics/orders/cancelOrdersTxn.ts +++ b/src/domain/synthetics/orders/cancelOrdersTxn.ts @@ -1,6 +1,7 @@ import { plural, t } from "@lingui/macro"; import { Signer, ethers } from "ethers"; import { ReactNode } from "react"; +import { encodeFunctionData } from "viem"; import { getContract } from "config/contracts"; import { callContract } from "lib/contracts"; @@ -21,7 +22,13 @@ export async function cancelOrdersTxn(chainId: ContractsChainId, signer: Signer, const orderKeys = p.orders.flatMap((o) => (isTwapOrder(o) ? o.orders.map((o) => o.key as string) : o.key)); - const multicall = createCancelEncodedPayload({ router, orderKeys }); + const multicall = orderKeys.filter(Boolean).map((orderKey) => + encodeFunctionData({ + abi: abis.ExchangeRouter, + functionName: "cancelOrder", + args: [orderKey], + }) + ); const count = p.orders.length; @@ -38,13 +45,3 @@ export async function cancelOrdersTxn(chainId: ContractsChainId, signer: Signer, detailsMsg: p.detailsMsg, }); } - -export function createCancelEncodedPayload({ - router, - orderKeys = [], -}: { - router: ethers.Contract; - orderKeys: (string | null)[]; -}) { - return orderKeys.filter(Boolean).map((orderKey) => router.interface.encodeFunctionData("cancelOrder", [orderKey])); -} diff --git a/src/domain/synthetics/orders/simulateExecuteTxn.tsx b/src/domain/synthetics/orders/simulateExecuteTxn.tsx index cee2626ce9..780915769c 100644 --- a/src/domain/synthetics/orders/simulateExecuteTxn.tsx +++ b/src/domain/synthetics/orders/simulateExecuteTxn.tsx @@ -1,33 +1,27 @@ import { Trans, t } from "@lingui/macro"; -import { BaseContract, ethers } from "ethers"; import { ReactNode } from "react"; -import { withRetry } from "viem"; - -import { - getContract, - getExchangeRouterContract, - getGlvRouterContract, - getMulticallContract, - getZeroAddressContract, -} from "config/contracts"; +import { ContractFunctionParameters, encodeFunctionData, withRetry } from "viem"; + +import { getContract } from "config/contracts"; import { SwapPricingType } from "domain/synthetics/orders"; import { TokenPrices, TokensData, convertToContractPrice, getTokenData } from "domain/synthetics/tokens"; +import { decodeErrorFromViemError } from "lib/errors"; import { helperToast } from "lib/helperToast"; import { OrderMetricId } from "lib/metrics/types"; import { sendOrderSimulatedMetric, sendTxnErrorMetric } from "lib/metrics/utils"; -import { getProvider } from "lib/rpc"; import { getTenderlyConfig, simulateTxWithTenderly } from "lib/tenderly"; import { BlockTimestampData, adjustBlockTimestamp } from "lib/useBlockTimestampRequest"; +import { getPublicClientWithRpc } from "lib/wallets/rainbowKitConfig"; import { abis } from "sdk/abis"; import type { ContractsChainId } from "sdk/configs/chains"; import { convertTokenAddress } from "sdk/configs/tokens"; import { ExternalSwapQuote } from "sdk/types/trade"; -import { CustomErrorName, ErrorData, extractDataFromError, extractTxnError, isContractError } from "sdk/utils/errors"; -import { OracleUtils } from "typechain-types/ExchangeRouter"; +import { CustomErrorName } from "sdk/utils/errors"; import { getErrorMessage } from "components/Errors/errorToasts"; import { ToastifyDebug } from "components/ToastifyDebug/ToastifyDebug"; +import { getBlockTimestampAndNumber, isTemporaryError } from "./simulation"; import { isGlvEnabled } from "../markets/glv"; export type PriceOverrides = { @@ -58,38 +52,24 @@ export type SimulateExecuteParams = { externalSwapQuote?: ExternalSwapQuote; }; -export function isSimulationPassed(errorData: ErrorData) { - return isContractError(errorData, CustomErrorName.EndOfOracleSimulation); -} - /** * @deprecated use simulateExecution instead */ export async function simulateExecuteTxn(chainId: ContractsChainId, p: SimulateExecuteParams) { - const provider = getProvider(undefined, chainId); + const client = getPublicClientWithRpc(chainId); const multicallAddress = getContract(chainId, "Multicall"); - - const multicall = getMulticallContract(chainId, provider); - const exchangeRouter = getExchangeRouterContract(chainId, provider); - const glvRouter = isGlvEnabled(chainId) ? getGlvRouterContract(chainId, provider) : getZeroAddressContract(provider); + const useGlvRouter = isGlvEnabled(chainId); let blockTimestamp: bigint; - let blockTag: string | number; + let blockNumber: bigint | undefined; if (p.blockTimestampData) { blockTimestamp = adjustBlockTimestamp(p.blockTimestampData); - blockTag = "latest"; } else { - const result = await multicall.blockAndAggregate.staticCall([ - { target: multicallAddress, callData: multicall.interface.encodeFunctionData("getCurrentBlockTimestamp") }, - ]); - const returnValues = multicall.interface.decodeFunctionResult( - "getCurrentBlockTimestamp", - result.returnData[0].returnData - ); - blockTimestamp = returnValues[0]; - blockTag = Number(result.blockNumber); + const result = await getBlockTimestampAndNumber(client, multicallAddress); + blockTimestamp = result.blockTimestamp; + blockNumber = result.blockNumber; } const { primaryTokens, primaryPrices } = getSimulationPrices(chainId, p.tokensData, p.primaryPriceOverrides); @@ -97,13 +77,20 @@ export async function simulateExecuteTxn(chainId: ContractsChainId, p: SimulateE const method = p.method || "simulateExecuteLatestOrder"; const isGlv = method === "simulateExecuteLatestGlvDeposit" || method === "simulateExecuteLatestGlvWithdrawal"; + if (isGlv && !useGlvRouter) { + throw new Error("GlvRouter is not enabled for this chain"); + } const simulationPriceParams = { primaryTokens: primaryTokens, primaryPrices: primaryPrices, minTimestamp: priceTimestamp, maxTimestamp: priceTimestamp, - } as OracleUtils.SimulatePricesParamsStruct; + } satisfies ContractFunctionParameters< + typeof abis.ExchangeRouter, + "payable", + "simulateExecuteLatestWithdrawal" + >["args"][0]; let simulationPayloadData = [...p.createMulticallPayload]; @@ -113,30 +100,51 @@ export async function simulateExecuteTxn(chainId: ContractsChainId, p: SimulateE } simulationPayloadData.push( - exchangeRouter.interface.encodeFunctionData("simulateExecuteLatestWithdrawal", [ - simulationPriceParams, - p.swapPricingType, - ]) + encodeFunctionData({ + abi: abis.ExchangeRouter, + functionName: "simulateExecuteLatestWithdrawal", + args: [simulationPriceParams, p.swapPricingType], + }) ); } else if (method === "simulateExecuteLatestDeposit") { simulationPayloadData.push( - exchangeRouter.interface.encodeFunctionData("simulateExecuteLatestDeposit", [simulationPriceParams]) + encodeFunctionData({ + abi: abis.ExchangeRouter, + functionName: "simulateExecuteLatestDeposit", + args: [simulationPriceParams], + }) ); } else if (method === "simulateExecuteLatestOrder") { simulationPayloadData.push( - exchangeRouter.interface.encodeFunctionData("simulateExecuteLatestOrder", [simulationPriceParams]) + encodeFunctionData({ + abi: abis.ExchangeRouter, + functionName: "simulateExecuteLatestOrder", + args: [simulationPriceParams], + }) ); } else if (method === "simulateExecuteLatestShift") { simulationPayloadData.push( - exchangeRouter.interface.encodeFunctionData("simulateExecuteLatestShift", [simulationPriceParams]) + encodeFunctionData({ + abi: abis.ExchangeRouter, + functionName: "simulateExecuteLatestShift", + args: [simulationPriceParams], + }) ); } else if (method === "simulateExecuteLatestGlvDeposit") { simulationPayloadData.push( - glvRouter.interface.encodeFunctionData("simulateExecuteLatestGlvDeposit", [simulationPriceParams]) + encodeFunctionData({ + abi: abis.GlvRouter, + functionName: "simulateExecuteLatestGlvDeposit", + args: [simulationPriceParams], + }) ); } else if (method === "simulateExecuteLatestGlvWithdrawal") { simulationPayloadData.push( - glvRouter.interface.encodeFunctionData("simulateExecuteLatestGlvWithdrawal", [simulationPriceParams]) + encodeFunctionData({ + abi: abis.GlvRouter, + functionName: "simulateExecuteLatestGlvWithdrawal", + args: [simulationPriceParams], + }) ); } else { throw new Error(`Unknown method: ${method}`); @@ -145,10 +153,17 @@ export async function simulateExecuteTxn(chainId: ContractsChainId, p: SimulateE let errorTitle = p.errorTitle || t`Execute order simulation failed.`; const tenderlyConfig = getTenderlyConfig(); - const router = isGlv ? glvRouter : exchangeRouter; + const routerAddress = isGlv ? getContract(chainId, "GlvRouter") : getContract(chainId, "ExchangeRouter"); + const routerAbi = isGlv ? abis.GlvRouter : abis.ExchangeRouter; if (tenderlyConfig) { - await simulateTxWithTenderly(chainId, router as BaseContract, p.account, "multicall", [simulationPayloadData], { + await simulateTxWithTenderly({ + chainId, + address: routerAddress, + abi: routerAbi, + account: p.account, + method: "multicall", + params: [simulationPayloadData], value: p.value, comment: `calling ${method}`, }); @@ -157,33 +172,36 @@ export async function simulateExecuteTxn(chainId: ContractsChainId, p: SimulateE try { await withRetry( () => { - return router.multicall.staticCall(simulationPayloadData, { + return client.simulateContract({ + address: routerAddress, + abi: routerAbi, + functionName: "multicall", + args: [simulationPayloadData], value: p.value, - blockTag, - from: p.account, + account: p.account, + blockNumber: blockNumber, }); }, { retryCount: 2, delay: 200, shouldRetry: ({ error }) => { - const [message] = extractTxnError(error); - return message?.includes("unsupported block number") ?? false; + return isTemporaryError(error); }, } ); } catch (txnError) { - const customErrors = new ethers.Contract(ethers.ZeroAddress, abis.CustomErrors); let msg: React.ReactNode = undefined; try { - const errorData = extractDataFromError(txnError?.info?.error?.message) ?? extractDataFromError(txnError?.message); - const error = new Error("No data found in error."); - error.cause = txnError; - if (!errorData) throw error; + const parsedError = decodeErrorFromViemError(txnError); + if (!parsedError) { + const error = new Error("No data found in error."); + error.cause = txnError; + throw error; + } - const parsedError = customErrors.interface.parseError(errorData); - const isSimulationPassed = parsedError?.name === "EndOfOracleSimulation"; + const isSimulationPassed = parsedError.name === CustomErrorName.EndOfOracleSimulation; if (isSimulationPassed) { if (p.metricId) { @@ -196,18 +214,12 @@ export async function simulateExecuteTxn(chainId: ContractsChainId, p: SimulateE sendTxnErrorMetric(p.metricId, txnError, "simulation"); } - const parsedArgs = Object.keys(parsedError?.args ?? []).reduce((acc, k) => { - if (!Number.isNaN(Number(k))) { - return acc; - } - acc[k] = parsedError?.args[k].toString(); - return acc; - }, {}); + const parsedArgs = parsedError.args; let errorContent: ReactNode = errorTitle; if ( - parsedError?.name === CustomErrorName.OrderNotFulfillableAtAcceptablePrice || - parsedError?.name === CustomErrorName.InsufficientSwapOutputAmount + parsedError.name === CustomErrorName.OrderNotFulfillableAtAcceptablePrice || + parsedError.name === CustomErrorName.InsufficientSwapOutputAmount ) { errorContent = ( @@ -233,9 +245,7 @@ export async function simulateExecuteTxn(chainId: ContractsChainId, p: SimulateE {p.additionalErrorParams?.content}

- + ); } catch (parsingError) { diff --git a/src/domain/synthetics/orders/simulation.ts b/src/domain/synthetics/orders/simulation.ts index d21fd3084b..da65a5c416 100644 --- a/src/domain/synthetics/orders/simulation.ts +++ b/src/domain/synthetics/orders/simulation.ts @@ -1,27 +1,33 @@ -import { BaseContract, JsonRpcProvider } from "ethers"; -import { encodeFunctionData, withRetry } from "viem"; - import { - getContract, - getExchangeRouterContract, - getGlvRouterContract, - getMulticallContract, - getZeroAddressContract, -} from "config/contracts"; + ContractFunctionRevertedError, + HttpRequestError, + InsufficientFundsError, + PublicClient, + RpcRequestError, + TimeoutError, + BaseError as ViemBaseError, + WebSocketRequestError, + encodeFunctionData, + withRetry, +} from "viem"; + +import { getContract } from "config/contracts"; import { isDevelopment } from "config/env"; -import { isGlvEnabled } from "domain/synthetics/markets/glv"; import { SwapPricingType } from "domain/synthetics/orders"; import { TokenPrices, TokensData, convertToContractPrice, getTokenData } from "domain/synthetics/tokens"; import { SignedTokenPermit } from "domain/tokens"; -import { getExpressProvider, getProvider } from "lib/rpc"; +import { decodeErrorFromViemError } from "lib/errors"; import { getTenderlyConfig, simulateTxWithTenderly } from "lib/tenderly"; import { BlockTimestampData, adjustBlockTimestamp } from "lib/useBlockTimestampRequest"; +import { getPublicClientWithRpc } from "lib/wallets/rainbowKitConfig"; import { abis } from "sdk/abis"; -import type { ContractsChainId } from "sdk/configs/chains"; +import { type ContractsChainId } from "sdk/configs/chains"; import { convertTokenAddress } from "sdk/configs/tokens"; -import { CustomErrorName, ErrorData, TxErrorType, extendError, isContractError, parseError } from "sdk/utils/errors"; +import { CustomError, CustomErrorName, extendError } from "sdk/utils/errors"; import { CreateOrderTxnParams, ExternalCallsPayload } from "sdk/utils/orderTransactions"; +import { isGlvEnabled } from "../markets/glv"; + export type SimulateExecuteParams = { account: string; createMulticallPayload: string[]; @@ -40,53 +46,153 @@ export type SimulateExecuteParams = { blockTimestampData: BlockTimestampData | undefined; }; -export function isSimulationPassed(errorData: ErrorData) { - return isContractError(errorData, CustomErrorName.EndOfOracleSimulation); +export function isInsufficientFundsError(error: any): boolean { + return Boolean( + "walk" in error && + typeof error.walk === "function" && + (error as ViemBaseError).walk( + (e: any) => e instanceof InsufficientFundsError || ("name" in e && e.name === "InsufficientFundsError") + ) + ); } -export async function simulateExecution(chainId: ContractsChainId, p: SimulateExecuteParams) { - let provider: JsonRpcProvider; +const TEMPORARY_ERROR_PATTERNS = [ + "header not found", + "unfinalized data", + "networkerror when attempting to fetch resource", + "the request timed out", + "unsupported block number", + "failed to fetch", + "load failed", + "an error has occurred", +]; + +export function isTemporaryError(error: any): boolean { + if (!("walk" in error && typeof error.walk === "function")) { + return false; + } + + const errorChain = error as ViemBaseError; + let isTemporary: boolean | undefined; + + errorChain.walk((e: any) => { + const errorName = e?.name; + + if (errorName === "ContractFunctionRevertedError" || e instanceof ContractFunctionRevertedError) { + isTemporary = false; + return true; + } + + if ( + e instanceof HttpRequestError || + e instanceof WebSocketRequestError || + e instanceof TimeoutError || + errorName === "HttpRequestError" || + errorName === "WebSocketRequestError" || + errorName === "TimeoutError" + ) { + isTemporary = true; + return true; + } + if (e instanceof RpcRequestError || errorName === "RpcRequestError" || errorName === "RpcError") { + const code = (e as RpcRequestError)?.code; + if (code === -32001 || code === -32002 || code === -32603) { + isTemporary = true; + return true; + } + } + + const errorText = [ + typeof e?.details === "string" ? e.details : undefined, + typeof e?.shortMessage === "string" ? e.shortMessage : undefined, + typeof e?.message === "string" ? e.message : undefined, + ] + .filter(Boolean) + .join(" ") + .toLowerCase(); + + if (errorText && TEMPORARY_ERROR_PATTERNS.some((pattern) => errorText.includes(pattern))) { + isTemporary = true; + return true; + } + + return false; + }); + + return isTemporary === true; +} + +export async function getBlockTimestampAndNumber( + client: PublicClient, + multicallAddress: string +): Promise<{ blockTimestamp: bigint; blockNumber: bigint }> { + const [blockTimestampResult, currentBlockNumberResult] = await client.multicall({ + multicallAddress, + contracts: [ + { + address: multicallAddress, + abi: abis.Multicall, + functionName: "getCurrentBlockTimestamp", + }, + { + address: multicallAddress, + abi: abis.Multicall, + functionName: "getBlockNumber", + }, + ], + }); + + if (blockTimestampResult.result === undefined) { + throw new Error("Failed to get block timestamp from multicall"); + } + + if (currentBlockNumberResult.result === undefined) { + throw new Error("Failed to get block number from multicall"); + } + + return { + blockTimestamp: blockTimestampResult.result, + blockNumber: currentBlockNumberResult.result, + }; +} + +export async function simulateExecution(chainId: ContractsChainId, p: SimulateExecuteParams) { + let client: PublicClient; if (p.isExpress) { // Use alchemy rpc for express transactions simulation to increase reliability - provider = getExpressProvider(chainId) ?? getProvider(undefined, chainId); + client = getPublicClientWithRpc(chainId, { withExpress: true }); } else { - provider = getProvider(undefined, chainId); + client = getPublicClientWithRpc(chainId); } if (isDevelopment()) { // eslint-disable-next-line no-console - console.log("simulation rpc", provider._getConnection().url); + console.log("simulation rpc", client.transport); } const multicallAddress = getContract(chainId, "Multicall"); - const multicall = getMulticallContract(chainId, provider); - const exchangeRouter = getExchangeRouterContract(chainId, provider); - const glvRouter = isGlvEnabled(chainId) ? getGlvRouterContract(chainId, provider) : getZeroAddressContract(provider); + const useGlvRouter = isGlvEnabled(chainId); let blockTimestamp: bigint; - let blockTag: string | number; + let blockNumber: bigint | undefined; if (p.blockTimestampData) { blockTimestamp = adjustBlockTimestamp(p.blockTimestampData); - blockTag = "latest"; } else { - const result = await multicall.blockAndAggregate.staticCall([ - { target: multicallAddress, callData: multicall.interface.encodeFunctionData("getCurrentBlockTimestamp") }, - ]); - const returnValues = multicall.interface.decodeFunctionResult( - "getCurrentBlockTimestamp", - result.returnData[0].returnData - ); - blockTimestamp = returnValues[0]; - blockTag = Number(result.blockNumber); + const result = await getBlockTimestampAndNumber(client, multicallAddress); + blockTimestamp = result.blockTimestamp; + blockNumber = result.blockNumber; } const priceTimestamp = blockTimestamp + 120n; const method = p.method || "simulateExecuteLatestOrder"; const isGlv = method === "simulateExecuteLatestGlvDeposit" || method === "simulateExecuteLatestGlvWithdrawal"; + if (isGlv && !useGlvRouter) { + throw new Error("GlvRouter is not enabled for this chain"); + } const simulationPriceParams = { primaryTokens: p.prices.primaryTokens, @@ -119,12 +225,16 @@ export async function simulateExecution(chainId: ContractsChainId, p: SimulateEx } simulationPayloadData.push( - exchangeRouter.interface.encodeFunctionData("makeExternalCalls", [ - externalCalls.externalCallTargets, - externalCalls.externalCallDataList, - externalCalls.refundTokens, - externalCalls.refundReceivers, - ]) + encodeFunctionData({ + abi: abis.ExchangeRouter, + functionName: "makeExternalCalls", + args: [ + externalCalls.externalCallTargets, + externalCalls.externalCallDataList, + externalCalls.refundTokens, + externalCalls.refundReceivers, + ], + }) ); } @@ -136,40 +246,68 @@ export async function simulateExecution(chainId: ContractsChainId, p: SimulateEx } simulationPayloadData.push( - exchangeRouter.interface.encodeFunctionData("simulateExecuteLatestWithdrawal", [ - simulationPriceParams, - p.swapPricingType, - ]) + encodeFunctionData({ + abi: abis.ExchangeRouter, + functionName: "simulateExecuteLatestWithdrawal", + args: [simulationPriceParams, p.swapPricingType], + }) ); } else if (method === "simulateExecuteLatestDeposit") { simulationPayloadData.push( - exchangeRouter.interface.encodeFunctionData("simulateExecuteLatestDeposit", [simulationPriceParams]) + encodeFunctionData({ + abi: abis.ExchangeRouter, + functionName: "simulateExecuteLatestDeposit", + args: [simulationPriceParams], + }) ); } else if (method === "simulateExecuteLatestOrder") { simulationPayloadData.push( - exchangeRouter.interface.encodeFunctionData("simulateExecuteLatestOrder", [simulationPriceParams]) + encodeFunctionData({ + abi: abis.ExchangeRouter, + functionName: "simulateExecuteLatestOrder", + args: [simulationPriceParams], + }) ); } else if (method === "simulateExecuteLatestShift") { simulationPayloadData.push( - exchangeRouter.interface.encodeFunctionData("simulateExecuteLatestShift", [simulationPriceParams]) + encodeFunctionData({ + abi: abis.ExchangeRouter, + functionName: "simulateExecuteLatestShift", + args: [simulationPriceParams], + }) ); } else if (method === "simulateExecuteLatestGlvDeposit") { simulationPayloadData.push( - glvRouter.interface.encodeFunctionData("simulateExecuteLatestGlvDeposit", [simulationPriceParams]) + encodeFunctionData({ + abi: abis.GlvRouter, + functionName: "simulateExecuteLatestGlvDeposit", + args: [simulationPriceParams], + }) ); } else if (method === "simulateExecuteLatestGlvWithdrawal") { simulationPayloadData.push( - glvRouter.interface.encodeFunctionData("simulateExecuteLatestGlvWithdrawal", [simulationPriceParams]) + encodeFunctionData({ + abi: abis.GlvRouter, + functionName: "simulateExecuteLatestGlvWithdrawal", + args: [simulationPriceParams], + }) ); } else { throw new Error(`Unknown method: ${method}`); } const tenderlyConfig = getTenderlyConfig(); - const router = isGlv ? glvRouter : exchangeRouter; + const routerAddress = isGlv ? getContract(chainId, "GlvRouter") : getContract(chainId, "ExchangeRouter"); + const routerAbi = isGlv ? abis.GlvRouter : abis.ExchangeRouter; if (tenderlyConfig) { - await simulateTxWithTenderly(chainId, router as BaseContract, p.account, "multicall", [simulationPayloadData], { + await simulateTxWithTenderly({ + chainId, + address: routerAddress, + abi: routerAbi, + account: p.account, + method: "multicall", + params: [simulationPayloadData], value: p.value, comment: `calling ${method}`, }); @@ -178,39 +316,47 @@ export async function simulateExecution(chainId: ContractsChainId, p: SimulateEx try { await withRetry( () => { - return router.multicall.staticCall(simulationPayloadData, { + return client.simulateContract({ + address: routerAddress, + abi: routerAbi, + functionName: "multicall", + args: [simulationPayloadData], value: p.value, - blockTag, - from: p.account, + account: p.account, + blockNumber: blockNumber, }); }, { retryCount: 2, delay: 200, shouldRetry: ({ error }) => { - const errorData = parseError(error); - return ( - errorData?.errorMessage?.includes("unsupported block number") || - errorData?.errorMessage?.toLowerCase().includes("failed to fetch") || - errorData?.errorMessage?.toLowerCase().includes("load failed") || - errorData?.errorMessage?.toLowerCase().includes("an error has occurred") || - false - ); + return isTemporaryError(error); }, } ); } catch (txnError) { - const errorData = parseError(txnError); + const decodedError = decodeErrorFromViemError(txnError); + + const isPassed = decodedError?.name === CustomErrorName.EndOfOracleSimulation; - const isPassed = errorData && isSimulationPassed(errorData); - const shouldIgnoreExpressNativeTokenBalance = errorData?.txErrorType === TxErrorType.NotEnoughFunds && p.isExpress; + const isInsufficientFunds = isInsufficientFundsError(txnError); + const shouldIgnoreExpressNativeTokenBalance = isInsufficientFunds && p.isExpress; if (isPassed || shouldIgnoreExpressNativeTokenBalance) { return; } else { - throw extendError(txnError, { - errorContext: "simulation", - }); + throw extendError( + decodedError + ? new CustomError({ + name: decodedError.name, + message: JSON.stringify(decodedError, null, 2), + args: decodedError.args, + }) + : txnError, + { + errorContext: "simulation", + } + ); } } } diff --git a/src/domain/synthetics/orders/updateOrderTxn.ts b/src/domain/synthetics/orders/updateOrderTxn.ts index 8b55879273..166fb32c4f 100644 --- a/src/domain/synthetics/orders/updateOrderTxn.ts +++ b/src/domain/synthetics/orders/updateOrderTxn.ts @@ -1,10 +1,11 @@ -import { ethers } from "ethers"; +import { Abi, encodeFunctionData } from "viem"; import { getContract } from "config/contracts"; import { SetPendingTransactions } from "context/PendingTxnsContext/PendingTxnsContext"; import type { SetPendingOrderUpdate } from "context/SyntheticsEvents"; import { convertToContractPrice } from "domain/synthetics/tokens"; import type { Token } from "domain/tokens"; +import { abis } from "sdk/abis"; import type { ContractsChainId } from "sdk/configs/chains"; export type UpdateOrderParams = { @@ -26,7 +27,6 @@ export type UpdateOrderCallbacks = { export function createUpdateEncodedPayload({ chainId, - router, orderKey, sizeDeltaUsd, executionFee, @@ -37,7 +37,6 @@ export function createUpdateEncodedPayload({ autoCancel, }: { chainId: ContractsChainId; - router: ethers.Contract; orderKey: string; sizeDeltaUsd: bigint; executionFee?: bigint; @@ -67,5 +66,11 @@ export function createUpdateEncodedPayload({ ], }); - return multicall.filter(Boolean).map((call) => router.interface.encodeFunctionData(call!.method, call!.params)); + return multicall.filter(Boolean).map((call) => + encodeFunctionData({ + abi: abis.ExchangeRouter as Abi, + functionName: call!.method, + args: call!.params, + }) + ); } diff --git a/src/domain/synthetics/orders/useOrders.ts b/src/domain/synthetics/orders/useOrders.ts index 360eb54a0e..b37430d8c3 100644 --- a/src/domain/synthetics/orders/useOrders.ts +++ b/src/domain/synthetics/orders/useOrders.ts @@ -1,5 +1,5 @@ import { useEffect, useMemo } from "react"; -import { Address, isAddressEqual } from "viem"; +import { Address, ContractFunctionReturnType, isAddressEqual } from "viem"; import { ContractsChainId } from "config/chains"; import { getContract } from "config/contracts"; @@ -13,6 +13,7 @@ import { freshnessMetrics } from "lib/metrics/reportFreshnessMetric"; import { CacheKey, MulticallRequestConfig, MulticallResult, useMulticall } from "lib/multicall"; import { EMPTY_ARRAY } from "lib/objects"; import { FREQUENT_UPDATE_INTERVAL } from "lib/timeConstants"; +import { abis } from "sdk/abis"; import { getWrappedToken } from "sdk/configs/tokens"; import { isIncreaseOrderType, @@ -23,7 +24,6 @@ import { isVisibleOrder, } from "sdk/utils/orders"; import { decodeTwapUiFeeReceiver } from "sdk/utils/twap/uiFeeReceiver"; -import { ReaderUtils } from "typechain-types/SyntheticsReader"; import type { MarketFilterLongShortDirection, @@ -214,18 +214,22 @@ function parseResponse(res: MulticallResult { const key = orderKeys[i]; - const orderData = order.order as ReaderUtils.OrderInfoStructOutput["order"]; + const orderData = order.order as ContractFunctionReturnType< + typeof abis.SyntheticsReader, + "view", + "getAccountOrders" + >[number]["order"]; return { key, - account: orderData.addresses.account as Address, - receiver: orderData.addresses.receiver as Address, + account: orderData.addresses.account, + receiver: orderData.addresses.receiver, // cancellationReceiver: orderData.addresses.cancellationReceiver as Address, - callbackContract: orderData.addresses.callbackContract as Address, - uiFeeReceiver: orderData.addresses.uiFeeReceiver as Address, - marketAddress: orderData.addresses.market as Address, - initialCollateralTokenAddress: orderData.addresses.initialCollateralToken as Address, - swapPath: orderData.addresses.swapPath as Address[], + callbackContract: orderData.addresses.callbackContract, + uiFeeReceiver: orderData.addresses.uiFeeReceiver, + marketAddress: orderData.addresses.market, + initialCollateralTokenAddress: orderData.addresses.initialCollateralToken, + swapPath: orderData.addresses.swapPath as string[], sizeDeltaUsd: BigInt(orderData.numbers.sizeDeltaUsd), initialCollateralDeltaAmount: BigInt(orderData.numbers.initialCollateralDeltaAmount), contractTriggerPrice: BigInt(orderData.numbers.triggerPrice), @@ -235,13 +239,13 @@ function parseResponse(res: MulticallResult, + zeroAddress, + 0n, + 1000n, + ] satisfies ContractFunctionParameters< + typeof abis.SyntheticsReader, + "view", + "getAccountPositionInfoList" + >["args"], }, }, }, diff --git a/src/domain/synthetics/stats/marketsInfoDataToIndexTokensStats.tsx b/src/domain/synthetics/stats/marketsInfoDataToIndexTokensStats.tsx index 3ac1f886a8..88ca4ab97e 100644 --- a/src/domain/synthetics/stats/marketsInfoDataToIndexTokensStats.tsx +++ b/src/domain/synthetics/stats/marketsInfoDataToIndexTokensStats.tsx @@ -1,4 +1,4 @@ -import { ethers } from "ethers"; +import { minInt256 } from "viem"; import { BASIS_POINTS_DIVISOR, BASIS_POINTS_DIVISOR_BIGINT, USD_DECIMALS } from "config/factors"; import { getBorrowingFactorPerPeriod, getFundingFactorPerPeriod } from "domain/synthetics/fees"; @@ -9,10 +9,11 @@ import { getOpenInterestForBalance, getUsedLiquidity, } from "domain/synthetics/markets"; -import { TokenData, getMidPrice } from "domain/synthetics/tokens"; +import { TokenData } from "domain/synthetics/tokens"; import { CHART_PERIODS } from "lib/legacy"; import { expandDecimals } from "lib/numbers"; import { bigMath } from "sdk/utils/bigmath"; +import { getMidPrice } from "sdk/utils/tokens"; const MIN_OI_CAP_THRESHOLD_USD = expandDecimals(10000, USD_DECIMALS); @@ -94,8 +95,8 @@ export function marketsInfoData2IndexTokenStatsMap(marketsInfoData: MarketsInfoD totalUsedLiquidity: 0n, totalMaxLiquidity: 0n, marketsStats: [], - bestNetFeeLong: ethers.MinInt256, - bestNetFeeShort: ethers.MinInt256, + bestNetFeeLong: minInt256, + bestNetFeeShort: minInt256, bestNetFeeLongMarketAddress: marketInfo.marketTokenAddress, bestNetFeeShortMarketAddress: marketInfo.marketTokenAddress, totalOpenInterestLong: 0n, diff --git a/src/domain/synthetics/subaccount/utils.ts b/src/domain/synthetics/subaccount/utils.ts index b3c240959c..580f4b08a1 100644 --- a/src/domain/synthetics/subaccount/utils.ts +++ b/src/domain/synthetics/subaccount/utils.ts @@ -21,6 +21,7 @@ import type { SubaccountValidations, } from "domain/synthetics/subaccount/types"; import { WalletSigner } from "lib/wallets"; +import { getPublicClientWithRpc } from "lib/wallets/rainbowKitConfig"; import { SignatureTypes, signTypedData } from "lib/wallets/signing"; import { abis } from "sdk/abis"; import { getContract } from "sdk/configs/contracts"; @@ -36,7 +37,6 @@ import { DEFAULT_SUBACCOUNT_EXPIRY_DURATION, DEFAULT_SUBACCOUNT_MAX_ALLOWED_COUN import { bigMath } from "sdk/utils/bigmath"; import { ZERO_DATA } from "sdk/utils/hash"; import { nowInSeconds, secondsToPeriod } from "sdk/utils/time"; -import type { SubaccountGelatoRelayRouter } from "typechain-types"; import { getGelatoRelayRouterDomain } from "../express"; import { SubaccountOnchainData } from "./useSubaccountOnchainData"; @@ -474,7 +474,7 @@ export async function createAndSignSubaccountApproval( ): Promise { const srcChainId = await getMultichainInfoFromSigner(mainAccountSigner, chainId); - const nonce = await getSubaccountApprovalNonceForProvider(chainId, mainAccountSigner, provider, isGmxAccount); + const nonce = await getSubaccountApprovalNonceForProvider(chainId, mainAccountSigner, isGmxAccount); const subaccountRouterAddress = getOrderRelayRouterAddress(chainId, true, isGmxAccount); @@ -549,22 +549,18 @@ export function hashSubaccountApproval(subaccountApproval: SignedSubacсountAppr async function getSubaccountApprovalNonceForProvider( chainId: ContractsChainId, signer: WalletSigner, - provider: Provider, isGmxAccount: boolean ): Promise { - if (provider === undefined) { - throw new Error("Provider is required for multicall"); - } - const subaccountRouterAddress = getOrderRelayRouterAddress(chainId, true, isGmxAccount); - const contract = new ethers.Contract( - subaccountRouterAddress, - abis.AbstractSubaccountApprovalNonceable, - provider - ) as unknown as SubaccountGelatoRelayRouter; + const publicClient = getPublicClientWithRpc(chainId); - return await contract.subaccountApprovalNonces(signer.address); + return await publicClient.readContract({ + address: subaccountRouterAddress, + abi: abis.AbstractSubaccountApprovalNonceable, + functionName: "subaccountApprovalNonces", + args: [signer.address], + }); } export async function getSubaccountOnchainData({ diff --git a/src/domain/synthetics/trade/utils/validation.ts b/src/domain/synthetics/trade/utils/validation.ts index 557d5683d1..84b2ca74f2 100644 --- a/src/domain/synthetics/trade/utils/validation.ts +++ b/src/domain/synthetics/trade/utils/validation.ts @@ -1,5 +1,5 @@ import { t } from "@lingui/macro"; -import { ethers } from "ethers"; +import { maxUint256 } from "viem"; import { AnyChainId, @@ -514,7 +514,7 @@ export function getDecreaseError(p: { return [t`Enter a trigger price`]; } - if (existingPosition?.liquidationPrice && existingPosition.liquidationPrice !== ethers.MaxUint256) { + if (existingPosition?.liquidationPrice && existingPosition.liquidationPrice !== maxUint256) { if (isLong && triggerPrice <= existingPosition.liquidationPrice) { return [t`Trigger price below liq. price`]; } @@ -606,7 +606,7 @@ export function getEditCollateralError(p: { } if (nextLiqPrice !== undefined && position?.markPrice !== undefined) { - if (position?.isLong && nextLiqPrice < ethers.MaxUint256 && position?.markPrice < nextLiqPrice) { + if (position?.isLong && nextLiqPrice < maxUint256 && position?.markPrice < nextLiqPrice) { return [t`Invalid liq. price`]; } diff --git a/src/domain/tokens/approveTokens.tsx b/src/domain/tokens/approveTokens.tsx index 6d218ec2bd..87d330aa2f 100644 --- a/src/domain/tokens/approveTokens.tsx +++ b/src/domain/tokens/approveTokens.tsx @@ -1,6 +1,7 @@ import { Trans, t } from "@lingui/macro"; import { Signer, ethers } from "ethers"; import { Link } from "react-router-dom"; +import { maxUint256 } from "viem"; import { getChainName, getExplorerUrl } from "config/chains"; import { AddTokenPermitFn } from "context/TokenPermitsContext/TokenPermitsContextProvider"; @@ -57,7 +58,7 @@ export async function approveTokens({ setIsApproving(true); if (approveAmount === undefined) { - approveAmount = ethers.MaxUint256; + approveAmount = maxUint256; } let shouldUsePermit = false; @@ -116,7 +117,7 @@ export async function approveTokens({ const nativeToken = getNativeToken(chainId); const networkName = getChainName(chainId); return await contract - .approve(spender, approveAmount ?? ethers.MaxUint256) + .approve(spender, approveAmount ?? maxUint256) .then(async (res) => { const txUrl = getExplorerUrl(chainId) + "tx/" + res.hash; helperToast.success( diff --git a/src/domain/tokens/utils.ts b/src/domain/tokens/utils.ts index b8c9717480..9e177c3d66 100644 --- a/src/domain/tokens/utils.ts +++ b/src/domain/tokens/utils.ts @@ -1,4 +1,4 @@ -import { ethers } from "ethers"; +import { zeroAddress } from "viem"; import { BOTANIX, ContractsChainId, getExplorerUrl } from "config/chains"; import { USD_DECIMALS } from "config/factors"; @@ -19,8 +19,6 @@ import { InfoTokens, Token, TokenInfo } from "sdk/types/tokens"; export * from "sdk/utils/tokens"; -const { ZeroAddress } = ethers; - export function getTokenUrl(chainId: number, address: string) { if (!address) { return getExplorerUrl(chainId); @@ -115,7 +113,7 @@ export function getTokenInfo( nativeTokenAddress?: string ) { if (replaceNative && tokenAddress === nativeTokenAddress) { - return infoTokens[ZeroAddress]; + return infoTokens[zeroAddress]; } return infoTokens[tokenAddress]; @@ -216,7 +214,7 @@ export function shouldRaiseGasError(token: TokenInfo, amount?: bigint) { if (amount === undefined) { return false; } - if (token.address !== ZeroAddress) { + if (token.address !== zeroAddress) { return false; } if (token.balance === undefined) { @@ -240,7 +238,7 @@ export const replaceNativeTokenAddress = (path: string[], nativeTokenAddress: st for (let i = 0; i < path.length; i++) { let address = path[i]; - if (address === ZeroAddress) { + if (address === zeroAddress) { address = nativeTokenAddress; } updatedPath.push(address); diff --git a/src/lib/__tests__/ethersErrors.spec.ts b/src/lib/__tests__/ethersErrors.spec.ts index 8fe798d6cc..7150706ffc 100644 --- a/src/lib/__tests__/ethersErrors.spec.ts +++ b/src/lib/__tests__/ethersErrors.spec.ts @@ -1,4 +1,5 @@ import { ethers } from "ethers"; +import { zeroAddress } from "viem"; import { describe, expect, it } from "vitest"; import { parseError } from "lib/errors"; @@ -25,7 +26,7 @@ describe("ethers errors", () => { it("should handle insufficient funds", () => { const error = ethers.makeError("insufficient funds for gas", "INSUFFICIENT_FUNDS", { transaction: { - to: ethers.ZeroAddress, + to: zeroAddress, data: "0x", value: 100n, }, @@ -47,7 +48,7 @@ describe("ethers errors", () => { it("should handle contract execution errors", () => { const error = ethers.makeError("execution reverted (unknown custom error)", "CALL_EXCEPTION", { transaction: { - to: ethers.ZeroAddress, + to: zeroAddress, data: "0x", }, data: "0x5dac504d0000000000000000000000000000000000000000000000000096d37eb9edae200000000000000000000000000000000000000000000000000096c6d0c2c84380", diff --git a/src/lib/__tests__/getLiquidationPrice.spec.ts b/src/lib/__tests__/getLiquidationPrice.spec.ts index 59121c075d..4d686fb42c 100644 --- a/src/lib/__tests__/getLiquidationPrice.spec.ts +++ b/src/lib/__tests__/getLiquidationPrice.spec.ts @@ -1,4 +1,4 @@ -import { ethers } from "ethers"; +import { parseUnits } from "viem"; import { describe, expect, it } from "vitest"; import { formatAmount } from "lib/numbers"; @@ -9,37 +9,37 @@ describe("getLiquidationPrice", function () { { name: "New Position Long, to trigger 1% Buffer rule", isLong: true, - size: ethers.parseUnits("98712.87", 30), - collateral: ethers.parseUnits("9871.29", 30), - averagePrice: ethers.parseUnits("23091.42", 30), - fundingFee: ethers.parseUnits("0", 30), + size: parseUnits("98712.87", 30), + collateral: parseUnits("9871.29", 30), + averagePrice: parseUnits("23091.42", 30), + fundingFee: parseUnits("0", 30), expected: "21013.1915", }, { name: "New Position Long, to trigger $5 Buffer rule", isLong: true, - size: ethers.parseUnits("162.50", 30), - collateral: ethers.parseUnits("16.25", 30), - averagePrice: ethers.parseUnits("23245.74", 30), - fundingFee: ethers.parseUnits("0", 30), + size: parseUnits("162.50", 30), + collateral: parseUnits("16.25", 30), + averagePrice: parseUnits("23245.74", 30), + fundingFee: parseUnits("0", 30), expected: "21659.6653", }, { name: "New Position Short, to trigger 1% Buffer rule", isLong: false, - size: ethers.parseUnits("99009.90", 30), - collateral: ethers.parseUnits("9901.00", 30), - averagePrice: ethers.parseUnits("23118.40", 30), - fundingFee: ethers.parseUnits("0", 30), + size: parseUnits("99009.90", 30), + collateral: parseUnits("9901.00", 30), + averagePrice: parseUnits("23118.40", 30), + fundingFee: parseUnits("0", 30), expected: "25199.0583", }, { name: "Long Position with Positive PnL", isLong: true, - size: ethers.parseUnits("7179585.19", 30), - collateral: ethers.parseUnits("145919.45", 30), - averagePrice: ethers.parseUnits("1301.50", 30), - fundingFee: ethers.parseUnits("55354.60", 30), + size: parseUnits("7179585.19", 30), + collateral: parseUnits("145919.45", 30), + averagePrice: parseUnits("1301.50", 30), + fundingFee: parseUnits("55354.60", 30), expected: "1288.0630", }, ]; diff --git a/src/lib/contracts/callContract.tsx b/src/lib/contracts/callContract.tsx index f4d0920b19..29d1b16468 100644 --- a/src/lib/contracts/callContract.tsx +++ b/src/lib/contracts/callContract.tsx @@ -14,6 +14,7 @@ import { OrderMetricId } from "lib/metrics/types"; import { sendOrderTxnSubmittedMetric } from "lib/metrics/utils"; import { getProvider } from "lib/rpc"; import { getTenderlyConfig, simulateTxWithTenderly } from "lib/tenderly"; +import { toAddress } from "lib/transactions/iSigner"; import { getErrorMessage } from "components/Errors/errorToasts"; import ExternalLink from "components/ExternalLink/ExternalLink"; @@ -63,7 +64,24 @@ export async function callContract( const tenderlyConfig = getTenderlyConfig(); if (tenderlyConfig) { - await simulateTxWithTenderly(chainId, contract, wallet.address, method, params, { + const functionFragment = contract.interface.getFunction(method)!; + await simulateTxWithTenderly({ + chainId, + address: (await toAddress(contract.target))!, + abi: [ + { + name: functionFragment.name, + type: "function", + inputs: functionFragment.inputs, + outputs: functionFragment.outputs, + stateMutability: functionFragment.stateMutability, + constant: functionFragment.constant, + payable: functionFragment.payable, + }, + ], + account: wallet.address, + method, + params, gasLimit: opts.gasLimit !== undefined ? BigInt(opts.gasLimit) : undefined, value: opts.value !== undefined ? BigInt(opts.value) : undefined, comment: `calling ${method}`, diff --git a/src/lib/contracts/contractFetcher.ts b/src/lib/contracts/contractFetcher.ts index 0010027df6..c3d61e62f5 100644 --- a/src/lib/contracts/contractFetcher.ts +++ b/src/lib/contracts/contractFetcher.ts @@ -1,5 +1,6 @@ import { Provider, Result, Signer, ethers } from "ethers"; import { stableHash } from "swr/_internal"; +import { isAddress } from "viem"; import { swrCache, SWRConfigProp } from "App/swrConfig"; import { executeMulticall } from "lib/multicall"; @@ -40,7 +41,7 @@ export const contractFetcher = priority = "background"; } - const method = ethers.isAddress(arg0) ? arg1 : arg0; + const method = isAddress(arg0, { strict: false }) ? arg1 : arg0; const contractCall = fetchContractData({ chainId, @@ -119,7 +120,7 @@ export const contractFetcher = handleFallback(resolve, reject, e); }); - const isThroughMulticall = ethers.isAddress(arg0); + const isThroughMulticall = isAddress(arg0, { strict: false }); const isUrgent = priority === "urgent"; let timeout = CONTRACT_FETCHER_DEFAULT_FETCH_TIMEOUT; @@ -161,7 +162,7 @@ async function fetchContractData({ priority: "urgent" | "background"; id: string; }): Promise { - if (ethers.isAddress(arg0)) { + if (isAddress(arg0, { strict: false })) { const address = arg0; const contract = new ethers.Contract(address, abis[abiId], provider); diff --git a/src/lib/contracts/notifications.tsx b/src/lib/contracts/notifications.tsx index ca57391d76..6c61324a66 100644 --- a/src/lib/contracts/notifications.tsx +++ b/src/lib/contracts/notifications.tsx @@ -1,8 +1,8 @@ import { Trans } from "@lingui/macro"; -import { ethers } from "ethers"; import { getExplorerUrl } from "config/chains"; import { helperToast } from "lib/helperToast"; +import { keccakString } from "sdk/utils/hash"; import ExternalLink from "components/ExternalLink/ExternalLink"; @@ -11,7 +11,7 @@ const notifications: { [id: string]: boolean } = {}; export function pushSuccessNotification(chainId: number, message: string, e: { transactionHash: string }) { const { transactionHash } = e; - const id = ethers.id(message + transactionHash); + const id = keccakString(message + transactionHash); if (notifications[id]) { return; } @@ -31,7 +31,7 @@ export function pushSuccessNotification(chainId: number, message: string, e: { t export function pushErrorNotification(chainId: number, message: string, e: { transactionHash: string }) { const { transactionHash } = e; - const id = ethers.id(message + transactionHash); + const id = keccakString(message + transactionHash); if (notifications[id]) { return; } diff --git a/src/lib/legacy.ts b/src/lib/legacy.ts index 78382f3773..bb5e721036 100644 --- a/src/lib/legacy.ts +++ b/src/lib/legacy.ts @@ -1,6 +1,7 @@ import { t } from "@lingui/macro"; -import { ethers } from "ethers"; import mapKeys from "lodash/mapKeys"; +import { zeroAddress, zeroHash } from "viem"; +import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; import { useEnsName } from "wagmi"; import { ARBITRUM, SOURCE_ETHEREUM_MAINNET, getExplorerUrl } from "config/chains"; @@ -14,20 +15,18 @@ import { getTokenInfo } from "domain/tokens/utils"; import { isValidTimestamp } from "./dates"; import { PRECISION, + adjustForDecimals, bigNumberify, calculateDisplayDecimals, deserializeBigIntsInObject, expandDecimals, formatAmount, - adjustForDecimals, } from "./numbers"; export { adjustForDecimals } from "./numbers"; -const { ZeroAddress } = ethers; - // use a random placeholder account instead of the zero address as the zero address might have tokens -export const PLACEHOLDER_ACCOUNT = ethers.Wallet.createRandom().address; +export const PLACEHOLDER_ACCOUNT = privateKeyToAccount(generatePrivateKey()).address; export const MIN_PROFIT_TIME = 0; @@ -731,18 +730,11 @@ export function getPositionKey( isLong: boolean, nativeTokenAddress?: string ) { - const tokenAddress0 = collateralTokenAddress === ZeroAddress ? nativeTokenAddress : collateralTokenAddress; - const tokenAddress1 = indexTokenAddress === ZeroAddress ? nativeTokenAddress : indexTokenAddress; + const tokenAddress0 = collateralTokenAddress === zeroAddress ? nativeTokenAddress : collateralTokenAddress; + const tokenAddress1 = indexTokenAddress === zeroAddress ? nativeTokenAddress : indexTokenAddress; return account + ":" + tokenAddress0 + ":" + tokenAddress1 + ":" + isLong; } -export function getPositionContractKey(account, collateralToken, indexToken, isLong) { - return ethers.solidityPackedKeccak256( - ["address", "address", "address", "bool"], - [account, collateralToken, indexToken, isLong] - ); -} - export function getSwapFeeBasisPoints(isStable) { return isStable ? STABLE_SWAP_FEE_BASIS_POINTS : SWAP_FEE_BASIS_POINTS; } @@ -1275,10 +1267,10 @@ export function getPageTitle(data) { } export function isHashZero(value) { - return value === ethers.ZeroHash; + return value === zeroHash; } export function isAddressZero(value) { - return value === ethers.ZeroAddress; + return value === zeroAddress; } export function getHomeUrl() { diff --git a/src/lib/metrics/types.ts b/src/lib/metrics/types.ts index c63738902c..024ffe1b1a 100644 --- a/src/lib/metrics/types.ts +++ b/src/lib/metrics/types.ts @@ -92,24 +92,41 @@ export type AccountInitedEvent = { }; // Websockets -export type WsProviderConnected = { - event: "wsProvider.connected"; +export type ViemWsClientConnected = { + event: "viemWsClient.connected"; isError: false; - data: {}; + data: { + chainId: number; + rpcUrl: string; + }; }; -export type WsProviderDisconnected = { - event: "wsProvider.disconnected"; +export type ViemWsClientDisconnected = { + event: "viemWsClient.disconnected"; isError: false; - data: {}; + data: { + chainId: number; + rpcUrl: string; + }; }; -export type WsProviderHealthCheckFailed = { - event: "wsProvider.healthCheckFailed"; +export type ViemWsClientHealthCheckFailed = { + event: "viemWsClient.healthCheckFailed"; isError: false; data: { - requiredListenerCount: number; - listenerCount: number; + chainId: number; + rpcUrl: string; + actualSubscriptions: number; + intendedSubscriptions: number; + }; +}; + +export type ViemWsClientError = { + event: "viemWsClient.error"; + isError: true; + data: { + chainId: number; + rpcUrl: string; }; }; diff --git a/src/lib/rpc/index.ts b/src/lib/rpc/index.ts index 81996f2e79..ddcb228442 100644 --- a/src/lib/rpc/index.ts +++ b/src/lib/rpc/index.ts @@ -1,8 +1,7 @@ -import { ethers, JsonRpcProvider, Network, Signer, WebSocketProvider } from "ethers"; +import { ethers, JsonRpcProvider, Network, Signer } from "ethers"; import { useEffect, useMemo, useState } from "react"; import { AnyChainId, AVALANCHE_FUJI } from "config/chains"; -import { isDevelopment } from "config/env"; import { getFallbackRpcUrl, getWsRpcProviders } from "config/rpc"; import { getIsLargeAccount } from "domain/stats/isLargeAccount"; import { getCurrentExpressRpcUrl, getCurrentRpcUrls, useCurrentRpcUrls } from "lib/rpc/useRpcUrls"; @@ -24,25 +23,20 @@ export function getProvider(signer: Signer | undefined, chainId: number): ethers return new ethers.JsonRpcProvider(url, chainId, { staticNetwork: network }); } -export function getWsProvider(chainId: AnyChainId): WebSocketProvider | JsonRpcProvider { - const network = Network.from(chainId); +export function getWsUrl(chainId: AnyChainId): string | undefined { + if (chainId === AVALANCHE_FUJI) { + return undefined; + } + const wsProviderConfig = getWsRpcProviders(chainId, getIsLargeAccount() ? "largeAccount" : "fallback")[0] ?? getWsRpcProviders(chainId, "fallback")[0]; if (wsProviderConfig) { - return new ethers.WebSocketProvider(wsProviderConfig.url, network, { staticNetwork: network }); + return wsProviderConfig.url; } - if (chainId === AVALANCHE_FUJI) { - const provider = new ethers.JsonRpcProvider(getCurrentRpcUrls(AVALANCHE_FUJI).primary, network, { - staticNetwork: network, - }); - provider.pollingInterval = 2000; - return provider; - } - - throw new Error(`Unsupported websocket provider for chain id: ${chainId}`); + throw new Error(`Unsupported websocket URL for chain id: ${chainId}`); } export function getFallbackProvider(chainId: number) { @@ -99,42 +93,3 @@ export function useJsonRpcProvider(chainId: number | undefined, { isExpress = fa return { provider }; } - -export function isWebsocketProvider(provider: any): provider is WebSocketProvider { - return Boolean(provider?.websocket); -} - -export enum WSReadyState { - CONNECTING = 0, - OPEN = 1, - CLOSING = 2, - CLOSED = 3, -} - -const readyStateByEnum = { - [WSReadyState.CONNECTING]: "connecting", - [WSReadyState.OPEN]: "open", - [WSReadyState.CLOSING]: "closing", - [WSReadyState.CLOSED]: "closed", -}; - -export function isProviderInClosedState(wsProvider: WebSocketProvider) { - return [WSReadyState.CLOSED, WSReadyState.CLOSING].includes(wsProvider.websocket.readyState); -} - -export function closeWsConnection(wsProvider: WebSocketProvider) { - if (isDevelopment()) { - // eslint-disable-next-line no-console - console.log( - "closing ws connection, state =", - readyStateByEnum[wsProvider.websocket.readyState] ?? wsProvider.websocket.readyState - ); - } - - if (isProviderInClosedState(wsProvider)) { - return; - } - - wsProvider.removeAllListeners(); - wsProvider.websocket.close(); -} diff --git a/src/lib/tenderly.tsx b/src/lib/tenderly.tsx index 3f65266424..a0d596a9bc 100644 --- a/src/lib/tenderly.tsx +++ b/src/lib/tenderly.tsx @@ -1,16 +1,24 @@ -import { BaseContract, Provider } from "ethers"; -import { numberToHex, type StateOverride } from "viem"; +import { Provider } from "ethers"; +import { + Abi, + AbiStateMutability, + ContractFunctionName, + ContractFunctionParameters, + encodeFunctionData, + numberToHex, + type StateOverride, +} from "viem"; import { isDevelopment } from "config/env"; import ExternalLink from "components/ExternalLink/ExternalLink"; -import { getGasLimit } from "./contracts"; -import { estimateGasLimit } from "./gas/estimateGasLimit"; +import { applyGasLimitBuffer, estimateGasLimit } from "./gas/estimateGasLimit"; import { GasPriceData, getGasPrice } from "./gas/gasPrice"; import { helperToast } from "./helperToast"; import { getProvider } from "./rpc"; import { ISigner } from "./transactions/iSigner"; +import { getPublicClientWithRpc } from "./wallets/rainbowKitConfig"; export type TenderlyConfig = { accountSlug: string; @@ -84,65 +92,86 @@ export async function simulateCallDataWithTenderly({ }); } -export const simulateTxWithTenderly = async ( - chainId: number, - contract: BaseContract, - account: string, - method: string, - params: any, - opts: { - gasLimit?: bigint; - value?: bigint; - comment: string; - stateOverride?: StateOverride; - } -) => { +export async function simulateTxWithTenderly< + abi extends Abi, + method extends ContractFunctionName, + params extends ContractFunctionParameters["args"], +>({ + chainId, + address, + abi, + account, + method, + params, + gasLimit, + value, + comment, + stateOverride, +}: { + chainId: number; + address: string; + abi: abi; + account: string; + method: method; + params: params; + gasLimit?: bigint; + value?: bigint; + comment: string; + stateOverride?: StateOverride; +}) { + const publicClient = getPublicClientWithRpc(chainId); const config = getTenderlyConfig(); if (!config) { throw new Error("Tenderly config not found"); } - if (!contract.runner?.provider) { - throw new Error("No provider found"); - } - - const blockNumber = await contract.runner?.provider?.getBlockNumber(); - - if (!blockNumber) { - throw new Error("No block number found"); - } - const provider = getProvider(undefined, chainId); const gasPriceData = await getGasPrice(provider, chainId); - let gasLimit: bigint | undefined; + let finalGasLimit: bigint | undefined; // estimateGas might fail cos of incorrect tx params, // have to simulate tx without gasLimit in that case try { - gasLimit = opts.gasLimit ? opts.gasLimit : await getGasLimit(contract, method, params, opts.value); + finalGasLimit = gasLimit + ? gasLimit + : await publicClient + .estimateGas({ + to: address, + data: encodeFunctionData({ + abi: abi as Abi, + functionName: method as string, + args: params as any, + }), + value, + account, + }) + .then(applyGasLimitBuffer); } catch (e) { - gasLimit = undefined; - // + finalGasLimit = undefined; } const result = await processSimulation({ from: account, - to: typeof contract.target === "string" ? contract.target : await contract.target.getAddress(), - data: await contract.interface.encodeFunctionData(method, params), + to: address, + data: encodeFunctionData({ + abi: abi as Abi, + functionName: method as string, + args: params as any, + }), gasPriceData, chainId, config, - gasLimit, - value: opts.value ?? 0n, - blockNumber, - comment: opts.comment, - stateOverride: opts.stateOverride, + gasLimit: finalGasLimit, + value: value ?? 0n, + blockNumber: undefined, + comment, + stateOverride, }); return result; -}; +} async function processSimulation({ chainId, diff --git a/src/lib/transactions/iSigner.ts b/src/lib/transactions/iSigner.ts index 5f0ab76465..4725d59169 100644 --- a/src/lib/transactions/iSigner.ts +++ b/src/lib/transactions/iSigner.ts @@ -10,6 +10,7 @@ import { Account, Chain, Client, + PrivateKeyAccount, PublicActions, StateOverride, Transport, @@ -62,10 +63,11 @@ export interface ISignerInterface { } export class ISigner implements ISignerInterface { - private readonly type: "ethers" | "viem" | "viemPublicClient"; - private readonly signer: EthersSigner | ViemSigner | ViemPublicClient; + private readonly type: "ethers" | "viem" | "viemPublicClient" | "privateKeyAccount"; + private readonly signer: EthersSigner | ViemSigner | ViemPublicClient | PrivateKeyAccount; private _address: string; + private _initializationLock: Promise; get address() { return this._address; @@ -79,20 +81,35 @@ export class ISigner implements ISignerInterface { ethersSigner, viemSigner, viemPublicClient, + privateKeyAccount, }: { ethersSigner?: EthersSigner; viemSigner?: ViemSigner; viemPublicClient?: ViemPublicClient; + privateKeyAccount?: PrivateKeyAccount; }) { if (ethersSigner) { this.type = "ethers"; this.signer = ethersSigner; + + this._initializationLock = ethersSigner.getAddress().then((address) => { + this._address = address; + }); } else if (viemSigner) { this.type = "viem"; this.signer = viemSigner; + this._address = viemSigner.account.address; + this._initializationLock = Promise.resolve(); } else if (viemPublicClient) { this.type = "viemPublicClient"; this.signer = viemPublicClient; + this._address = zeroAddress; + this._initializationLock = Promise.resolve(); + } else if (privateKeyAccount) { + this.type = "privateKeyAccount"; + this.signer = privateKeyAccount; + this._address = privateKeyAccount.address; + this._initializationLock = Promise.resolve(); } } @@ -100,19 +117,25 @@ export class ISigner implements ISignerInterface { ethersSigner, viemSigner, viemPublicClient, + privateKeyAccount, }: { ethersSigner?: EthersSigner; viemSigner?: ViemSigner; viemPublicClient?: ViemPublicClient; + privateKeyAccount?: PrivateKeyAccount; }) { - const gmxSigner = new ISigner({ ethersSigner, viemSigner, viemPublicClient }); - await gmxSigner - .match({ - viem: (signer: ViemSigner) => signer.account.address, - ethers: (signer: EthersSigner) => signer.getAddress(), - viemPublicClient: () => zeroAddress, - }) - .then((address) => (gmxSigner._address = address)); + const gmxSigner = new ISigner({ ethersSigner, viemSigner, viemPublicClient, privateKeyAccount }); + await gmxSigner._initializationLock; + return gmxSigner; + } + + static fromPrivateKeyAccount(privateKeyAccount: PrivateKeyAccount): ISigner { + const gmxSigner = new ISigner({ privateKeyAccount }); + return gmxSigner; + } + + static fromViemSigner(viemSigner: ViemSigner): ISigner { + const gmxSigner = new ISigner({ viemSigner }); return gmxSigner; } @@ -235,6 +258,8 @@ export class ISigner implements ISignerInterface { // TODO: check if primaryType is correct signer.signTypedData({ domain, types, message: value, primaryType: Object.keys(types)[0] }), ethers: (signer: EthersSigner) => signer.signTypedData(domain, types, value), + privateKeyAccount: (signer: PrivateKeyAccount) => + signer.signTypedData({ domain, types, message: value, primaryType: Object.keys(types)[0] }), }); } @@ -297,6 +322,7 @@ export class ISigner implements ISignerInterface { viem: (signer: ViemSigner) => T | Promise; ethers: (signer: EthersSigner) => T | Promise; viemPublicClient?: (signer: ViemPublicClient) => T | Promise; + privateKeyAccount?: (signer: PrivateKeyAccount) => T | Promise; }): Promise { switch (this.type) { case "ethers": @@ -307,6 +333,12 @@ export class ISigner implements ISignerInterface { return branches.viemPublicClient ? await branches.viemPublicClient(this.signer as ViemPublicClient) : await branches.viem(this.signer as ViemSigner); + case "privateKeyAccount": { + if (!branches.privateKeyAccount) { + throw new Error("Private key account branch is not defined"); + } + return await branches.privateKeyAccount(this.signer as PrivateKeyAccount); + } default: { return mustNeverExist(this.type); } @@ -314,7 +346,7 @@ export class ISigner implements ISignerInterface { } } -async function toAddress(address: AddressLike | undefined | null): Promise { +export async function toAddress(address: AddressLike | undefined | null): Promise { if (address === undefined) { return undefined; } diff --git a/src/lib/wallets/rainbowKitConfig.ts b/src/lib/wallets/rainbowKitConfig.ts index 4a0e820378..a6907bcca9 100644 --- a/src/lib/wallets/rainbowKitConfig.ts +++ b/src/lib/wallets/rainbowKitConfig.ts @@ -13,12 +13,15 @@ import { walletConnectWallet, } from "@rainbow-me/rainbowkit/wallets"; import once from "lodash/once"; -import { createPublicClient, fallback, http, PublicClient, Transport } from "viem"; +import { createPublicClient, fallback, http, PublicClient, Transport, webSocket, WebSocketTransport } from "viem"; import { getViemChain, isTestnetChain } from "config/chains"; import { isDevelopment } from "config/env"; -import { getRpcProviders } from "config/rpc"; -import { VIEM_CHAIN_BY_CHAIN_ID } from "sdk/configs/chains"; +import { getRpcProviders, RpcConfig } from "config/rpc"; +import { RpcPurpose } from "config/rpc"; +import { metrics, ViemWsClientConnected, ViemWsClientDisconnected, ViemWsClientError } from "lib/metrics"; +import { getWsUrl } from "lib/rpc"; +import { AnyChainId, VIEM_CHAIN_BY_CHAIN_ID } from "sdk/configs/chains"; import { LRUCache } from "sdk/utils/LruCache"; const WALLET_CONNECT_PROJECT_ID = "de24cddbaf2a68f027eae30d9bb5df58"; @@ -72,35 +75,128 @@ export const getRainbowKitConfig = once(() => { }); }); +const TRANSPORTS_CACHE = new LRUCache(100); const PUBLIC_CLIENTS_CACHE = new LRUCache(100); -export function getPublicClientWithRpc(chainId: number): PublicClient { - const key = `chainId:${chainId}`; +const HTTP_TRANSPORT_OPTIONS = + import.meta.env.MODE === "test" + ? { + fetchOptions: { + headers: { + Origin: "http://localhost:3010", + }, + }, + } + : undefined; + +export function getRpcTransport(chainId: AnyChainId, purpose: RpcPurpose): Transport { + const key = `chainId:${chainId}:purpose:${purpose}`; + if (TRANSPORTS_CACHE.has(key)) { + return TRANSPORTS_CACHE.get(key)!; + } + const transport = fallback( + getRpcProviders(chainId, purpose).map((provider: RpcConfig) => http(provider.url, HTTP_TRANSPORT_OPTIONS)) + ); + TRANSPORTS_CACHE.set(key, transport); + return transport; +} + +export function getPublicClientWithRpc( + chainId: number, + options: { withWs?: boolean; withExpress?: boolean } = { withWs: false, withExpress: false } +): PublicClient { + const normalizedOptions = options.withWs ? { withWs: true, withExpress: false } : options; + const key = `chainId:${chainId}:ws:${normalizedOptions.withWs ? 1 : 0}:express:${normalizedOptions.withExpress ? 1 : 0}`; if (PUBLIC_CLIENTS_CACHE.has(key)) { return PUBLIC_CLIENTS_CACHE.get(key)!; } - const rpcProviders = getRpcProviders(chainId, "default"); + let transport: Transport; + let isWsTransport = false; + if (normalizedOptions.withWs) { + const wsUrl = getWsUrl(chainId as AnyChainId); + if (!wsUrl) { + // eslint-disable-next-line no-console + console.warn(`No WebSocket URL found for chain id: ${chainId}. Using HTTP instead.`); + transport = getRpcTransport(chainId as AnyChainId, "default"); + } else { + transport = webSocket(wsUrl); + + isWsTransport = true; + } + } else if (normalizedOptions.withExpress) { + transport = getRpcTransport(chainId as AnyChainId, "express"); + } else { + transport = getRpcTransport(chainId as AnyChainId, "default"); + } const publicClient = createPublicClient({ - transport: fallback([ - ...rpcProviders.map(({ url }) => - http( - url, - import.meta.env.MODE === "test" - ? { - fetchOptions: { - headers: { - Origin: "http://localhost:3010", - }, - }, - } - : undefined - ) - ), - ]), + transport, chain: getViemChain(chainId), }); + PUBLIC_CLIENTS_CACHE.set(key, publicClient); + + if (isWsTransport) { + setupWebSocketClientMetrics(publicClient, chainId); + } + return publicClient; } + +function setupWebSocketClientMetrics(publicClient: PublicClient, chainId: number) { + ( + publicClient.transport as unknown as ReturnType["config"] & + ReturnType["value"] + ) + .getRpcClient() + .then((client) => { + const rpcUrl = client.url; + const pushConnectedEvent = () => { + metrics.pushEvent({ + event: "viemWsClient.connected", + isError: false, + data: { + chainId, + rpcUrl, + }, + }); + }; + + const pushDisconnectedEvent = () => { + metrics.pushEvent({ + event: "viemWsClient.disconnected", + isError: false, + data: { + chainId, + rpcUrl, + }, + }); + }; + + const pushErrorEvent = () => { + metrics.pushEvent({ + event: "viemWsClient.error", + isError: true, + data: { + chainId, + rpcUrl, + }, + }); + }; + + if (client.socket.OPEN) { + pushConnectedEvent(); + } else { + client.socket.addEventListener("open", pushConnectedEvent, { once: true }); + } + + if (client.socket.CLOSED) { + pushDisconnectedEvent(); + } else { + client.socket.addEventListener("close", pushDisconnectedEvent, { once: true }); + } + + client.socket.addEventListener("error", pushErrorEvent); + }); +} diff --git a/src/pages/AccountTransfer/BeginAccountTransfer/BeginAccountTransfer.tsx b/src/pages/AccountTransfer/BeginAccountTransfer/BeginAccountTransfer.tsx index 0737448412..3bd605bdde 100644 --- a/src/pages/AccountTransfer/BeginAccountTransfer/BeginAccountTransfer.tsx +++ b/src/pages/AccountTransfer/BeginAccountTransfer/BeginAccountTransfer.tsx @@ -3,7 +3,7 @@ import { ethers } from "ethers"; import { useMemo, useState } from "react"; import { Link } from "react-router-dom"; import useSWR from "swr"; -import { zeroAddress } from "viem"; +import { isAddress, zeroAddress } from "viem"; import { getContract } from "config/contracts"; import { usePendingTxns } from "context/PendingTxnsContext/PendingTxnsContext"; @@ -43,8 +43,8 @@ export default function BeginAccountTransfer() { const [isApproving, setIsApproving] = useState(false); const [isTransferSubmittedModalVisible, setIsTransferSubmittedModalVisible] = useState(false); const [isAffiliateVesterSkipValidation, setIsAffiliateVesterSkipValidation] = useState(false); - let parsedReceiver = ethers.ZeroAddress; - if (ethers.isAddress(receiver)) { + let parsedReceiver: string = zeroAddress; + if (isAddress(receiver, { strict: false })) { parsedReceiver = receiver; } @@ -149,7 +149,7 @@ export default function BeginAccountTransfer() { (cumulativeGlpRewards && cumulativeGlpRewards > 0) || (transferredCumulativeGlpRewards && transferredCumulativeGlpRewards > 0) || (cumulativeFeeGlpTrackerRewards && cumulativeFeeGlpTrackerRewards > 0); - const hasPendingReceiver = pendingReceiver && pendingReceiver !== ethers.ZeroAddress; + const hasPendingReceiver = pendingReceiver && pendingReceiver !== zeroAddress; const getError = () => { if (!account) { @@ -164,7 +164,7 @@ export default function BeginAccountTransfer() { if (!receiver || receiver.length === 0) { return t`Enter Receiver Address`; } - if (!ethers.isAddress(receiver)) { + if (!isAddress(receiver, { strict: false })) { return t`Invalid Receiver Address`; } diff --git a/src/pages/AccountTransfer/CompleteAccountTransfer/CompleteAccountTransfer.tsx b/src/pages/AccountTransfer/CompleteAccountTransfer/CompleteAccountTransfer.tsx index 6fef995127..fc647c5d5e 100644 --- a/src/pages/AccountTransfer/CompleteAccountTransfer/CompleteAccountTransfer.tsx +++ b/src/pages/AccountTransfer/CompleteAccountTransfer/CompleteAccountTransfer.tsx @@ -3,6 +3,7 @@ import { ethers } from "ethers"; import { useState } from "react"; import { Link, useParams } from "react-router-dom"; import { useCopyToClipboard } from "react-use"; +import { isAddress } from "viem"; import { getContract } from "config/contracts"; import { usePendingTxns } from "context/PendingTxnsContext/PendingTxnsContext"; @@ -21,7 +22,8 @@ import PageTitle from "components/PageTitle/PageTitle"; export default function CompleteAccountTransfer() { const [, copyToClipboard] = useCopyToClipboard(); const { sender, receiver } = useParams<{ sender: string | undefined; receiver: string | undefined }>(); - const isSenderAndReceiverValid = ethers.isAddress(sender) && ethers.isAddress(receiver); + const isSenderAndReceiverValid = + sender && receiver && isAddress(sender, { strict: false }) && isAddress(receiver, { strict: false }); const { setPendingTxns } = usePendingTxns(); const { signer, account } = useWallet(); const [isTransferSubmittedModalVisible, setIsTransferSubmittedModalVisible] = useState(false); diff --git a/src/pages/NftWallet/NftWallet.jsx b/src/pages/NftWallet/NftWallet.jsx index 0e4e9b1d86..19e208befe 100644 --- a/src/pages/NftWallet/NftWallet.jsx +++ b/src/pages/NftWallet/NftWallet.jsx @@ -1,6 +1,7 @@ import { t, Trans } from "@lingui/macro"; import { ethers } from "ethers"; import { useState } from "react"; +import { isAddress } from "viem"; import { useChainId } from "lib/chains"; import { callContract } from "lib/contracts"; @@ -27,13 +28,13 @@ export default function NftWallet() { if (!receiver || receiver.length === 0) { return t`Enter Receiver Address`; } - if (!ethers.isAddress(receiver)) { + if (!isAddress(receiver, { strict: false })) { return t`Invalid Receiver Address`; } if (!nftAddress || nftAddress.length === 0) { return t`Enter NFT Address`; } - if (!ethers.isAddress(nftAddress)) { + if (!isAddress(nftAddress, { strict: false })) { return t`Invalid NFT Address`; } if (!nftId || nftId.toString().length === 0) { diff --git a/src/pages/ParseTransaction/parseTxEvents.ts b/src/pages/ParseTransaction/parseTxEvents.ts index b80c7cb7dd..100c48aac8 100644 --- a/src/pages/ParseTransaction/parseTxEvents.ts +++ b/src/pages/ParseTransaction/parseTxEvents.ts @@ -4,8 +4,9 @@ import { Abi, Hash, parseEventLogs, ParseEventLogsReturnType, PublicClient } fro import { expandDecimals } from "lib/numbers"; import { LogEntry } from "pages/ParseTransaction/types"; import { abis } from "sdk/abis"; +import { keccakString } from "sdk/utils/hash"; -const PANIC_SIGNATURE4 = ethers.id("Panic(uint256)").slice(0, 10); +const PANIC_SIGNATURE4 = keccakString("Panic(uint256)").slice(0, 10); const PANIC_MAP = { 0x00: "generic compiler inserted panics", 0x01: "call assert with an argument that evaluates to false", diff --git a/src/pages/PriceImpactRebatesStats/hooks/usePriceImpactRebatesStats.ts b/src/pages/PriceImpactRebatesStats/hooks/usePriceImpactRebatesStats.ts index 913efbd406..1db134fd05 100644 --- a/src/pages/PriceImpactRebatesStats/hooks/usePriceImpactRebatesStats.ts +++ b/src/pages/PriceImpactRebatesStats/hooks/usePriceImpactRebatesStats.ts @@ -1,7 +1,7 @@ import { gql } from "@apollo/client"; -import { getAddress } from "ethers"; import { useEffect, useState } from "react"; import { useLatest } from "react-use"; +import { getAddress } from "viem"; import { MarketInfo, useMarketsInfoRequest } from "domain/synthetics/markets"; import { TokenData, useTokensDataRequest } from "domain/synthetics/tokens"; diff --git a/src/pages/Referrals/Referrals.tsx b/src/pages/Referrals/Referrals.tsx index 670ecae4f5..43d074a72c 100644 --- a/src/pages/Referrals/Referrals.tsx +++ b/src/pages/Referrals/Referrals.tsx @@ -1,8 +1,8 @@ import { Trans, msg, t } from "@lingui/macro"; -import { ethers } from "ethers"; import { useEffect, useMemo } from "react"; import { useParams } from "react-router-dom"; import { useLocalStorage } from "react-use"; +import { getAddress, isAddress } from "viem"; import { BOTANIX } from "config/chains"; import { REFERRALS_SELECTED_TAB_KEY } from "config/localStorage"; @@ -53,8 +53,8 @@ function Referrals() { const { active, account: walletAccount, signer } = useWallet(); const { account: queryAccount } = useParams<{ account?: string }>(); let account; - if (queryAccount && ethers.isAddress(queryAccount)) { - account = ethers.getAddress(queryAccount); + if (queryAccount && isAddress(queryAccount, { strict: false })) { + account = getAddress(queryAccount); } else { account = walletAccount; } diff --git a/src/pages/SyntheticsStats/SyntheticsStats.tsx b/src/pages/SyntheticsStats/SyntheticsStats.tsx index ebca8e18c7..bfd21a8ac9 100644 --- a/src/pages/SyntheticsStats/SyntheticsStats.tsx +++ b/src/pages/SyntheticsStats/SyntheticsStats.tsx @@ -1,6 +1,6 @@ import cx from "classnames"; import { format } from "date-fns"; -import { ethers } from "ethers"; +import { zeroAddress, zeroHash } from "viem"; import { FACTOR_TO_PERCENT_MULTIPLIER_BIGINT } from "config/factors"; import { getBorrowingFactorPerPeriod, getFundingFactorPerPeriod, getPriceImpactUsd } from "domain/synthetics/fees"; @@ -65,10 +65,10 @@ export function SyntheticsStats() { if (a.indexTokenAddress === b.indexTokenAddress) { return 0; } - if (a.indexTokenAddress === ethers.ZeroAddress) { + if (a.indexTokenAddress === zeroAddress) { return 1; } - if (b.indexTokenAddress === ethers.ZeroAddress) { + if (b.indexTokenAddress === zeroAddress) { return -1; } return 0; @@ -218,7 +218,7 @@ export function SyntheticsStats() { label="Virtual Market Id" value={
- {market.virtualMarketId !== ethers.ZeroHash ? market.virtualMarketId : "-"} + {market.virtualMarketId !== zeroHash ? market.virtualMarketId : "-"}
} showDollar={false} @@ -228,7 +228,7 @@ export function SyntheticsStats() { label="Virtual Long Token Id" value={
- {market.virtualLongTokenId !== ethers.ZeroHash ? market.virtualLongTokenId : "-"} + {market.virtualLongTokenId !== zeroHash ? market.virtualLongTokenId : "-"}
} showDollar={false} @@ -238,7 +238,7 @@ export function SyntheticsStats() { label="Virtual Short Token Id" value={
- {market.virtualShortTokenId !== ethers.ZeroHash ? market.virtualShortTokenId : "-"} + {market.virtualShortTokenId !== zeroHash ? market.virtualShortTokenId : "-"}
} showDollar={false} diff --git a/src/typechain-types-stargate/IStargate.ts b/src/typechain-types-stargate/IStargate.ts deleted file mode 100644 index d363cff29e..0000000000 --- a/src/typechain-types-stargate/IStargate.ts +++ /dev/null @@ -1,344 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export type SendParamStruct = { - dstEid: BigNumberish; - to: BytesLike; - amountLD: BigNumberish; - minAmountLD: BigNumberish; - extraOptions: BytesLike; - composeMsg: BytesLike; - oftCmd: BytesLike; -}; - -export type SendParamStructOutput = [ - dstEid: bigint, - to: string, - amountLD: bigint, - minAmountLD: bigint, - extraOptions: string, - composeMsg: string, - oftCmd: string, -] & { - dstEid: bigint; - to: string; - amountLD: bigint; - minAmountLD: bigint; - extraOptions: string; - composeMsg: string; - oftCmd: string; -}; - -export type OFTLimitStruct = { - minAmountLD: BigNumberish; - maxAmountLD: BigNumberish; -}; - -export type OFTLimitStructOutput = [minAmountLD: bigint, maxAmountLD: bigint] & { - minAmountLD: bigint; - maxAmountLD: bigint; -}; - -export type OFTFeeDetailStruct = { - feeAmountLD: BigNumberish; - description: string; -}; - -export type OFTFeeDetailStructOutput = [feeAmountLD: bigint, description: string] & { - feeAmountLD: bigint; - description: string; -}; - -export type OFTReceiptStruct = { - amountSentLD: BigNumberish; - amountReceivedLD: BigNumberish; -}; - -export type OFTReceiptStructOutput = [amountSentLD: bigint, amountReceivedLD: bigint] & { - amountSentLD: bigint; - amountReceivedLD: bigint; -}; - -export type MessagingFeeStruct = { - nativeFee: BigNumberish; - lzTokenFee: BigNumberish; -}; - -export type MessagingFeeStructOutput = [nativeFee: bigint, lzTokenFee: bigint] & { - nativeFee: bigint; - lzTokenFee: bigint; -}; - -export type MessagingReceiptStruct = { - guid: BytesLike; - nonce: BigNumberish; - fee: MessagingFeeStruct; -}; - -export type MessagingReceiptStructOutput = [guid: string, nonce: bigint, fee: MessagingFeeStructOutput] & { - guid: string; - nonce: bigint; - fee: MessagingFeeStructOutput; -}; - -export type TicketStruct = { - ticketId: BigNumberish; - passengerBytes: BytesLike; -}; - -export type TicketStructOutput = [ticketId: bigint, passengerBytes: string] & { - ticketId: bigint; - passengerBytes: string; -}; - -export interface IStargateInterface extends Interface { - getFunction( - nameOrSignature: - | "approvalRequired" - | "oftVersion" - | "quoteOFT" - | "quoteSend" - | "send" - | "sendToken" - | "sharedDecimals" - | "stargateType" - | "token" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "OFTReceived" | "OFTSent"): EventFragment; - - encodeFunctionData(functionFragment: "approvalRequired", values?: undefined): string; - encodeFunctionData(functionFragment: "oftVersion", values?: undefined): string; - encodeFunctionData(functionFragment: "quoteOFT", values: [SendParamStruct]): string; - encodeFunctionData(functionFragment: "quoteSend", values: [SendParamStruct, boolean]): string; - encodeFunctionData(functionFragment: "send", values: [SendParamStruct, MessagingFeeStruct, AddressLike]): string; - encodeFunctionData(functionFragment: "sendToken", values: [SendParamStruct, MessagingFeeStruct, AddressLike]): string; - encodeFunctionData(functionFragment: "sharedDecimals", values?: undefined): string; - encodeFunctionData(functionFragment: "stargateType", values?: undefined): string; - encodeFunctionData(functionFragment: "token", values?: undefined): string; - - decodeFunctionResult(functionFragment: "approvalRequired", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "oftVersion", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "quoteOFT", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "quoteSend", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sharedDecimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stargateType", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "token", data: BytesLike): Result; -} - -export namespace OFTReceivedEvent { - export type InputTuple = [ - guid: BytesLike, - srcEid: BigNumberish, - toAddress: AddressLike, - amountReceivedLD: BigNumberish, - ]; - export type OutputTuple = [guid: string, srcEid: bigint, toAddress: string, amountReceivedLD: bigint]; - export interface OutputObject { - guid: string; - srcEid: bigint; - toAddress: string; - amountReceivedLD: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace OFTSentEvent { - export type InputTuple = [ - guid: BytesLike, - dstEid: BigNumberish, - fromAddress: AddressLike, - amountSentLD: BigNumberish, - amountReceivedLD: BigNumberish, - ]; - export type OutputTuple = [ - guid: string, - dstEid: bigint, - fromAddress: string, - amountSentLD: bigint, - amountReceivedLD: bigint, - ]; - export interface OutputObject { - guid: string; - dstEid: bigint; - fromAddress: string; - amountSentLD: bigint; - amountReceivedLD: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface IStargate extends BaseContract { - connect(runner?: ContractRunner | null): IStargate; - waitForDeployment(): Promise; - - interface: IStargateInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - approvalRequired: TypedContractMethod<[], [boolean], "view">; - - oftVersion: TypedContractMethod<[], [[string, bigint] & { interfaceId: string; version: bigint }], "view">; - - quoteOFT: TypedContractMethod< - [_sendParam: SendParamStruct], - [ - [OFTLimitStructOutput, OFTFeeDetailStructOutput[], OFTReceiptStructOutput] & { - oftFeeDetails: OFTFeeDetailStructOutput[]; - }, - ], - "view" - >; - - quoteSend: TypedContractMethod< - [_sendParam: SendParamStruct, _payInLzToken: boolean], - [MessagingFeeStructOutput], - "view" - >; - - send: TypedContractMethod< - [_sendParam: SendParamStruct, _fee: MessagingFeeStruct, _refundAddress: AddressLike], - [[MessagingReceiptStructOutput, OFTReceiptStructOutput]], - "payable" - >; - - sendToken: TypedContractMethod< - [_sendParam: SendParamStruct, _fee: MessagingFeeStruct, _refundAddress: AddressLike], - [ - [MessagingReceiptStructOutput, OFTReceiptStructOutput, TicketStructOutput] & { - msgReceipt: MessagingReceiptStructOutput; - oftReceipt: OFTReceiptStructOutput; - ticket: TicketStructOutput; - }, - ], - "payable" - >; - - sharedDecimals: TypedContractMethod<[], [bigint], "view">; - - stargateType: TypedContractMethod<[], [bigint], "view">; - - token: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "approvalRequired"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "oftVersion" - ): TypedContractMethod<[], [[string, bigint] & { interfaceId: string; version: bigint }], "view">; - getFunction(nameOrSignature: "quoteOFT"): TypedContractMethod< - [_sendParam: SendParamStruct], - [ - [OFTLimitStructOutput, OFTFeeDetailStructOutput[], OFTReceiptStructOutput] & { - oftFeeDetails: OFTFeeDetailStructOutput[]; - }, - ], - "view" - >; - getFunction( - nameOrSignature: "quoteSend" - ): TypedContractMethod<[_sendParam: SendParamStruct, _payInLzToken: boolean], [MessagingFeeStructOutput], "view">; - getFunction( - nameOrSignature: "send" - ): TypedContractMethod< - [_sendParam: SendParamStruct, _fee: MessagingFeeStruct, _refundAddress: AddressLike], - [[MessagingReceiptStructOutput, OFTReceiptStructOutput]], - "payable" - >; - getFunction(nameOrSignature: "sendToken"): TypedContractMethod< - [_sendParam: SendParamStruct, _fee: MessagingFeeStruct, _refundAddress: AddressLike], - [ - [MessagingReceiptStructOutput, OFTReceiptStructOutput, TicketStructOutput] & { - msgReceipt: MessagingReceiptStructOutput; - oftReceipt: OFTReceiptStructOutput; - ticket: TicketStructOutput; - }, - ], - "payable" - >; - getFunction(nameOrSignature: "sharedDecimals"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "stargateType"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "token"): TypedContractMethod<[], [string], "view">; - - getEvent( - key: "OFTReceived" - ): TypedContractEvent; - getEvent( - key: "OFTSent" - ): TypedContractEvent; - - filters: { - "OFTReceived(bytes32,uint32,address,uint256)": TypedContractEvent< - OFTReceivedEvent.InputTuple, - OFTReceivedEvent.OutputTuple, - OFTReceivedEvent.OutputObject - >; - OFTReceived: TypedContractEvent< - OFTReceivedEvent.InputTuple, - OFTReceivedEvent.OutputTuple, - OFTReceivedEvent.OutputObject - >; - - "OFTSent(bytes32,uint32,address,uint256,uint256)": TypedContractEvent< - OFTSentEvent.InputTuple, - OFTSentEvent.OutputTuple, - OFTSentEvent.OutputObject - >; - OFTSent: TypedContractEvent; - }; -} diff --git a/src/typechain-types-stargate/common.ts b/src/typechain-types-stargate/common.ts deleted file mode 100644 index e951924406..0000000000 --- a/src/typechain-types-stargate/common.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - FunctionFragment, - Typed, - EventFragment, - ContractTransaction, - ContractTransactionResponse, - DeferredTopicFilter, - EventLog, - TransactionRequest, - LogDescription, -} from "ethers"; - -export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {} - -export interface TypedContractEvent< - InputTuple extends Array = any, - OutputTuple extends Array = any, - OutputObject = any, -> { - (...args: Partial): TypedDeferredTopicFilter>; - name: string; - fragment: EventFragment; - getFragment(...args: Partial): EventFragment; -} - -type __TypechainAOutputTuple = T extends TypedContractEvent ? W : never; -type __TypechainOutputObject = T extends TypedContractEvent ? V : never; - -export interface TypedEventLog extends Omit { - args: __TypechainAOutputTuple & __TypechainOutputObject; -} - -export interface TypedLogDescription extends Omit { - args: __TypechainAOutputTuple & __TypechainOutputObject; -} - -export type TypedListener = ( - ...listenerArg: [...__TypechainAOutputTuple, TypedEventLog, ...undefined[]] -) => void; - -export type MinEthersFactory = { - deploy(...a: ARGS[]): Promise; -}; - -export type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never; -export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; - -export type StateMutability = "nonpayable" | "payable" | "view"; - -export type BaseOverrides = Omit; -export type NonPayableOverrides = Omit; -export type PayableOverrides = Omit; -export type ViewOverrides = Omit; -export type Overrides = S extends "nonpayable" - ? NonPayableOverrides - : S extends "payable" - ? PayableOverrides - : ViewOverrides; - -export type PostfixOverrides, S extends StateMutability> = A | [...A, Overrides]; -export type ContractMethodArgs, S extends StateMutability> = PostfixOverrides< - { [I in keyof A]-?: A[I] | Typed }, - S ->; - -export type DefaultReturnType = R extends Array ? R[0] : R; - -// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { -export interface TypedContractMethod< - A extends Array = Array, - R = any, - S extends StateMutability = "payable", -> { - ( - ...args: ContractMethodArgs - ): S extends "view" ? Promise> : Promise; - - name: string; - - fragment: FunctionFragment; - - getFragment(...args: ContractMethodArgs): FunctionFragment; - - populateTransaction(...args: ContractMethodArgs): Promise; - staticCall(...args: ContractMethodArgs): Promise>; - send(...args: ContractMethodArgs): Promise; - estimateGas(...args: ContractMethodArgs): Promise; - staticCallResult(...args: ContractMethodArgs): Promise; -} diff --git a/src/typechain-types-stargate/factories/IStargate__factory.ts b/src/typechain-types-stargate/factories/IStargate__factory.ts deleted file mode 100644 index 9d2ed2155c..0000000000 --- a/src/typechain-types-stargate/factories/IStargate__factory.ts +++ /dev/null @@ -1,618 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { IStargate, IStargateInterface } from "../IStargate"; - -const _abi = [ - { - inputs: [], - name: "InvalidLocalDecimals", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountLD", - type: "uint256", - }, - { - internalType: "uint256", - name: "minAmountLD", - type: "uint256", - }, - ], - name: "SlippageExceeded", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "guid", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint32", - name: "srcEid", - type: "uint32", - }, - { - indexed: true, - internalType: "address", - name: "toAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountReceivedLD", - type: "uint256", - }, - ], - name: "OFTReceived", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "guid", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint32", - name: "dstEid", - type: "uint32", - }, - { - indexed: true, - internalType: "address", - name: "fromAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountSentLD", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountReceivedLD", - type: "uint256", - }, - ], - name: "OFTSent", - type: "event", - }, - { - inputs: [], - name: "approvalRequired", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "oftVersion", - outputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - { - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint32", - name: "dstEid", - type: "uint32", - }, - { - internalType: "bytes32", - name: "to", - type: "bytes32", - }, - { - internalType: "uint256", - name: "amountLD", - type: "uint256", - }, - { - internalType: "uint256", - name: "minAmountLD", - type: "uint256", - }, - { - internalType: "bytes", - name: "extraOptions", - type: "bytes", - }, - { - internalType: "bytes", - name: "composeMsg", - type: "bytes", - }, - { - internalType: "bytes", - name: "oftCmd", - type: "bytes", - }, - ], - internalType: "struct SendParam", - name: "_sendParam", - type: "tuple", - }, - ], - name: "quoteOFT", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "minAmountLD", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxAmountLD", - type: "uint256", - }, - ], - internalType: "struct OFTLimit", - name: "", - type: "tuple", - }, - { - components: [ - { - internalType: "int256", - name: "feeAmountLD", - type: "int256", - }, - { - internalType: "string", - name: "description", - type: "string", - }, - ], - internalType: "struct OFTFeeDetail[]", - name: "oftFeeDetails", - type: "tuple[]", - }, - { - components: [ - { - internalType: "uint256", - name: "amountSentLD", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountReceivedLD", - type: "uint256", - }, - ], - internalType: "struct OFTReceipt", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint32", - name: "dstEid", - type: "uint32", - }, - { - internalType: "bytes32", - name: "to", - type: "bytes32", - }, - { - internalType: "uint256", - name: "amountLD", - type: "uint256", - }, - { - internalType: "uint256", - name: "minAmountLD", - type: "uint256", - }, - { - internalType: "bytes", - name: "extraOptions", - type: "bytes", - }, - { - internalType: "bytes", - name: "composeMsg", - type: "bytes", - }, - { - internalType: "bytes", - name: "oftCmd", - type: "bytes", - }, - ], - internalType: "struct SendParam", - name: "_sendParam", - type: "tuple", - }, - { - internalType: "bool", - name: "_payInLzToken", - type: "bool", - }, - ], - name: "quoteSend", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "nativeFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "lzTokenFee", - type: "uint256", - }, - ], - internalType: "struct MessagingFee", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint32", - name: "dstEid", - type: "uint32", - }, - { - internalType: "bytes32", - name: "to", - type: "bytes32", - }, - { - internalType: "uint256", - name: "amountLD", - type: "uint256", - }, - { - internalType: "uint256", - name: "minAmountLD", - type: "uint256", - }, - { - internalType: "bytes", - name: "extraOptions", - type: "bytes", - }, - { - internalType: "bytes", - name: "composeMsg", - type: "bytes", - }, - { - internalType: "bytes", - name: "oftCmd", - type: "bytes", - }, - ], - internalType: "struct SendParam", - name: "_sendParam", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "nativeFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "lzTokenFee", - type: "uint256", - }, - ], - internalType: "struct MessagingFee", - name: "_fee", - type: "tuple", - }, - { - internalType: "address", - name: "_refundAddress", - type: "address", - }, - ], - name: "send", - outputs: [ - { - components: [ - { - internalType: "bytes32", - name: "guid", - type: "bytes32", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - components: [ - { - internalType: "uint256", - name: "nativeFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "lzTokenFee", - type: "uint256", - }, - ], - internalType: "struct MessagingFee", - name: "fee", - type: "tuple", - }, - ], - internalType: "struct MessagingReceipt", - name: "", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "amountSentLD", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountReceivedLD", - type: "uint256", - }, - ], - internalType: "struct OFTReceipt", - name: "", - type: "tuple", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint32", - name: "dstEid", - type: "uint32", - }, - { - internalType: "bytes32", - name: "to", - type: "bytes32", - }, - { - internalType: "uint256", - name: "amountLD", - type: "uint256", - }, - { - internalType: "uint256", - name: "minAmountLD", - type: "uint256", - }, - { - internalType: "bytes", - name: "extraOptions", - type: "bytes", - }, - { - internalType: "bytes", - name: "composeMsg", - type: "bytes", - }, - { - internalType: "bytes", - name: "oftCmd", - type: "bytes", - }, - ], - internalType: "struct SendParam", - name: "_sendParam", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "nativeFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "lzTokenFee", - type: "uint256", - }, - ], - internalType: "struct MessagingFee", - name: "_fee", - type: "tuple", - }, - { - internalType: "address", - name: "_refundAddress", - type: "address", - }, - ], - name: "sendToken", - outputs: [ - { - components: [ - { - internalType: "bytes32", - name: "guid", - type: "bytes32", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - components: [ - { - internalType: "uint256", - name: "nativeFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "lzTokenFee", - type: "uint256", - }, - ], - internalType: "struct MessagingFee", - name: "fee", - type: "tuple", - }, - ], - internalType: "struct MessagingReceipt", - name: "msgReceipt", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "amountSentLD", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountReceivedLD", - type: "uint256", - }, - ], - internalType: "struct OFTReceipt", - name: "oftReceipt", - type: "tuple", - }, - { - components: [ - { - internalType: "uint72", - name: "ticketId", - type: "uint72", - }, - { - internalType: "bytes", - name: "passengerBytes", - type: "bytes", - }, - ], - internalType: "struct Ticket", - name: "ticket", - type: "tuple", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "sharedDecimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stargateType", - outputs: [ - { - internalType: "enum StargateType", - name: "", - type: "uint8", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [], - name: "token", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class IStargate__factory { - static readonly abi = _abi; - static createInterface(): IStargateInterface { - return new Interface(_abi) as IStargateInterface; - } - static connect(address: string, runner?: ContractRunner | null): IStargate { - return new Contract(address, _abi, runner) as unknown as IStargate; - } -} diff --git a/src/typechain-types-stargate/factories/index.ts b/src/typechain-types-stargate/factories/index.ts deleted file mode 100644 index 1b90f10d81..0000000000 --- a/src/typechain-types-stargate/factories/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { IStargate__factory } from "./IStargate__factory"; diff --git a/src/typechain-types-stargate/index.ts b/src/typechain-types-stargate/index.ts deleted file mode 100644 index ec0562c9eb..0000000000 --- a/src/typechain-types-stargate/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IStargate } from "./IStargate"; -export * as factories from "./factories"; -export { IStargate__factory } from "./factories/IStargate__factory"; diff --git a/src/typechain-types/ArbitrumNodeInterface.ts b/src/typechain-types/ArbitrumNodeInterface.ts deleted file mode 100644 index dcdf2aca93..0000000000 --- a/src/typechain-types/ArbitrumNodeInterface.ts +++ /dev/null @@ -1,242 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface ArbitrumNodeInterfaceInterface extends Interface { - getFunction( - nameOrSignature: - | "constructOutboxProof" - | "estimateRetryableTicket" - | "findBatchContainingBlock" - | "gasEstimateComponents" - | "gasEstimateL1Component" - | "getL1Confirmations" - | "legacyLookupMessageBatchProof" - | "nitroGenesisBlock" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "constructOutboxProof", values: [BigNumberish, BigNumberish]): string; - encodeFunctionData( - functionFragment: "estimateRetryableTicket", - values: [AddressLike, BigNumberish, AddressLike, BigNumberish, AddressLike, AddressLike, BytesLike] - ): string; - encodeFunctionData(functionFragment: "findBatchContainingBlock", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "gasEstimateComponents", values: [AddressLike, boolean, BytesLike]): string; - encodeFunctionData(functionFragment: "gasEstimateL1Component", values: [AddressLike, boolean, BytesLike]): string; - encodeFunctionData(functionFragment: "getL1Confirmations", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "legacyLookupMessageBatchProof", values: [BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "nitroGenesisBlock", values?: undefined): string; - - decodeFunctionResult(functionFragment: "constructOutboxProof", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "estimateRetryableTicket", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "findBatchContainingBlock", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gasEstimateComponents", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gasEstimateL1Component", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getL1Confirmations", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "legacyLookupMessageBatchProof", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nitroGenesisBlock", data: BytesLike): Result; -} - -export interface ArbitrumNodeInterface extends BaseContract { - connect(runner?: ContractRunner | null): ArbitrumNodeInterface; - waitForDeployment(): Promise; - - interface: ArbitrumNodeInterfaceInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - constructOutboxProof: TypedContractMethod< - [size: BigNumberish, leaf: BigNumberish], - [ - [string, string, string[]] & { - send: string; - root: string; - proof: string[]; - }, - ], - "view" - >; - - estimateRetryableTicket: TypedContractMethod< - [ - sender: AddressLike, - deposit: BigNumberish, - to: AddressLike, - l2CallValue: BigNumberish, - excessFeeRefundAddress: AddressLike, - callValueRefundAddress: AddressLike, - data: BytesLike, - ], - [void], - "nonpayable" - >; - - findBatchContainingBlock: TypedContractMethod<[blockNum: BigNumberish], [bigint], "view">; - - gasEstimateComponents: TypedContractMethod< - [to: AddressLike, contractCreation: boolean, data: BytesLike], - [ - [bigint, bigint, bigint, bigint] & { - gasEstimate: bigint; - gasEstimateForL1: bigint; - baseFee: bigint; - l1BaseFeeEstimate: bigint; - }, - ], - "payable" - >; - - gasEstimateL1Component: TypedContractMethod< - [to: AddressLike, contractCreation: boolean, data: BytesLike], - [ - [bigint, bigint, bigint] & { - gasEstimateForL1: bigint; - baseFee: bigint; - l1BaseFeeEstimate: bigint; - }, - ], - "payable" - >; - - getL1Confirmations: TypedContractMethod<[blockHash: BytesLike], [bigint], "view">; - - legacyLookupMessageBatchProof: TypedContractMethod< - [batchNum: BigNumberish, index: BigNumberish], - [ - [string[], bigint, string, string, bigint, bigint, bigint, bigint, string] & { - proof: string[]; - path: bigint; - l2Sender: string; - l1Dest: string; - l2Block: bigint; - l1Block: bigint; - timestamp: bigint; - amount: bigint; - calldataForL1: string; - }, - ], - "view" - >; - - nitroGenesisBlock: TypedContractMethod<[], [bigint], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "constructOutboxProof"): TypedContractMethod< - [size: BigNumberish, leaf: BigNumberish], - [ - [string, string, string[]] & { - send: string; - root: string; - proof: string[]; - }, - ], - "view" - >; - getFunction( - nameOrSignature: "estimateRetryableTicket" - ): TypedContractMethod< - [ - sender: AddressLike, - deposit: BigNumberish, - to: AddressLike, - l2CallValue: BigNumberish, - excessFeeRefundAddress: AddressLike, - callValueRefundAddress: AddressLike, - data: BytesLike, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "findBatchContainingBlock" - ): TypedContractMethod<[blockNum: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "gasEstimateComponents"): TypedContractMethod< - [to: AddressLike, contractCreation: boolean, data: BytesLike], - [ - [bigint, bigint, bigint, bigint] & { - gasEstimate: bigint; - gasEstimateForL1: bigint; - baseFee: bigint; - l1BaseFeeEstimate: bigint; - }, - ], - "payable" - >; - getFunction(nameOrSignature: "gasEstimateL1Component"): TypedContractMethod< - [to: AddressLike, contractCreation: boolean, data: BytesLike], - [ - [bigint, bigint, bigint] & { - gasEstimateForL1: bigint; - baseFee: bigint; - l1BaseFeeEstimate: bigint; - }, - ], - "payable" - >; - getFunction(nameOrSignature: "getL1Confirmations"): TypedContractMethod<[blockHash: BytesLike], [bigint], "view">; - getFunction(nameOrSignature: "legacyLookupMessageBatchProof"): TypedContractMethod< - [batchNum: BigNumberish, index: BigNumberish], - [ - [string[], bigint, string, string, bigint, bigint, bigint, bigint, string] & { - proof: string[]; - path: bigint; - l2Sender: string; - l1Dest: string; - l2Block: bigint; - l1Block: bigint; - timestamp: bigint; - amount: bigint; - calldataForL1: string; - }, - ], - "view" - >; - getFunction(nameOrSignature: "nitroGenesisBlock"): TypedContractMethod<[], [bigint], "view">; - - filters: {}; -} diff --git a/src/typechain-types/ClaimHandler.ts b/src/typechain-types/ClaimHandler.ts deleted file mode 100644 index feb08ac621..0000000000 --- a/src/typechain-types/ClaimHandler.ts +++ /dev/null @@ -1,248 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace ClaimHandler { - export type ClaimParamStruct = { - token: AddressLike; - distributionId: BigNumberish; - termsSignature: BytesLike; - }; - - export type ClaimParamStructOutput = [token: string, distributionId: bigint, termsSignature: string] & { - token: string; - distributionId: bigint; - termsSignature: string; - }; - - export type DepositParamStruct = { - account: AddressLike; - amount: BigNumberish; - }; - - export type DepositParamStructOutput = [account: string, amount: bigint] & { - account: string; - amount: bigint; - }; - - export type TransferClaimParamStruct = { - token: AddressLike; - distributionId: BigNumberish; - fromAccount: AddressLike; - toAccount: AddressLike; - }; - - export type TransferClaimParamStructOutput = [ - token: string, - distributionId: bigint, - fromAccount: string, - toAccount: string, - ] & { - token: string; - distributionId: bigint; - fromAccount: string; - toAccount: string; - }; - - export type WithdrawParamStruct = { - account: AddressLike; - distributionId: BigNumberish; - }; - - export type WithdrawParamStructOutput = [account: string, distributionId: bigint] & { - account: string; - distributionId: bigint; - }; -} - -export interface ClaimHandlerInterface extends Interface { - getFunction( - nameOrSignature: - | "claimFunds" - | "claimVault" - | "dataStore" - | "depositFunds" - | "eventEmitter" - | "getClaimableAmount" - | "getTotalClaimableAmount" - | "removeTerms" - | "roleStore" - | "setTerms" - | "transferClaim" - | "withdrawFunds" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "claimFunds", values: [ClaimHandler.ClaimParamStruct[], AddressLike]): string; - encodeFunctionData(functionFragment: "claimVault", values?: undefined): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData( - functionFragment: "depositFunds", - values: [AddressLike, BigNumberish, ClaimHandler.DepositParamStruct[]] - ): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData( - functionFragment: "getClaimableAmount", - values: [AddressLike, AddressLike, BigNumberish[]] - ): string; - encodeFunctionData(functionFragment: "getTotalClaimableAmount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "removeTerms", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "setTerms", values: [BigNumberish, string]): string; - encodeFunctionData( - functionFragment: "transferClaim", - values: [AddressLike, ClaimHandler.TransferClaimParamStruct[]] - ): string; - encodeFunctionData( - functionFragment: "withdrawFunds", - values: [AddressLike, ClaimHandler.WithdrawParamStruct[], AddressLike] - ): string; - - decodeFunctionResult(functionFragment: "claimFunds", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "depositFunds", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getClaimableAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTotalClaimableAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeTerms", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTerms", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferClaim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawFunds", data: BytesLike): Result; -} - -export interface ClaimHandler extends BaseContract { - connect(runner?: ContractRunner | null): ClaimHandler; - waitForDeployment(): Promise; - - interface: ClaimHandlerInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - claimFunds: TypedContractMethod< - [params: ClaimHandler.ClaimParamStruct[], receiver: AddressLike], - [void], - "nonpayable" - >; - - claimVault: TypedContractMethod<[], [string], "view">; - - dataStore: TypedContractMethod<[], [string], "view">; - - depositFunds: TypedContractMethod< - [token: AddressLike, distributionId: BigNumberish, params: ClaimHandler.DepositParamStruct[]], - [void], - "nonpayable" - >; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - getClaimableAmount: TypedContractMethod< - [account: AddressLike, token: AddressLike, distributionIds: BigNumberish[]], - [bigint], - "view" - >; - - getTotalClaimableAmount: TypedContractMethod<[token: AddressLike], [bigint], "view">; - - removeTerms: TypedContractMethod<[distributionId: BigNumberish], [void], "nonpayable">; - - roleStore: TypedContractMethod<[], [string], "view">; - - setTerms: TypedContractMethod<[distributionId: BigNumberish, terms: string], [void], "nonpayable">; - - transferClaim: TypedContractMethod< - [token: AddressLike, params: ClaimHandler.TransferClaimParamStruct[]], - [void], - "nonpayable" - >; - - withdrawFunds: TypedContractMethod< - [token: AddressLike, params: ClaimHandler.WithdrawParamStruct[], receiver: AddressLike], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "claimFunds" - ): TypedContractMethod<[params: ClaimHandler.ClaimParamStruct[], receiver: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "claimVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "depositFunds" - ): TypedContractMethod< - [token: AddressLike, distributionId: BigNumberish, params: ClaimHandler.DepositParamStruct[]], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "getClaimableAmount" - ): TypedContractMethod<[account: AddressLike, token: AddressLike, distributionIds: BigNumberish[]], [bigint], "view">; - getFunction(nameOrSignature: "getTotalClaimableAmount"): TypedContractMethod<[token: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "removeTerms" - ): TypedContractMethod<[distributionId: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "setTerms" - ): TypedContractMethod<[distributionId: BigNumberish, terms: string], [void], "nonpayable">; - getFunction( - nameOrSignature: "transferClaim" - ): TypedContractMethod<[token: AddressLike, params: ClaimHandler.TransferClaimParamStruct[]], [void], "nonpayable">; - getFunction( - nameOrSignature: "withdrawFunds" - ): TypedContractMethod< - [token: AddressLike, params: ClaimHandler.WithdrawParamStruct[], receiver: AddressLike], - [void], - "nonpayable" - >; - - filters: {}; -} diff --git a/src/typechain-types/CustomErrors.ts b/src/typechain-types/CustomErrors.ts deleted file mode 100644 index db7ce6d56f..0000000000 --- a/src/typechain-types/CustomErrors.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, FunctionFragment, Interface, ContractRunner, ContractMethod, Listener } from "ethers"; -import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "./common"; - -export interface CustomErrorsInterface extends Interface {} - -export interface CustomErrors extends BaseContract { - connect(runner?: ContractRunner | null): CustomErrors; - waitForDeployment(): Promise; - - interface: CustomErrorsInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - getFunction(key: string | FunctionFragment): T; - - filters: {}; -} diff --git a/src/typechain-types/DataStore.ts b/src/typechain-types/DataStore.ts deleted file mode 100644 index 8af199053d..0000000000 --- a/src/typechain-types/DataStore.ts +++ /dev/null @@ -1,596 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface DataStoreInterface extends Interface { - getFunction( - nameOrSignature: - | "addAddress" - | "addBytes32" - | "addUint" - | "addressArrayValues" - | "addressValues" - | "applyBoundedDeltaToUint" - | "applyDeltaToInt" - | "applyDeltaToUint(bytes32,int256,string)" - | "applyDeltaToUint(bytes32,uint256)" - | "boolArrayValues" - | "boolValues" - | "bytes32ArrayValues" - | "bytes32Values" - | "containsAddress" - | "containsBytes32" - | "containsUint" - | "decrementInt" - | "decrementUint" - | "getAddress" - | "getAddressArray" - | "getAddressCount" - | "getAddressValuesAt" - | "getBool" - | "getBoolArray" - | "getBytes32" - | "getBytes32Array" - | "getBytes32Count" - | "getBytes32ValuesAt" - | "getInt" - | "getIntArray" - | "getString" - | "getStringArray" - | "getUint" - | "getUintArray" - | "getUintCount" - | "getUintValuesAt" - | "incrementInt" - | "incrementUint" - | "intArrayValues" - | "intValues" - | "removeAddress(bytes32,address)" - | "removeAddress(bytes32)" - | "removeAddressArray" - | "removeBool" - | "removeBoolArray" - | "removeBytes32(bytes32,bytes32)" - | "removeBytes32(bytes32)" - | "removeBytes32Array" - | "removeInt" - | "removeIntArray" - | "removeString" - | "removeStringArray" - | "removeUint(bytes32)" - | "removeUint(bytes32,uint256)" - | "removeUintArray" - | "roleStore" - | "setAddress" - | "setAddressArray" - | "setBool" - | "setBoolArray" - | "setBytes32" - | "setBytes32Array" - | "setInt" - | "setIntArray" - | "setString" - | "setStringArray" - | "setUint" - | "setUintArray" - | "stringArrayValues" - | "stringValues" - | "uintArrayValues" - | "uintValues" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "addAddress", values: [BytesLike, AddressLike]): string; - encodeFunctionData(functionFragment: "addBytes32", values: [BytesLike, BytesLike]): string; - encodeFunctionData(functionFragment: "addUint", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "addressArrayValues", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "addressValues", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "applyBoundedDeltaToUint", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "applyDeltaToInt", values: [BytesLike, BigNumberish]): string; - encodeFunctionData( - functionFragment: "applyDeltaToUint(bytes32,int256,string)", - values: [BytesLike, BigNumberish, string] - ): string; - encodeFunctionData(functionFragment: "applyDeltaToUint(bytes32,uint256)", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "boolArrayValues", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "boolValues", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "bytes32ArrayValues", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "bytes32Values", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "containsAddress", values: [BytesLike, AddressLike]): string; - encodeFunctionData(functionFragment: "containsBytes32", values: [BytesLike, BytesLike]): string; - encodeFunctionData(functionFragment: "containsUint", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "decrementInt", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "decrementUint", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "getAddress", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getAddressArray", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getAddressCount", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getAddressValuesAt", values: [BytesLike, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "getBool", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getBoolArray", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getBytes32", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getBytes32Array", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getBytes32Count", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getBytes32ValuesAt", values: [BytesLike, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "getInt", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getIntArray", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getString", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getStringArray", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getUint", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getUintArray", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getUintCount", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getUintValuesAt", values: [BytesLike, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "incrementInt", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "incrementUint", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "intArrayValues", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "intValues", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeAddress(bytes32,address)", values: [BytesLike, AddressLike]): string; - encodeFunctionData(functionFragment: "removeAddress(bytes32)", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeAddressArray", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeBool", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeBoolArray", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeBytes32(bytes32,bytes32)", values: [BytesLike, BytesLike]): string; - encodeFunctionData(functionFragment: "removeBytes32(bytes32)", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeBytes32Array", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeInt", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeIntArray", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeString", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeStringArray", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeUint(bytes32)", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "removeUint(bytes32,uint256)", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "removeUintArray", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "setAddress", values: [BytesLike, AddressLike]): string; - encodeFunctionData(functionFragment: "setAddressArray", values: [BytesLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "setBool", values: [BytesLike, boolean]): string; - encodeFunctionData(functionFragment: "setBoolArray", values: [BytesLike, boolean[]]): string; - encodeFunctionData(functionFragment: "setBytes32", values: [BytesLike, BytesLike]): string; - encodeFunctionData(functionFragment: "setBytes32Array", values: [BytesLike, BytesLike[]]): string; - encodeFunctionData(functionFragment: "setInt", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setIntArray", values: [BytesLike, BigNumberish[]]): string; - encodeFunctionData(functionFragment: "setString", values: [BytesLike, string]): string; - encodeFunctionData(functionFragment: "setStringArray", values: [BytesLike, string[]]): string; - encodeFunctionData(functionFragment: "setUint", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setUintArray", values: [BytesLike, BigNumberish[]]): string; - encodeFunctionData(functionFragment: "stringArrayValues", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "stringValues", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "uintArrayValues", values: [BytesLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "uintValues", values: [BytesLike]): string; - - decodeFunctionResult(functionFragment: "addAddress", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addBytes32", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addUint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addressArrayValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addressValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "applyBoundedDeltaToUint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "applyDeltaToInt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "applyDeltaToUint(bytes32,int256,string)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "applyDeltaToUint(bytes32,uint256)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "boolArrayValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "boolValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "bytes32ArrayValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "bytes32Values", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "containsAddress", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "containsBytes32", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "containsUint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decrementInt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decrementUint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAddress", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAddressArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAddressCount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAddressValuesAt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getBool", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getBoolArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getBytes32", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getBytes32Array", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getBytes32Count", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getBytes32ValuesAt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getInt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getIntArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getString", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getStringArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getUint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getUintArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getUintCount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getUintValuesAt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "incrementInt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "incrementUint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "intArrayValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "intValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeAddress(bytes32,address)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeAddress(bytes32)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeAddressArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeBool", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeBoolArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeBytes32(bytes32,bytes32)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeBytes32(bytes32)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeBytes32Array", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeInt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeIntArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeString", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeStringArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeUint(bytes32)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeUint(bytes32,uint256)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeUintArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setAddress", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setAddressArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setBool", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setBoolArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setBytes32", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setBytes32Array", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIntArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setString", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setStringArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setUint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setUintArray", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stringArrayValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stringValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "uintArrayValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "uintValues", data: BytesLike): Result; -} - -export interface DataStore extends BaseContract { - connect(runner?: ContractRunner | null): DataStore; - waitForDeployment(): Promise; - - interface: DataStoreInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - addAddress: TypedContractMethod<[setKey: BytesLike, value: AddressLike], [void], "nonpayable">; - - addBytes32: TypedContractMethod<[setKey: BytesLike, value: BytesLike], [void], "nonpayable">; - - addUint: TypedContractMethod<[setKey: BytesLike, value: BigNumberish], [void], "nonpayable">; - - addressArrayValues: TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [string], "view">; - - addressValues: TypedContractMethod<[arg0: BytesLike], [string], "view">; - - applyBoundedDeltaToUint: TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - - applyDeltaToInt: TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - - "applyDeltaToUint(bytes32,int256,string)": TypedContractMethod< - [key: BytesLike, value: BigNumberish, errorMessage: string], - [bigint], - "nonpayable" - >; - - "applyDeltaToUint(bytes32,uint256)": TypedContractMethod< - [key: BytesLike, value: BigNumberish], - [bigint], - "nonpayable" - >; - - boolArrayValues: TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [boolean], "view">; - - boolValues: TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - - bytes32ArrayValues: TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [string], "view">; - - bytes32Values: TypedContractMethod<[arg0: BytesLike], [string], "view">; - - containsAddress: TypedContractMethod<[setKey: BytesLike, value: AddressLike], [boolean], "view">; - - containsBytes32: TypedContractMethod<[setKey: BytesLike, value: BytesLike], [boolean], "view">; - - containsUint: TypedContractMethod<[setKey: BytesLike, value: BigNumberish], [boolean], "view">; - - decrementInt: TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - - decrementUint: TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - - getAddress: TypedContractMethod<[key: BytesLike], [string], "view">; - - getAddressArray: TypedContractMethod<[key: BytesLike], [string[]], "view">; - - getAddressCount: TypedContractMethod<[setKey: BytesLike], [bigint], "view">; - - getAddressValuesAt: TypedContractMethod< - [setKey: BytesLike, start: BigNumberish, end: BigNumberish], - [string[]], - "view" - >; - - getBool: TypedContractMethod<[key: BytesLike], [boolean], "view">; - - getBoolArray: TypedContractMethod<[key: BytesLike], [boolean[]], "view">; - - getBytes32: TypedContractMethod<[key: BytesLike], [string], "view">; - - getBytes32Array: TypedContractMethod<[key: BytesLike], [string[]], "view">; - - getBytes32Count: TypedContractMethod<[setKey: BytesLike], [bigint], "view">; - - getBytes32ValuesAt: TypedContractMethod< - [setKey: BytesLike, start: BigNumberish, end: BigNumberish], - [string[]], - "view" - >; - - getInt: TypedContractMethod<[key: BytesLike], [bigint], "view">; - - getIntArray: TypedContractMethod<[key: BytesLike], [bigint[]], "view">; - - getString: TypedContractMethod<[key: BytesLike], [string], "view">; - - getStringArray: TypedContractMethod<[key: BytesLike], [string[]], "view">; - - getUint: TypedContractMethod<[key: BytesLike], [bigint], "view">; - - getUintArray: TypedContractMethod<[key: BytesLike], [bigint[]], "view">; - - getUintCount: TypedContractMethod<[setKey: BytesLike], [bigint], "view">; - - getUintValuesAt: TypedContractMethod<[setKey: BytesLike, start: BigNumberish, end: BigNumberish], [bigint[]], "view">; - - incrementInt: TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - - incrementUint: TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - - intArrayValues: TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [bigint], "view">; - - intValues: TypedContractMethod<[arg0: BytesLike], [bigint], "view">; - - "removeAddress(bytes32,address)": TypedContractMethod<[setKey: BytesLike, value: AddressLike], [void], "nonpayable">; - - "removeAddress(bytes32)": TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - removeAddressArray: TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - removeBool: TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - removeBoolArray: TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - "removeBytes32(bytes32,bytes32)": TypedContractMethod<[setKey: BytesLike, value: BytesLike], [void], "nonpayable">; - - "removeBytes32(bytes32)": TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - removeBytes32Array: TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - removeInt: TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - removeIntArray: TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - removeString: TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - removeStringArray: TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - "removeUint(bytes32)": TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - "removeUint(bytes32,uint256)": TypedContractMethod<[setKey: BytesLike, value: BigNumberish], [void], "nonpayable">; - - removeUintArray: TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - roleStore: TypedContractMethod<[], [string], "view">; - - setAddress: TypedContractMethod<[key: BytesLike, value: AddressLike], [string], "nonpayable">; - - setAddressArray: TypedContractMethod<[key: BytesLike, value: AddressLike[]], [void], "nonpayable">; - - setBool: TypedContractMethod<[key: BytesLike, value: boolean], [boolean], "nonpayable">; - - setBoolArray: TypedContractMethod<[key: BytesLike, value: boolean[]], [void], "nonpayable">; - - setBytes32: TypedContractMethod<[key: BytesLike, value: BytesLike], [string], "nonpayable">; - - setBytes32Array: TypedContractMethod<[key: BytesLike, value: BytesLike[]], [void], "nonpayable">; - - setInt: TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - - setIntArray: TypedContractMethod<[key: BytesLike, value: BigNumberish[]], [void], "nonpayable">; - - setString: TypedContractMethod<[key: BytesLike, value: string], [string], "nonpayable">; - - setStringArray: TypedContractMethod<[key: BytesLike, value: string[]], [void], "nonpayable">; - - setUint: TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - - setUintArray: TypedContractMethod<[key: BytesLike, value: BigNumberish[]], [void], "nonpayable">; - - stringArrayValues: TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [string], "view">; - - stringValues: TypedContractMethod<[arg0: BytesLike], [string], "view">; - - uintArrayValues: TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [bigint], "view">; - - uintValues: TypedContractMethod<[arg0: BytesLike], [bigint], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "addAddress" - ): TypedContractMethod<[setKey: BytesLike, value: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "addBytes32" - ): TypedContractMethod<[setKey: BytesLike, value: BytesLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "addUint" - ): TypedContractMethod<[setKey: BytesLike, value: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "addressArrayValues" - ): TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "addressValues"): TypedContractMethod<[arg0: BytesLike], [string], "view">; - getFunction( - nameOrSignature: "applyBoundedDeltaToUint" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "applyDeltaToInt" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "applyDeltaToUint(bytes32,int256,string)" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish, errorMessage: string], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "applyDeltaToUint(bytes32,uint256)" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "boolArrayValues" - ): TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [boolean], "view">; - getFunction(nameOrSignature: "boolValues"): TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - getFunction( - nameOrSignature: "bytes32ArrayValues" - ): TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "bytes32Values"): TypedContractMethod<[arg0: BytesLike], [string], "view">; - getFunction( - nameOrSignature: "containsAddress" - ): TypedContractMethod<[setKey: BytesLike, value: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "containsBytes32" - ): TypedContractMethod<[setKey: BytesLike, value: BytesLike], [boolean], "view">; - getFunction( - nameOrSignature: "containsUint" - ): TypedContractMethod<[setKey: BytesLike, value: BigNumberish], [boolean], "view">; - getFunction( - nameOrSignature: "decrementInt" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "decrementUint" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - getFunction(nameOrSignature: "getAddress"): TypedContractMethod<[key: BytesLike], [string], "view">; - getFunction(nameOrSignature: "getAddressArray"): TypedContractMethod<[key: BytesLike], [string[]], "view">; - getFunction(nameOrSignature: "getAddressCount"): TypedContractMethod<[setKey: BytesLike], [bigint], "view">; - getFunction( - nameOrSignature: "getAddressValuesAt" - ): TypedContractMethod<[setKey: BytesLike, start: BigNumberish, end: BigNumberish], [string[]], "view">; - getFunction(nameOrSignature: "getBool"): TypedContractMethod<[key: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "getBoolArray"): TypedContractMethod<[key: BytesLike], [boolean[]], "view">; - getFunction(nameOrSignature: "getBytes32"): TypedContractMethod<[key: BytesLike], [string], "view">; - getFunction(nameOrSignature: "getBytes32Array"): TypedContractMethod<[key: BytesLike], [string[]], "view">; - getFunction(nameOrSignature: "getBytes32Count"): TypedContractMethod<[setKey: BytesLike], [bigint], "view">; - getFunction( - nameOrSignature: "getBytes32ValuesAt" - ): TypedContractMethod<[setKey: BytesLike, start: BigNumberish, end: BigNumberish], [string[]], "view">; - getFunction(nameOrSignature: "getInt"): TypedContractMethod<[key: BytesLike], [bigint], "view">; - getFunction(nameOrSignature: "getIntArray"): TypedContractMethod<[key: BytesLike], [bigint[]], "view">; - getFunction(nameOrSignature: "getString"): TypedContractMethod<[key: BytesLike], [string], "view">; - getFunction(nameOrSignature: "getStringArray"): TypedContractMethod<[key: BytesLike], [string[]], "view">; - getFunction(nameOrSignature: "getUint"): TypedContractMethod<[key: BytesLike], [bigint], "view">; - getFunction(nameOrSignature: "getUintArray"): TypedContractMethod<[key: BytesLike], [bigint[]], "view">; - getFunction(nameOrSignature: "getUintCount"): TypedContractMethod<[setKey: BytesLike], [bigint], "view">; - getFunction( - nameOrSignature: "getUintValuesAt" - ): TypedContractMethod<[setKey: BytesLike, start: BigNumberish, end: BigNumberish], [bigint[]], "view">; - getFunction( - nameOrSignature: "incrementInt" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "incrementUint" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "intArrayValues" - ): TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "intValues"): TypedContractMethod<[arg0: BytesLike], [bigint], "view">; - getFunction( - nameOrSignature: "removeAddress(bytes32,address)" - ): TypedContractMethod<[setKey: BytesLike, value: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeAddress(bytes32)"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeAddressArray"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeBool"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeBoolArray"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "removeBytes32(bytes32,bytes32)" - ): TypedContractMethod<[setKey: BytesLike, value: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeBytes32(bytes32)"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeBytes32Array"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeInt"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeIntArray"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeString"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeStringArray"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeUint(bytes32)"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "removeUint(bytes32,uint256)" - ): TypedContractMethod<[setKey: BytesLike, value: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "removeUintArray"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "setAddress" - ): TypedContractMethod<[key: BytesLike, value: AddressLike], [string], "nonpayable">; - getFunction( - nameOrSignature: "setAddressArray" - ): TypedContractMethod<[key: BytesLike, value: AddressLike[]], [void], "nonpayable">; - getFunction( - nameOrSignature: "setBool" - ): TypedContractMethod<[key: BytesLike, value: boolean], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "setBoolArray" - ): TypedContractMethod<[key: BytesLike, value: boolean[]], [void], "nonpayable">; - getFunction( - nameOrSignature: "setBytes32" - ): TypedContractMethod<[key: BytesLike, value: BytesLike], [string], "nonpayable">; - getFunction( - nameOrSignature: "setBytes32Array" - ): TypedContractMethod<[key: BytesLike, value: BytesLike[]], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInt" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "setIntArray" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish[]], [void], "nonpayable">; - getFunction( - nameOrSignature: "setString" - ): TypedContractMethod<[key: BytesLike, value: string], [string], "nonpayable">; - getFunction( - nameOrSignature: "setStringArray" - ): TypedContractMethod<[key: BytesLike, value: string[]], [void], "nonpayable">; - getFunction( - nameOrSignature: "setUint" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "setUintArray" - ): TypedContractMethod<[key: BytesLike, value: BigNumberish[]], [void], "nonpayable">; - getFunction( - nameOrSignature: "stringArrayValues" - ): TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "stringValues"): TypedContractMethod<[arg0: BytesLike], [string], "view">; - getFunction( - nameOrSignature: "uintArrayValues" - ): TypedContractMethod<[arg0: BytesLike, arg1: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "uintValues"): TypedContractMethod<[arg0: BytesLike], [bigint], "view">; - - filters: {}; -} diff --git a/src/typechain-types/ERC20PermitInterface.ts b/src/typechain-types/ERC20PermitInterface.ts deleted file mode 100644 index 7914ddd089..0000000000 --- a/src/typechain-types/ERC20PermitInterface.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface ERC20PermitInterfaceInterface extends Interface { - getFunction( - nameOrSignature: "PERMIT_TYPEHASH" | "DOMAIN_SEPARATOR" | "nonces" | "permit" | "version" | "name" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "PERMIT_TYPEHASH", values?: undefined): string; - encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; - encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "permit", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] - ): string; - encodeFunctionData(functionFragment: "version", values?: undefined): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - - decodeFunctionResult(functionFragment: "PERMIT_TYPEHASH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; -} - -export interface ERC20PermitInterface extends BaseContract { - connect(runner?: ContractRunner | null): ERC20PermitInterface; - waitForDeployment(): Promise; - - interface: ERC20PermitInterfaceInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; - - DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; - - nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">; - - permit: TypedContractMethod< - [ - owner: AddressLike, - spender: AddressLike, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - ], - [void], - "nonpayable" - >; - - version: TypedContractMethod<[], [string], "view">; - - name: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "PERMIT_TYPEHASH"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "DOMAIN_SEPARATOR"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "nonces"): TypedContractMethod<[owner: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "permit" - ): TypedContractMethod< - [ - owner: AddressLike, - spender: AddressLike, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "version"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - - filters: {}; -} diff --git a/src/typechain-types/ERC721.ts b/src/typechain-types/ERC721.ts deleted file mode 100644 index cd4432e221..0000000000 --- a/src/typechain-types/ERC721.ts +++ /dev/null @@ -1,296 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface ERC721Interface extends Interface { - getFunction( - nameOrSignature: - | "approve" - | "balanceOf" - | "baseURI" - | "getApproved" - | "isApprovedForAll" - | "mint" - | "name" - | "ownerOf" - | "safeTransferFrom(address,address,uint256)" - | "safeTransferFrom(address,address,uint256,bytes)" - | "setApprovalForAll" - | "supportsInterface" - | "symbol" - | "tokenByIndex" - | "tokenOfOwnerByIndex" - | "tokenURI" - | "totalSupply" - | "transferFrom" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer"): EventFragment; - - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "baseURI", values?: undefined): string; - encodeFunctionData(functionFragment: "getApproved", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "isApprovedForAll", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "mint", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "ownerOf", values: [BigNumberish]): string; - encodeFunctionData( - functionFragment: "safeTransferFrom(address,address,uint256)", - values: [AddressLike, AddressLike, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "safeTransferFrom(address,address,uint256,bytes)", - values: [AddressLike, AddressLike, BigNumberish, BytesLike] - ): string; - encodeFunctionData(functionFragment: "setApprovalForAll", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "tokenByIndex", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "tokenOfOwnerByIndex", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "tokenURI", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "baseURI", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getApproved", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isApprovedForAll", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "ownerOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "safeTransferFrom(address,address,uint256)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "safeTransferFrom(address,address,uint256,bytes)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setApprovalForAll", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenByIndex", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenOfOwnerByIndex", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenURI", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, approved: AddressLike, tokenId: BigNumberish]; - export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; - export interface OutputObject { - owner: string; - approved: string; - tokenId: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace ApprovalForAllEvent { - export type InputTuple = [owner: AddressLike, operator: AddressLike, approved: boolean]; - export type OutputTuple = [owner: string, operator: string, approved: boolean]; - export interface OutputObject { - owner: string; - operator: string; - approved: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, tokenId: BigNumberish]; - export type OutputTuple = [from: string, to: string, tokenId: bigint]; - export interface OutputObject { - from: string; - to: string; - tokenId: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface ERC721 extends BaseContract { - connect(runner?: ContractRunner | null): ERC721; - waitForDeployment(): Promise; - - interface: ERC721Interface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - approve: TypedContractMethod<[to: AddressLike, tokenId: BigNumberish], [void], "nonpayable">; - - balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; - - baseURI: TypedContractMethod<[], [string], "view">; - - getApproved: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; - - isApprovedForAll: TypedContractMethod<[owner: AddressLike, operator: AddressLike], [boolean], "view">; - - mint: TypedContractMethod<[to: AddressLike, tokenId: BigNumberish], [void], "nonpayable">; - - name: TypedContractMethod<[], [string], "view">; - - ownerOf: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; - - "safeTransferFrom(address,address,uint256)": TypedContractMethod< - [from: AddressLike, to: AddressLike, tokenId: BigNumberish], - [void], - "nonpayable" - >; - - "safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod< - [from: AddressLike, to: AddressLike, tokenId: BigNumberish, _data: BytesLike], - [void], - "nonpayable" - >; - - setApprovalForAll: TypedContractMethod<[operator: AddressLike, approved: boolean], [void], "nonpayable">; - - supportsInterface: TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; - - symbol: TypedContractMethod<[], [string], "view">; - - tokenByIndex: TypedContractMethod<[index: BigNumberish], [bigint], "view">; - - tokenOfOwnerByIndex: TypedContractMethod<[owner: AddressLike, index: BigNumberish], [bigint], "view">; - - tokenURI: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transferFrom: TypedContractMethod<[from: AddressLike, to: AddressLike, tokenId: BigNumberish], [void], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[to: AddressLike, tokenId: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[owner: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "baseURI"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "getApproved"): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; - getFunction( - nameOrSignature: "isApprovedForAll" - ): TypedContractMethod<[owner: AddressLike, operator: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "mint" - ): TypedContractMethod<[to: AddressLike, tokenId: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "ownerOf"): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; - getFunction( - nameOrSignature: "safeTransferFrom(address,address,uint256)" - ): TypedContractMethod<[from: AddressLike, to: AddressLike, tokenId: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "safeTransferFrom(address,address,uint256,bytes)" - ): TypedContractMethod< - [from: AddressLike, to: AddressLike, tokenId: BigNumberish, _data: BytesLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setApprovalForAll" - ): TypedContractMethod<[operator: AddressLike, approved: boolean], [void], "nonpayable">; - getFunction(nameOrSignature: "supportsInterface"): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "tokenByIndex"): TypedContractMethod<[index: BigNumberish], [bigint], "view">; - getFunction( - nameOrSignature: "tokenOfOwnerByIndex" - ): TypedContractMethod<[owner: AddressLike, index: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "tokenURI"): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod<[from: AddressLike, to: AddressLike, tokenId: BigNumberish], [void], "nonpayable">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent( - key: "ApprovalForAll" - ): TypedContractEvent< - ApprovalForAllEvent.InputTuple, - ApprovalForAllEvent.OutputTuple, - ApprovalForAllEvent.OutputObject - >; - getEvent( - key: "Transfer" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "ApprovalForAll(address,address,bool)": TypedContractEvent< - ApprovalForAllEvent.InputTuple, - ApprovalForAllEvent.OutputTuple, - ApprovalForAllEvent.OutputObject - >; - ApprovalForAll: TypedContractEvent< - ApprovalForAllEvent.InputTuple, - ApprovalForAllEvent.OutputTuple, - ApprovalForAllEvent.OutputObject - >; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - }; -} diff --git a/src/typechain-types/EventEmitter.ts b/src/typechain-types/EventEmitter.ts deleted file mode 100644 index adf40f920e..0000000000 --- a/src/typechain-types/EventEmitter.ts +++ /dev/null @@ -1,503 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - EventLog, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace EventUtils { - export type AddressKeyValueStruct = { key: string; value: AddressLike }; - - export type AddressKeyValueStructOutput = [key: string, value: string] & { - key: string; - value: string; - }; - - export type AddressArrayKeyValueStruct = { - key: string; - value: AddressLike[]; - }; - - export type AddressArrayKeyValueStructOutput = [key: string, value: string[]] & { key: string; value: string[] }; - - export type AddressItemsStruct = { - items: EventUtils.AddressKeyValueStruct[]; - arrayItems: EventUtils.AddressArrayKeyValueStruct[]; - }; - - export type AddressItemsStructOutput = [ - items: EventUtils.AddressKeyValueStructOutput[], - arrayItems: EventUtils.AddressArrayKeyValueStructOutput[], - ] & { - items: EventUtils.AddressKeyValueStructOutput[]; - arrayItems: EventUtils.AddressArrayKeyValueStructOutput[]; - }; - - export type UintKeyValueStruct = { key: string; value: BigNumberish }; - - export type UintKeyValueStructOutput = [key: string, value: bigint] & { - key: string; - value: bigint; - }; - - export type UintArrayKeyValueStruct = { key: string; value: BigNumberish[] }; - - export type UintArrayKeyValueStructOutput = [key: string, value: bigint[]] & { - key: string; - value: bigint[]; - }; - - export type UintItemsStruct = { - items: EventUtils.UintKeyValueStruct[]; - arrayItems: EventUtils.UintArrayKeyValueStruct[]; - }; - - export type UintItemsStructOutput = [ - items: EventUtils.UintKeyValueStructOutput[], - arrayItems: EventUtils.UintArrayKeyValueStructOutput[], - ] & { - items: EventUtils.UintKeyValueStructOutput[]; - arrayItems: EventUtils.UintArrayKeyValueStructOutput[]; - }; - - export type IntKeyValueStruct = { key: string; value: BigNumberish }; - - export type IntKeyValueStructOutput = [key: string, value: bigint] & { - key: string; - value: bigint; - }; - - export type IntArrayKeyValueStruct = { key: string; value: BigNumberish[] }; - - export type IntArrayKeyValueStructOutput = [key: string, value: bigint[]] & { - key: string; - value: bigint[]; - }; - - export type IntItemsStruct = { - items: EventUtils.IntKeyValueStruct[]; - arrayItems: EventUtils.IntArrayKeyValueStruct[]; - }; - - export type IntItemsStructOutput = [ - items: EventUtils.IntKeyValueStructOutput[], - arrayItems: EventUtils.IntArrayKeyValueStructOutput[], - ] & { - items: EventUtils.IntKeyValueStructOutput[]; - arrayItems: EventUtils.IntArrayKeyValueStructOutput[]; - }; - - export type BoolKeyValueStruct = { key: string; value: boolean }; - - export type BoolKeyValueStructOutput = [key: string, value: boolean] & { - key: string; - value: boolean; - }; - - export type BoolArrayKeyValueStruct = { key: string; value: boolean[] }; - - export type BoolArrayKeyValueStructOutput = [key: string, value: boolean[]] & { key: string; value: boolean[] }; - - export type BoolItemsStruct = { - items: EventUtils.BoolKeyValueStruct[]; - arrayItems: EventUtils.BoolArrayKeyValueStruct[]; - }; - - export type BoolItemsStructOutput = [ - items: EventUtils.BoolKeyValueStructOutput[], - arrayItems: EventUtils.BoolArrayKeyValueStructOutput[], - ] & { - items: EventUtils.BoolKeyValueStructOutput[]; - arrayItems: EventUtils.BoolArrayKeyValueStructOutput[]; - }; - - export type Bytes32KeyValueStruct = { key: string; value: BytesLike }; - - export type Bytes32KeyValueStructOutput = [key: string, value: string] & { - key: string; - value: string; - }; - - export type Bytes32ArrayKeyValueStruct = { key: string; value: BytesLike[] }; - - export type Bytes32ArrayKeyValueStructOutput = [key: string, value: string[]] & { key: string; value: string[] }; - - export type Bytes32ItemsStruct = { - items: EventUtils.Bytes32KeyValueStruct[]; - arrayItems: EventUtils.Bytes32ArrayKeyValueStruct[]; - }; - - export type Bytes32ItemsStructOutput = [ - items: EventUtils.Bytes32KeyValueStructOutput[], - arrayItems: EventUtils.Bytes32ArrayKeyValueStructOutput[], - ] & { - items: EventUtils.Bytes32KeyValueStructOutput[]; - arrayItems: EventUtils.Bytes32ArrayKeyValueStructOutput[]; - }; - - export type BytesKeyValueStruct = { key: string; value: BytesLike }; - - export type BytesKeyValueStructOutput = [key: string, value: string] & { - key: string; - value: string; - }; - - export type BytesArrayKeyValueStruct = { key: string; value: BytesLike[] }; - - export type BytesArrayKeyValueStructOutput = [key: string, value: string[]] & { key: string; value: string[] }; - - export type BytesItemsStruct = { - items: EventUtils.BytesKeyValueStruct[]; - arrayItems: EventUtils.BytesArrayKeyValueStruct[]; - }; - - export type BytesItemsStructOutput = [ - items: EventUtils.BytesKeyValueStructOutput[], - arrayItems: EventUtils.BytesArrayKeyValueStructOutput[], - ] & { - items: EventUtils.BytesKeyValueStructOutput[]; - arrayItems: EventUtils.BytesArrayKeyValueStructOutput[]; - }; - - export type StringKeyValueStruct = { key: string; value: string }; - - export type StringKeyValueStructOutput = [key: string, value: string] & { - key: string; - value: string; - }; - - export type StringArrayKeyValueStruct = { key: string; value: string[] }; - - export type StringArrayKeyValueStructOutput = [key: string, value: string[]] & { key: string; value: string[] }; - - export type StringItemsStruct = { - items: EventUtils.StringKeyValueStruct[]; - arrayItems: EventUtils.StringArrayKeyValueStruct[]; - }; - - export type StringItemsStructOutput = [ - items: EventUtils.StringKeyValueStructOutput[], - arrayItems: EventUtils.StringArrayKeyValueStructOutput[], - ] & { - items: EventUtils.StringKeyValueStructOutput[]; - arrayItems: EventUtils.StringArrayKeyValueStructOutput[]; - }; - - export type EventLogDataStruct = { - addressItems: EventUtils.AddressItemsStruct; - uintItems: EventUtils.UintItemsStruct; - intItems: EventUtils.IntItemsStruct; - boolItems: EventUtils.BoolItemsStruct; - bytes32Items: EventUtils.Bytes32ItemsStruct; - bytesItems: EventUtils.BytesItemsStruct; - stringItems: EventUtils.StringItemsStruct; - }; - - export type EventLogDataStructOutput = [ - addressItems: EventUtils.AddressItemsStructOutput, - uintItems: EventUtils.UintItemsStructOutput, - intItems: EventUtils.IntItemsStructOutput, - boolItems: EventUtils.BoolItemsStructOutput, - bytes32Items: EventUtils.Bytes32ItemsStructOutput, - bytesItems: EventUtils.BytesItemsStructOutput, - stringItems: EventUtils.StringItemsStructOutput, - ] & { - addressItems: EventUtils.AddressItemsStructOutput; - uintItems: EventUtils.UintItemsStructOutput; - intItems: EventUtils.IntItemsStructOutput; - boolItems: EventUtils.BoolItemsStructOutput; - bytes32Items: EventUtils.Bytes32ItemsStructOutput; - bytesItems: EventUtils.BytesItemsStructOutput; - stringItems: EventUtils.StringItemsStructOutput; - }; -} - -export interface EventEmitterInterface extends Interface { - getFunction( - nameOrSignature: - | "emitDataLog1" - | "emitDataLog2" - | "emitDataLog3" - | "emitDataLog4" - | "emitEventLog" - | "emitEventLog1" - | "emitEventLog2" - | "roleStore" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "EventLog" | "EventLog1" | "EventLog2"): EventFragment; - - encodeFunctionData(functionFragment: "emitDataLog1", values: [BytesLike, BytesLike]): string; - encodeFunctionData(functionFragment: "emitDataLog2", values: [BytesLike, BytesLike, BytesLike]): string; - encodeFunctionData(functionFragment: "emitDataLog3", values: [BytesLike, BytesLike, BytesLike, BytesLike]): string; - encodeFunctionData( - functionFragment: "emitDataLog4", - values: [BytesLike, BytesLike, BytesLike, BytesLike, BytesLike] - ): string; - encodeFunctionData(functionFragment: "emitEventLog", values: [string, EventUtils.EventLogDataStruct]): string; - encodeFunctionData( - functionFragment: "emitEventLog1", - values: [string, BytesLike, EventUtils.EventLogDataStruct] - ): string; - encodeFunctionData( - functionFragment: "emitEventLog2", - values: [string, BytesLike, BytesLike, EventUtils.EventLogDataStruct] - ): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - - decodeFunctionResult(functionFragment: "emitDataLog1", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "emitDataLog2", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "emitDataLog3", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "emitDataLog4", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "emitEventLog", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "emitEventLog1", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "emitEventLog2", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; -} - -export namespace EventLogEvent { - export type InputTuple = [ - msgSender: AddressLike, - eventName: string, - eventNameHash: string, - eventData: EventUtils.EventLogDataStruct, - ]; - export type OutputTuple = [ - msgSender: string, - eventName: string, - eventNameHash: string, - eventData: EventUtils.EventLogDataStructOutput, - ]; - export interface OutputObject { - msgSender: string; - eventName: string; - eventNameHash: string; - eventData: EventUtils.EventLogDataStructOutput; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace EventLog1Event { - export type InputTuple = [ - msgSender: AddressLike, - eventName: string, - eventNameHash: string, - topic1: BytesLike, - eventData: EventUtils.EventLogDataStruct, - ]; - export type OutputTuple = [ - msgSender: string, - eventName: string, - eventNameHash: string, - topic1: string, - eventData: EventUtils.EventLogDataStructOutput, - ]; - export interface OutputObject { - msgSender: string; - eventName: string; - eventNameHash: string; - topic1: string; - eventData: EventUtils.EventLogDataStructOutput; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace EventLog2Event { - export type InputTuple = [ - msgSender: AddressLike, - eventName: string, - eventNameHash: string, - topic1: BytesLike, - topic2: BytesLike, - eventData: EventUtils.EventLogDataStruct, - ]; - export type OutputTuple = [ - msgSender: string, - eventName: string, - eventNameHash: string, - topic1: string, - topic2: string, - eventData: EventUtils.EventLogDataStructOutput, - ]; - export interface OutputObject { - msgSender: string; - eventName: string; - eventNameHash: string; - topic1: string; - topic2: string; - eventData: EventUtils.EventLogDataStructOutput; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface EventEmitter extends BaseContract { - connect(runner?: ContractRunner | null): EventEmitter; - waitForDeployment(): Promise; - - interface: EventEmitterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - emitDataLog1: TypedContractMethod<[topic1: BytesLike, data: BytesLike], [void], "nonpayable">; - - emitDataLog2: TypedContractMethod<[topic1: BytesLike, topic2: BytesLike, data: BytesLike], [void], "nonpayable">; - - emitDataLog3: TypedContractMethod< - [topic1: BytesLike, topic2: BytesLike, topic3: BytesLike, data: BytesLike], - [void], - "nonpayable" - >; - - emitDataLog4: TypedContractMethod< - [topic1: BytesLike, topic2: BytesLike, topic3: BytesLike, topic4: BytesLike, data: BytesLike], - [void], - "nonpayable" - >; - - emitEventLog: TypedContractMethod< - [eventName: string, eventData: EventUtils.EventLogDataStruct], - [void], - "nonpayable" - >; - - emitEventLog1: TypedContractMethod< - [eventName: string, topic1: BytesLike, eventData: EventUtils.EventLogDataStruct], - [void], - "nonpayable" - >; - - emitEventLog2: TypedContractMethod< - [eventName: string, topic1: BytesLike, topic2: BytesLike, eventData: EventUtils.EventLogDataStruct], - [void], - "nonpayable" - >; - - roleStore: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "emitDataLog1" - ): TypedContractMethod<[topic1: BytesLike, data: BytesLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "emitDataLog2" - ): TypedContractMethod<[topic1: BytesLike, topic2: BytesLike, data: BytesLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "emitDataLog3" - ): TypedContractMethod< - [topic1: BytesLike, topic2: BytesLike, topic3: BytesLike, data: BytesLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "emitDataLog4" - ): TypedContractMethod< - [topic1: BytesLike, topic2: BytesLike, topic3: BytesLike, topic4: BytesLike, data: BytesLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "emitEventLog" - ): TypedContractMethod<[eventName: string, eventData: EventUtils.EventLogDataStruct], [void], "nonpayable">; - getFunction( - nameOrSignature: "emitEventLog1" - ): TypedContractMethod< - [eventName: string, topic1: BytesLike, eventData: EventUtils.EventLogDataStruct], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "emitEventLog2" - ): TypedContractMethod< - [eventName: string, topic1: BytesLike, topic2: BytesLike, eventData: EventUtils.EventLogDataStruct], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - - getEvent( - key: "EventLog" - ): TypedContractEvent; - getEvent( - key: "EventLog1" - ): TypedContractEvent; - getEvent( - key: "EventLog2" - ): TypedContractEvent; - - filters: { - "EventLog(address,string,string,tuple)": TypedContractEvent< - EventLogEvent.InputTuple, - EventLogEvent.OutputTuple, - EventLogEvent.OutputObject - >; - EventLog: TypedContractEvent; - - "EventLog1(address,string,string,bytes32,tuple)": TypedContractEvent< - EventLog1Event.InputTuple, - EventLog1Event.OutputTuple, - EventLog1Event.OutputObject - >; - EventLog1: TypedContractEvent; - - "EventLog2(address,string,string,bytes32,bytes32,tuple)": TypedContractEvent< - EventLog2Event.InputTuple, - EventLog2Event.OutputTuple, - EventLog2Event.OutputObject - >; - EventLog2: TypedContractEvent; - }; -} diff --git a/src/typechain-types/ExchangeRouter.ts b/src/typechain-types/ExchangeRouter.ts deleted file mode 100644 index e8d299de6c..0000000000 --- a/src/typechain-types/ExchangeRouter.ts +++ /dev/null @@ -1,843 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace IDepositUtils { - export type CreateDepositParamsAddressesStruct = { - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - initialLongToken: AddressLike; - initialShortToken: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type CreateDepositParamsAddressesStructOutput = [ - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - initialLongToken: string, - initialShortToken: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - initialLongToken: string; - initialShortToken: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type CreateDepositParamsStruct = { - addresses: IDepositUtils.CreateDepositParamsAddressesStruct; - minMarketTokens: BigNumberish; - shouldUnwrapNativeToken: boolean; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - dataList: BytesLike[]; - }; - - export type CreateDepositParamsStructOutput = [ - addresses: IDepositUtils.CreateDepositParamsAddressesStructOutput, - minMarketTokens: bigint, - shouldUnwrapNativeToken: boolean, - executionFee: bigint, - callbackGasLimit: bigint, - dataList: string[], - ] & { - addresses: IDepositUtils.CreateDepositParamsAddressesStructOutput; - minMarketTokens: bigint; - shouldUnwrapNativeToken: boolean; - executionFee: bigint; - callbackGasLimit: bigint; - dataList: string[]; - }; -} - -export declare namespace IBaseOrderUtils { - export type CreateOrderParamsAddressesStruct = { - receiver: AddressLike; - cancellationReceiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - initialCollateralToken: AddressLike; - swapPath: AddressLike[]; - }; - - export type CreateOrderParamsAddressesStructOutput = [ - receiver: string, - cancellationReceiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - initialCollateralToken: string, - swapPath: string[], - ] & { - receiver: string; - cancellationReceiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - initialCollateralToken: string; - swapPath: string[]; - }; - - export type CreateOrderParamsNumbersStruct = { - sizeDeltaUsd: BigNumberish; - initialCollateralDeltaAmount: BigNumberish; - triggerPrice: BigNumberish; - acceptablePrice: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - minOutputAmount: BigNumberish; - validFromTime: BigNumberish; - }; - - export type CreateOrderParamsNumbersStructOutput = [ - sizeDeltaUsd: bigint, - initialCollateralDeltaAmount: bigint, - triggerPrice: bigint, - acceptablePrice: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - minOutputAmount: bigint, - validFromTime: bigint, - ] & { - sizeDeltaUsd: bigint; - initialCollateralDeltaAmount: bigint; - triggerPrice: bigint; - acceptablePrice: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - minOutputAmount: bigint; - validFromTime: bigint; - }; - - export type CreateOrderParamsStruct = { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStruct; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStruct; - orderType: BigNumberish; - decreasePositionSwapType: BigNumberish; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: BytesLike; - dataList: BytesLike[]; - }; - - export type CreateOrderParamsStructOutput = [ - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput, - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput, - orderType: bigint, - decreasePositionSwapType: bigint, - isLong: boolean, - shouldUnwrapNativeToken: boolean, - autoCancel: boolean, - referralCode: string, - dataList: string[], - ] & { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput; - orderType: bigint; - decreasePositionSwapType: bigint; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: string; - dataList: string[]; - }; -} - -export declare namespace IShiftUtils { - export type CreateShiftParamsAddressesStruct = { - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - fromMarket: AddressLike; - toMarket: AddressLike; - }; - - export type CreateShiftParamsAddressesStructOutput = [ - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - fromMarket: string, - toMarket: string, - ] & { - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - fromMarket: string; - toMarket: string; - }; - - export type CreateShiftParamsStruct = { - addresses: IShiftUtils.CreateShiftParamsAddressesStruct; - minMarketTokens: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - dataList: BytesLike[]; - }; - - export type CreateShiftParamsStructOutput = [ - addresses: IShiftUtils.CreateShiftParamsAddressesStructOutput, - minMarketTokens: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - dataList: string[], - ] & { - addresses: IShiftUtils.CreateShiftParamsAddressesStructOutput; - minMarketTokens: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - dataList: string[]; - }; -} - -export declare namespace IWithdrawalUtils { - export type CreateWithdrawalParamsAddressesStruct = { - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type CreateWithdrawalParamsAddressesStructOutput = [ - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type CreateWithdrawalParamsStruct = { - addresses: IWithdrawalUtils.CreateWithdrawalParamsAddressesStruct; - minLongTokenAmount: BigNumberish; - minShortTokenAmount: BigNumberish; - shouldUnwrapNativeToken: boolean; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - dataList: BytesLike[]; - }; - - export type CreateWithdrawalParamsStructOutput = [ - addresses: IWithdrawalUtils.CreateWithdrawalParamsAddressesStructOutput, - minLongTokenAmount: bigint, - minShortTokenAmount: bigint, - shouldUnwrapNativeToken: boolean, - executionFee: bigint, - callbackGasLimit: bigint, - dataList: string[], - ] & { - addresses: IWithdrawalUtils.CreateWithdrawalParamsAddressesStructOutput; - minLongTokenAmount: bigint; - minShortTokenAmount: bigint; - shouldUnwrapNativeToken: boolean; - executionFee: bigint; - callbackGasLimit: bigint; - dataList: string[]; - }; -} - -export declare namespace OracleUtils { - export type SetPricesParamsStruct = { - tokens: AddressLike[]; - providers: AddressLike[]; - data: BytesLike[]; - }; - - export type SetPricesParamsStructOutput = [tokens: string[], providers: string[], data: string[]] & { - tokens: string[]; - providers: string[]; - data: string[]; - }; - - export type SimulatePricesParamsStruct = { - primaryTokens: AddressLike[]; - primaryPrices: Price.PropsStruct[]; - minTimestamp: BigNumberish; - maxTimestamp: BigNumberish; - }; - - export type SimulatePricesParamsStructOutput = [ - primaryTokens: string[], - primaryPrices: Price.PropsStructOutput[], - minTimestamp: bigint, - maxTimestamp: bigint, - ] & { - primaryTokens: string[]; - primaryPrices: Price.PropsStructOutput[]; - minTimestamp: bigint; - maxTimestamp: bigint; - }; -} - -export declare namespace Price { - export type PropsStruct = { min: BigNumberish; max: BigNumberish }; - - export type PropsStructOutput = [min: bigint, max: bigint] & { - min: bigint; - max: bigint; - }; -} - -export interface ExchangeRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "cancelDeposit" - | "cancelOrder" - | "cancelShift" - | "cancelWithdrawal" - | "claimAffiliateRewards" - | "claimCollateral" - | "claimFundingFees" - | "claimUiFees" - | "createDeposit" - | "createOrder" - | "createShift" - | "createWithdrawal" - | "dataStore" - | "depositHandler" - | "eventEmitter" - | "executeAtomicWithdrawal" - | "externalHandler" - | "makeExternalCalls" - | "multicall" - | "orderHandler" - | "roleStore" - | "router" - | "sendNativeToken" - | "sendTokens" - | "sendWnt" - | "setSavedCallbackContract" - | "setUiFeeFactor" - | "shiftHandler" - | "simulateExecuteDeposit" - | "simulateExecuteLatestDeposit" - | "simulateExecuteLatestOrder" - | "simulateExecuteLatestShift" - | "simulateExecuteLatestWithdrawal" - | "simulateExecuteOrder" - | "simulateExecuteShift" - | "simulateExecuteWithdrawal" - | "updateOrder" - | "withdrawalHandler" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData(functionFragment: "cancelDeposit", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "cancelOrder", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "cancelShift", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "cancelWithdrawal", values: [BytesLike]): string; - encodeFunctionData( - functionFragment: "claimAffiliateRewards", - values: [AddressLike[], AddressLike[], AddressLike] - ): string; - encodeFunctionData( - functionFragment: "claimCollateral", - values: [AddressLike[], AddressLike[], BigNumberish[], AddressLike] - ): string; - encodeFunctionData(functionFragment: "claimFundingFees", values: [AddressLike[], AddressLike[], AddressLike]): string; - encodeFunctionData(functionFragment: "claimUiFees", values: [AddressLike[], AddressLike[], AddressLike]): string; - encodeFunctionData(functionFragment: "createDeposit", values: [IDepositUtils.CreateDepositParamsStruct]): string; - encodeFunctionData(functionFragment: "createOrder", values: [IBaseOrderUtils.CreateOrderParamsStruct]): string; - encodeFunctionData(functionFragment: "createShift", values: [IShiftUtils.CreateShiftParamsStruct]): string; - encodeFunctionData( - functionFragment: "createWithdrawal", - values: [IWithdrawalUtils.CreateWithdrawalParamsStruct] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "depositHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData( - functionFragment: "executeAtomicWithdrawal", - values: [IWithdrawalUtils.CreateWithdrawalParamsStruct, OracleUtils.SetPricesParamsStruct] - ): string; - encodeFunctionData(functionFragment: "externalHandler", values?: undefined): string; - encodeFunctionData( - functionFragment: "makeExternalCalls", - values: [AddressLike[], BytesLike[], AddressLike[], AddressLike[]] - ): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "orderHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendNativeToken", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendWnt", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setSavedCallbackContract", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "setUiFeeFactor", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "shiftHandler", values?: undefined): string; - encodeFunctionData( - functionFragment: "simulateExecuteDeposit", - values: [BytesLike, OracleUtils.SimulatePricesParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "simulateExecuteLatestDeposit", - values: [OracleUtils.SimulatePricesParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "simulateExecuteLatestOrder", - values: [OracleUtils.SimulatePricesParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "simulateExecuteLatestShift", - values: [OracleUtils.SimulatePricesParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "simulateExecuteLatestWithdrawal", - values: [OracleUtils.SimulatePricesParamsStruct, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "simulateExecuteOrder", - values: [BytesLike, OracleUtils.SimulatePricesParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "simulateExecuteShift", - values: [BytesLike, OracleUtils.SimulatePricesParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "simulateExecuteWithdrawal", - values: [BytesLike, OracleUtils.SimulatePricesParamsStruct, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "updateOrder", - values: [BytesLike, BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish, boolean] - ): string; - encodeFunctionData(functionFragment: "withdrawalHandler", values?: undefined): string; - - decodeFunctionResult(functionFragment: "cancelDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelShift", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimAffiliateRewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimCollateral", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimFundingFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimUiFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createShift", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "depositHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeAtomicWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "externalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "makeExternalCalls", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendNativeToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendWnt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setSavedCallbackContract", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setUiFeeFactor", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "shiftHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteLatestDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteLatestOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteLatestShift", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteLatestWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteShift", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawalHandler", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface ExchangeRouter extends BaseContract { - connect(runner?: ContractRunner | null): ExchangeRouter; - waitForDeployment(): Promise; - - interface: ExchangeRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - cancelDeposit: TypedContractMethod<[key: BytesLike], [void], "payable">; - - cancelOrder: TypedContractMethod<[key: BytesLike], [void], "payable">; - - cancelShift: TypedContractMethod<[key: BytesLike], [void], "payable">; - - cancelWithdrawal: TypedContractMethod<[key: BytesLike], [void], "payable">; - - claimAffiliateRewards: TypedContractMethod< - [markets: AddressLike[], tokens: AddressLike[], receiver: AddressLike], - [bigint[]], - "payable" - >; - - claimCollateral: TypedContractMethod< - [markets: AddressLike[], tokens: AddressLike[], timeKeys: BigNumberish[], receiver: AddressLike], - [bigint[]], - "payable" - >; - - claimFundingFees: TypedContractMethod< - [markets: AddressLike[], tokens: AddressLike[], receiver: AddressLike], - [bigint[]], - "payable" - >; - - claimUiFees: TypedContractMethod< - [markets: AddressLike[], tokens: AddressLike[], receiver: AddressLike], - [bigint[]], - "payable" - >; - - createDeposit: TypedContractMethod<[params: IDepositUtils.CreateDepositParamsStruct], [string], "payable">; - - createOrder: TypedContractMethod<[params: IBaseOrderUtils.CreateOrderParamsStruct], [string], "payable">; - - createShift: TypedContractMethod<[params: IShiftUtils.CreateShiftParamsStruct], [string], "payable">; - - createWithdrawal: TypedContractMethod<[params: IWithdrawalUtils.CreateWithdrawalParamsStruct], [string], "payable">; - - dataStore: TypedContractMethod<[], [string], "view">; - - depositHandler: TypedContractMethod<[], [string], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - executeAtomicWithdrawal: TypedContractMethod< - [params: IWithdrawalUtils.CreateWithdrawalParamsStruct, oracleParams: OracleUtils.SetPricesParamsStruct], - [void], - "payable" - >; - - externalHandler: TypedContractMethod<[], [string], "view">; - - makeExternalCalls: TypedContractMethod< - [ - externalCallTargets: AddressLike[], - externalCallDataList: BytesLike[], - refundTokens: AddressLike[], - refundReceivers: AddressLike[], - ], - [void], - "payable" - >; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - - orderHandler: TypedContractMethod<[], [string], "view">; - - roleStore: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendTokens: TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendWnt: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - setSavedCallbackContract: TypedContractMethod< - [market: AddressLike, callbackContract: AddressLike], - [void], - "payable" - >; - - setUiFeeFactor: TypedContractMethod<[uiFeeFactor: BigNumberish], [void], "payable">; - - shiftHandler: TypedContractMethod<[], [string], "view">; - - simulateExecuteDeposit: TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - - simulateExecuteLatestDeposit: TypedContractMethod< - [simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - - simulateExecuteLatestOrder: TypedContractMethod< - [simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - - simulateExecuteLatestShift: TypedContractMethod< - [simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - - simulateExecuteLatestWithdrawal: TypedContractMethod< - [simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct, swapPricingType: BigNumberish], - [void], - "payable" - >; - - simulateExecuteOrder: TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - - simulateExecuteShift: TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - - simulateExecuteWithdrawal: TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct, swapPricingType: BigNumberish], - [void], - "payable" - >; - - updateOrder: TypedContractMethod< - [ - key: BytesLike, - sizeDeltaUsd: BigNumberish, - acceptablePrice: BigNumberish, - triggerPrice: BigNumberish, - minOutputAmount: BigNumberish, - validFromTime: BigNumberish, - autoCancel: boolean, - ], - [void], - "payable" - >; - - withdrawalHandler: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "cancelDeposit"): TypedContractMethod<[key: BytesLike], [void], "payable">; - getFunction(nameOrSignature: "cancelOrder"): TypedContractMethod<[key: BytesLike], [void], "payable">; - getFunction(nameOrSignature: "cancelShift"): TypedContractMethod<[key: BytesLike], [void], "payable">; - getFunction(nameOrSignature: "cancelWithdrawal"): TypedContractMethod<[key: BytesLike], [void], "payable">; - getFunction( - nameOrSignature: "claimAffiliateRewards" - ): TypedContractMethod<[markets: AddressLike[], tokens: AddressLike[], receiver: AddressLike], [bigint[]], "payable">; - getFunction( - nameOrSignature: "claimCollateral" - ): TypedContractMethod< - [markets: AddressLike[], tokens: AddressLike[], timeKeys: BigNumberish[], receiver: AddressLike], - [bigint[]], - "payable" - >; - getFunction( - nameOrSignature: "claimFundingFees" - ): TypedContractMethod<[markets: AddressLike[], tokens: AddressLike[], receiver: AddressLike], [bigint[]], "payable">; - getFunction( - nameOrSignature: "claimUiFees" - ): TypedContractMethod<[markets: AddressLike[], tokens: AddressLike[], receiver: AddressLike], [bigint[]], "payable">; - getFunction( - nameOrSignature: "createDeposit" - ): TypedContractMethod<[params: IDepositUtils.CreateDepositParamsStruct], [string], "payable">; - getFunction( - nameOrSignature: "createOrder" - ): TypedContractMethod<[params: IBaseOrderUtils.CreateOrderParamsStruct], [string], "payable">; - getFunction( - nameOrSignature: "createShift" - ): TypedContractMethod<[params: IShiftUtils.CreateShiftParamsStruct], [string], "payable">; - getFunction( - nameOrSignature: "createWithdrawal" - ): TypedContractMethod<[params: IWithdrawalUtils.CreateWithdrawalParamsStruct], [string], "payable">; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "depositHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "executeAtomicWithdrawal" - ): TypedContractMethod< - [params: IWithdrawalUtils.CreateWithdrawalParamsStruct, oracleParams: OracleUtils.SetPricesParamsStruct], - [void], - "payable" - >; - getFunction(nameOrSignature: "externalHandler"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "makeExternalCalls" - ): TypedContractMethod< - [ - externalCallTargets: AddressLike[], - externalCallDataList: BytesLike[], - refundTokens: AddressLike[], - refundReceivers: AddressLike[], - ], - [void], - "payable" - >; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - getFunction(nameOrSignature: "orderHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendWnt" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "setSavedCallbackContract" - ): TypedContractMethod<[market: AddressLike, callbackContract: AddressLike], [void], "payable">; - getFunction(nameOrSignature: "setUiFeeFactor"): TypedContractMethod<[uiFeeFactor: BigNumberish], [void], "payable">; - getFunction(nameOrSignature: "shiftHandler"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "simulateExecuteDeposit" - ): TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - getFunction( - nameOrSignature: "simulateExecuteLatestDeposit" - ): TypedContractMethod<[simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], [void], "payable">; - getFunction( - nameOrSignature: "simulateExecuteLatestOrder" - ): TypedContractMethod<[simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], [void], "payable">; - getFunction( - nameOrSignature: "simulateExecuteLatestShift" - ): TypedContractMethod<[simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], [void], "payable">; - getFunction( - nameOrSignature: "simulateExecuteLatestWithdrawal" - ): TypedContractMethod< - [simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct, swapPricingType: BigNumberish], - [void], - "payable" - >; - getFunction( - nameOrSignature: "simulateExecuteOrder" - ): TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - getFunction( - nameOrSignature: "simulateExecuteShift" - ): TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - getFunction( - nameOrSignature: "simulateExecuteWithdrawal" - ): TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct, swapPricingType: BigNumberish], - [void], - "payable" - >; - getFunction( - nameOrSignature: "updateOrder" - ): TypedContractMethod< - [ - key: BytesLike, - sizeDeltaUsd: BigNumberish, - acceptablePrice: BigNumberish, - triggerPrice: BigNumberish, - minOutputAmount: BigNumberish, - validFromTime: BigNumberish, - autoCancel: boolean, - ], - [void], - "payable" - >; - getFunction(nameOrSignature: "withdrawalHandler"): TypedContractMethod<[], [string], "view">; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/GMT.ts b/src/typechain-types/GMT.ts deleted file mode 100644 index 00ae27c13b..0000000000 --- a/src/typechain-types/GMT.ts +++ /dev/null @@ -1,320 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface GMTInterface extends Interface { - getFunction( - nameOrSignature: - | "addAdmin" - | "addBlockedRecipient" - | "addMsgSender" - | "admins" - | "allowance" - | "allowances" - | "allowedMsgSenders" - | "approve" - | "balanceOf" - | "balances" - | "beginMigration" - | "blockedRecipients" - | "decimals" - | "endMigration" - | "gov" - | "hasActiveMigration" - | "migrationTime" - | "name" - | "removeAdmin" - | "removeBlockedRecipient" - | "removeMsgSender" - | "setGov" - | "setNextMigrationTime" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - | "withdrawToken" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; - - encodeFunctionData(functionFragment: "addAdmin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "addBlockedRecipient", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "addMsgSender", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "admins", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "allowances", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "allowedMsgSenders", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "balances", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "beginMigration", values?: undefined): string; - encodeFunctionData(functionFragment: "blockedRecipients", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "endMigration", values?: undefined): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "hasActiveMigration", values?: undefined): string; - encodeFunctionData(functionFragment: "migrationTime", values?: undefined): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "removeAdmin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "removeBlockedRecipient", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "removeMsgSender", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setNextMigrationTime", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "withdrawToken", values: [AddressLike, AddressLike, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "addAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addBlockedRecipient", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addMsgSender", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "admins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowedMsgSenders", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "beginMigration", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "blockedRecipients", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "endMigration", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasActiveMigration", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "migrationTime", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeBlockedRecipient", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeMsgSender", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setNextMigrationTime", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawToken", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; - export interface OutputObject { - owner: string; - spender: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface GMT extends BaseContract { - connect(runner?: ContractRunner | null): GMT; - waitForDeployment(): Promise; - - interface: GMTInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - addAdmin: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - addBlockedRecipient: TypedContractMethod<[_recipient: AddressLike], [void], "nonpayable">; - - addMsgSender: TypedContractMethod<[_msgSender: AddressLike], [void], "nonpayable">; - - admins: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - allowance: TypedContractMethod<[_owner: AddressLike, _spender: AddressLike], [bigint], "view">; - - allowances: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - - allowedMsgSenders: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - approve: TypedContractMethod<[_spender: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - - balanceOf: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - balances: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - beginMigration: TypedContractMethod<[], [void], "nonpayable">; - - blockedRecipients: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - decimals: TypedContractMethod<[], [bigint], "view">; - - endMigration: TypedContractMethod<[], [void], "nonpayable">; - - gov: TypedContractMethod<[], [string], "view">; - - hasActiveMigration: TypedContractMethod<[], [boolean], "view">; - - migrationTime: TypedContractMethod<[], [bigint], "view">; - - name: TypedContractMethod<[], [string], "view">; - - removeAdmin: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - removeBlockedRecipient: TypedContractMethod<[_recipient: AddressLike], [void], "nonpayable">; - - removeMsgSender: TypedContractMethod<[_msgSender: AddressLike], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setNextMigrationTime: TypedContractMethod<[_migrationTime: BigNumberish], [void], "nonpayable">; - - symbol: TypedContractMethod<[], [string], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transfer: TypedContractMethod<[_recipient: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - - transferFrom: TypedContractMethod< - [_sender: AddressLike, _recipient: AddressLike, _amount: BigNumberish], - [boolean], - "nonpayable" - >; - - withdrawToken: TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "addAdmin"): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "addBlockedRecipient" - ): TypedContractMethod<[_recipient: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "addMsgSender"): TypedContractMethod<[_msgSender: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "admins"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "allowance" - ): TypedContractMethod<[_owner: AddressLike, _spender: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "allowances" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "allowedMsgSenders"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[_spender: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "balances"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "beginMigration"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "blockedRecipients"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "endMigration"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "hasActiveMigration"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "migrationTime"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "removeAdmin"): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "removeBlockedRecipient" - ): TypedContractMethod<[_recipient: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeMsgSender"): TypedContractMethod<[_msgSender: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setNextMigrationTime" - ): TypedContractMethod<[_migrationTime: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transfer" - ): TypedContractMethod<[_recipient: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod< - [_sender: AddressLike, _recipient: AddressLike, _amount: BigNumberish], - [boolean], - "nonpayable" - >; - getFunction( - nameOrSignature: "withdrawToken" - ): TypedContractMethod<[_token: AddressLike, _account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent( - key: "Transfer" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - }; -} diff --git a/src/typechain-types/GelatoRelayRouter.ts b/src/typechain-types/GelatoRelayRouter.ts deleted file mode 100644 index d53738e9c9..0000000000 --- a/src/typechain-types/GelatoRelayRouter.ts +++ /dev/null @@ -1,528 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace OracleUtils { - export type SetPricesParamsStruct = { - tokens: AddressLike[]; - providers: AddressLike[]; - data: BytesLike[]; - }; - - export type SetPricesParamsStructOutput = [tokens: string[], providers: string[], data: string[]] & { - tokens: string[]; - providers: string[]; - data: string[]; - }; -} - -export declare namespace IRelayUtils { - export type ExternalCallsStruct = { - sendTokens: AddressLike[]; - sendAmounts: BigNumberish[]; - externalCallTargets: AddressLike[]; - externalCallDataList: BytesLike[]; - refundTokens: AddressLike[]; - refundReceivers: AddressLike[]; - }; - - export type ExternalCallsStructOutput = [ - sendTokens: string[], - sendAmounts: bigint[], - externalCallTargets: string[], - externalCallDataList: string[], - refundTokens: string[], - refundReceivers: string[], - ] & { - sendTokens: string[]; - sendAmounts: bigint[]; - externalCallTargets: string[]; - externalCallDataList: string[]; - refundTokens: string[]; - refundReceivers: string[]; - }; - - export type TokenPermitStruct = { - owner: AddressLike; - spender: AddressLike; - value: BigNumberish; - deadline: BigNumberish; - v: BigNumberish; - r: BytesLike; - s: BytesLike; - token: AddressLike; - }; - - export type TokenPermitStructOutput = [ - owner: string, - spender: string, - value: bigint, - deadline: bigint, - v: bigint, - r: string, - s: string, - token: string, - ] & { - owner: string; - spender: string; - value: bigint; - deadline: bigint; - v: bigint; - r: string; - s: string; - token: string; - }; - - export type FeeParamsStruct = { - feeToken: AddressLike; - feeAmount: BigNumberish; - feeSwapPath: AddressLike[]; - }; - - export type FeeParamsStructOutput = [feeToken: string, feeAmount: bigint, feeSwapPath: string[]] & { - feeToken: string; - feeAmount: bigint; - feeSwapPath: string[]; - }; - - export type RelayParamsStruct = { - oracleParams: OracleUtils.SetPricesParamsStruct; - externalCalls: IRelayUtils.ExternalCallsStruct; - tokenPermits: IRelayUtils.TokenPermitStruct[]; - fee: IRelayUtils.FeeParamsStruct; - userNonce: BigNumberish; - deadline: BigNumberish; - signature: BytesLike; - desChainId: BigNumberish; - }; - - export type RelayParamsStructOutput = [ - oracleParams: OracleUtils.SetPricesParamsStructOutput, - externalCalls: IRelayUtils.ExternalCallsStructOutput, - tokenPermits: IRelayUtils.TokenPermitStructOutput[], - fee: IRelayUtils.FeeParamsStructOutput, - userNonce: bigint, - deadline: bigint, - signature: string, - desChainId: bigint, - ] & { - oracleParams: OracleUtils.SetPricesParamsStructOutput; - externalCalls: IRelayUtils.ExternalCallsStructOutput; - tokenPermits: IRelayUtils.TokenPermitStructOutput[]; - fee: IRelayUtils.FeeParamsStructOutput; - userNonce: bigint; - deadline: bigint; - signature: string; - desChainId: bigint; - }; - - export type UpdateOrderParamsStruct = { - key: BytesLike; - sizeDeltaUsd: BigNumberish; - acceptablePrice: BigNumberish; - triggerPrice: BigNumberish; - minOutputAmount: BigNumberish; - validFromTime: BigNumberish; - autoCancel: boolean; - executionFeeIncrease: BigNumberish; - }; - - export type UpdateOrderParamsStructOutput = [ - key: string, - sizeDeltaUsd: bigint, - acceptablePrice: bigint, - triggerPrice: bigint, - minOutputAmount: bigint, - validFromTime: bigint, - autoCancel: boolean, - executionFeeIncrease: bigint, - ] & { - key: string; - sizeDeltaUsd: bigint; - acceptablePrice: bigint; - triggerPrice: bigint; - minOutputAmount: bigint; - validFromTime: bigint; - autoCancel: boolean; - executionFeeIncrease: bigint; - }; - - export type BatchParamsStruct = { - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStruct[]; - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStruct[]; - cancelOrderKeys: BytesLike[]; - }; - - export type BatchParamsStructOutput = [ - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStructOutput[], - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStructOutput[], - cancelOrderKeys: string[], - ] & { - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStructOutput[]; - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStructOutput[]; - cancelOrderKeys: string[]; - }; -} - -export declare namespace IBaseOrderUtils { - export type CreateOrderParamsAddressesStruct = { - receiver: AddressLike; - cancellationReceiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - initialCollateralToken: AddressLike; - swapPath: AddressLike[]; - }; - - export type CreateOrderParamsAddressesStructOutput = [ - receiver: string, - cancellationReceiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - initialCollateralToken: string, - swapPath: string[], - ] & { - receiver: string; - cancellationReceiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - initialCollateralToken: string; - swapPath: string[]; - }; - - export type CreateOrderParamsNumbersStruct = { - sizeDeltaUsd: BigNumberish; - initialCollateralDeltaAmount: BigNumberish; - triggerPrice: BigNumberish; - acceptablePrice: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - minOutputAmount: BigNumberish; - validFromTime: BigNumberish; - }; - - export type CreateOrderParamsNumbersStructOutput = [ - sizeDeltaUsd: bigint, - initialCollateralDeltaAmount: bigint, - triggerPrice: bigint, - acceptablePrice: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - minOutputAmount: bigint, - validFromTime: bigint, - ] & { - sizeDeltaUsd: bigint; - initialCollateralDeltaAmount: bigint; - triggerPrice: bigint; - acceptablePrice: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - minOutputAmount: bigint; - validFromTime: bigint; - }; - - export type CreateOrderParamsStruct = { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStruct; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStruct; - orderType: BigNumberish; - decreasePositionSwapType: BigNumberish; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: BytesLike; - dataList: BytesLike[]; - }; - - export type CreateOrderParamsStructOutput = [ - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput, - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput, - orderType: bigint, - decreasePositionSwapType: bigint, - isLong: boolean, - shouldUnwrapNativeToken: boolean, - autoCancel: boolean, - referralCode: string, - dataList: string[], - ] & { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput; - orderType: bigint; - decreasePositionSwapType: bigint; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: string; - dataList: string[]; - }; -} - -export interface GelatoRelayRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "batch" - | "cancelOrder" - | "createOrder" - | "dataStore" - | "digests" - | "eventEmitter" - | "externalHandler" - | "multicall" - | "oracle" - | "orderHandler" - | "orderVault" - | "roleStore" - | "router" - | "sendNativeToken" - | "sendTokens" - | "sendWnt" - | "swapHandler" - | "updateOrder" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData( - functionFragment: "batch", - values: [IRelayUtils.RelayParamsStruct, AddressLike, IRelayUtils.BatchParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "cancelOrder", - values: [IRelayUtils.RelayParamsStruct, AddressLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "createOrder", - values: [IRelayUtils.RelayParamsStruct, AddressLike, IBaseOrderUtils.CreateOrderParamsStruct] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "digests", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData(functionFragment: "externalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "oracle", values?: undefined): string; - encodeFunctionData(functionFragment: "orderHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "orderVault", values?: undefined): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendNativeToken", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendWnt", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "swapHandler", values?: undefined): string; - encodeFunctionData( - functionFragment: "updateOrder", - values: [IRelayUtils.RelayParamsStruct, AddressLike, IRelayUtils.UpdateOrderParamsStruct] - ): string; - - decodeFunctionResult(functionFragment: "batch", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "digests", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "externalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendNativeToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendWnt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateOrder", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface GelatoRelayRouter extends BaseContract { - connect(runner?: ContractRunner | null): GelatoRelayRouter; - waitForDeployment(): Promise; - - interface: GelatoRelayRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - batch: TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, params: IRelayUtils.BatchParamsStruct], - [string[]], - "nonpayable" - >; - - cancelOrder: TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, key: BytesLike], - [void], - "nonpayable" - >; - - createOrder: TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, params: IBaseOrderUtils.CreateOrderParamsStruct], - [string], - "nonpayable" - >; - - dataStore: TypedContractMethod<[], [string], "view">; - - digests: TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - externalHandler: TypedContractMethod<[], [string], "view">; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - - oracle: TypedContractMethod<[], [string], "view">; - - orderHandler: TypedContractMethod<[], [string], "view">; - - orderVault: TypedContractMethod<[], [string], "view">; - - roleStore: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendTokens: TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendWnt: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - swapHandler: TypedContractMethod<[], [string], "view">; - - updateOrder: TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, params: IRelayUtils.UpdateOrderParamsStruct], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "batch" - ): TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, params: IRelayUtils.BatchParamsStruct], - [string[]], - "nonpayable" - >; - getFunction( - nameOrSignature: "cancelOrder" - ): TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, key: BytesLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "createOrder" - ): TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, params: IBaseOrderUtils.CreateOrderParamsStruct], - [string], - "nonpayable" - >; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "digests"): TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "externalHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - getFunction(nameOrSignature: "oracle"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendWnt" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction(nameOrSignature: "swapHandler"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "updateOrder" - ): TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, params: IRelayUtils.UpdateOrderParamsStruct], - [void], - "nonpayable" - >; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/GlpManager.ts b/src/typechain-types/GlpManager.ts deleted file mode 100644 index a080ab5e86..0000000000 --- a/src/typechain-types/GlpManager.ts +++ /dev/null @@ -1,414 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface GlpManagerInterface extends Interface { - getFunction( - nameOrSignature: - | "MAX_COOLDOWN_DURATION" - | "PRICE_PRECISION" - | "USDG_DECIMALS" - | "addLiquidity" - | "addLiquidityForAccount" - | "aumAddition" - | "aumDeduction" - | "cooldownDuration" - | "getAum" - | "getAumInUsdg" - | "getAums" - | "glp" - | "gov" - | "inPrivateMode" - | "isHandler" - | "lastAddedAt" - | "removeLiquidity" - | "removeLiquidityForAccount" - | "setAumAdjustment" - | "setCooldownDuration" - | "setGov" - | "setHandler" - | "setInPrivateMode" - | "usdg" - | "vault" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "AddLiquidity" | "RemoveLiquidity"): EventFragment; - - encodeFunctionData(functionFragment: "MAX_COOLDOWN_DURATION", values?: undefined): string; - encodeFunctionData(functionFragment: "PRICE_PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "USDG_DECIMALS", values?: undefined): string; - encodeFunctionData( - functionFragment: "addLiquidity", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "addLiquidityForAccount", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "aumAddition", values?: undefined): string; - encodeFunctionData(functionFragment: "aumDeduction", values?: undefined): string; - encodeFunctionData(functionFragment: "cooldownDuration", values?: undefined): string; - encodeFunctionData(functionFragment: "getAum", values: [boolean]): string; - encodeFunctionData(functionFragment: "getAumInUsdg", values: [boolean]): string; - encodeFunctionData(functionFragment: "getAums", values?: undefined): string; - encodeFunctionData(functionFragment: "glp", values?: undefined): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "inPrivateMode", values?: undefined): string; - encodeFunctionData(functionFragment: "isHandler", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "lastAddedAt", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "removeLiquidity", - values: [AddressLike, BigNumberish, BigNumberish, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "removeLiquidityForAccount", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, AddressLike] - ): string; - encodeFunctionData(functionFragment: "setAumAdjustment", values: [BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "setCooldownDuration", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setHandler", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setInPrivateMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "usdg", values?: undefined): string; - encodeFunctionData(functionFragment: "vault", values?: undefined): string; - - decodeFunctionResult(functionFragment: "MAX_COOLDOWN_DURATION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "PRICE_PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "USDG_DECIMALS", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addLiquidity", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addLiquidityForAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "aumAddition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "aumDeduction", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cooldownDuration", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAum", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAumInUsdg", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAums", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "glp", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inPrivateMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lastAddedAt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeLiquidity", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeLiquidityForAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setAumAdjustment", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setCooldownDuration", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInPrivateMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdg", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vault", data: BytesLike): Result; -} - -export namespace AddLiquidityEvent { - export type InputTuple = [ - account: AddressLike, - token: AddressLike, - amount: BigNumberish, - aumInUsdg: BigNumberish, - glpSupply: BigNumberish, - usdgAmount: BigNumberish, - mintAmount: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - token: string, - amount: bigint, - aumInUsdg: bigint, - glpSupply: bigint, - usdgAmount: bigint, - mintAmount: bigint, - ]; - export interface OutputObject { - account: string; - token: string; - amount: bigint; - aumInUsdg: bigint; - glpSupply: bigint; - usdgAmount: bigint; - mintAmount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace RemoveLiquidityEvent { - export type InputTuple = [ - account: AddressLike, - token: AddressLike, - glpAmount: BigNumberish, - aumInUsdg: BigNumberish, - glpSupply: BigNumberish, - usdgAmount: BigNumberish, - amountOut: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - token: string, - glpAmount: bigint, - aumInUsdg: bigint, - glpSupply: bigint, - usdgAmount: bigint, - amountOut: bigint, - ]; - export interface OutputObject { - account: string; - token: string; - glpAmount: bigint; - aumInUsdg: bigint; - glpSupply: bigint; - usdgAmount: bigint; - amountOut: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface GlpManager extends BaseContract { - connect(runner?: ContractRunner | null): GlpManager; - waitForDeployment(): Promise; - - interface: GlpManagerInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - MAX_COOLDOWN_DURATION: TypedContractMethod<[], [bigint], "view">; - - PRICE_PRECISION: TypedContractMethod<[], [bigint], "view">; - - USDG_DECIMALS: TypedContractMethod<[], [bigint], "view">; - - addLiquidity: TypedContractMethod< - [_token: AddressLike, _amount: BigNumberish, _minUsdg: BigNumberish, _minGlp: BigNumberish], - [bigint], - "nonpayable" - >; - - addLiquidityForAccount: TypedContractMethod< - [ - _fundingAccount: AddressLike, - _account: AddressLike, - _token: AddressLike, - _amount: BigNumberish, - _minUsdg: BigNumberish, - _minGlp: BigNumberish, - ], - [bigint], - "nonpayable" - >; - - aumAddition: TypedContractMethod<[], [bigint], "view">; - - aumDeduction: TypedContractMethod<[], [bigint], "view">; - - cooldownDuration: TypedContractMethod<[], [bigint], "view">; - - getAum: TypedContractMethod<[maximise: boolean], [bigint], "view">; - - getAumInUsdg: TypedContractMethod<[maximise: boolean], [bigint], "view">; - - getAums: TypedContractMethod<[], [bigint[]], "view">; - - glp: TypedContractMethod<[], [string], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - inPrivateMode: TypedContractMethod<[], [boolean], "view">; - - isHandler: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - lastAddedAt: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - removeLiquidity: TypedContractMethod< - [_tokenOut: AddressLike, _glpAmount: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - - removeLiquidityForAccount: TypedContractMethod< - [ - _account: AddressLike, - _tokenOut: AddressLike, - _glpAmount: BigNumberish, - _minOut: BigNumberish, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - - setAumAdjustment: TypedContractMethod< - [_aumAddition: BigNumberish, _aumDeduction: BigNumberish], - [void], - "nonpayable" - >; - - setCooldownDuration: TypedContractMethod<[_cooldownDuration: BigNumberish], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setHandler: TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setInPrivateMode: TypedContractMethod<[_inPrivateMode: boolean], [void], "nonpayable">; - - usdg: TypedContractMethod<[], [string], "view">; - - vault: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "MAX_COOLDOWN_DURATION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "PRICE_PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "USDG_DECIMALS"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "addLiquidity" - ): TypedContractMethod< - [_token: AddressLike, _amount: BigNumberish, _minUsdg: BigNumberish, _minGlp: BigNumberish], - [bigint], - "nonpayable" - >; - getFunction( - nameOrSignature: "addLiquidityForAccount" - ): TypedContractMethod< - [ - _fundingAccount: AddressLike, - _account: AddressLike, - _token: AddressLike, - _amount: BigNumberish, - _minUsdg: BigNumberish, - _minGlp: BigNumberish, - ], - [bigint], - "nonpayable" - >; - getFunction(nameOrSignature: "aumAddition"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "aumDeduction"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "cooldownDuration"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "getAum"): TypedContractMethod<[maximise: boolean], [bigint], "view">; - getFunction(nameOrSignature: "getAumInUsdg"): TypedContractMethod<[maximise: boolean], [bigint], "view">; - getFunction(nameOrSignature: "getAums"): TypedContractMethod<[], [bigint[]], "view">; - getFunction(nameOrSignature: "glp"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "inPrivateMode"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isHandler"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "lastAddedAt"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "removeLiquidity" - ): TypedContractMethod< - [_tokenOut: AddressLike, _glpAmount: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - getFunction( - nameOrSignature: "removeLiquidityForAccount" - ): TypedContractMethod< - [ - _account: AddressLike, - _tokenOut: AddressLike, - _glpAmount: BigNumberish, - _minOut: BigNumberish, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - getFunction( - nameOrSignature: "setAumAdjustment" - ): TypedContractMethod<[_aumAddition: BigNumberish, _aumDeduction: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setCooldownDuration" - ): TypedContractMethod<[_cooldownDuration: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setHandler" - ): TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInPrivateMode" - ): TypedContractMethod<[_inPrivateMode: boolean], [void], "nonpayable">; - getFunction(nameOrSignature: "usdg"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "vault"): TypedContractMethod<[], [string], "view">; - - getEvent( - key: "AddLiquidity" - ): TypedContractEvent; - getEvent( - key: "RemoveLiquidity" - ): TypedContractEvent< - RemoveLiquidityEvent.InputTuple, - RemoveLiquidityEvent.OutputTuple, - RemoveLiquidityEvent.OutputObject - >; - - filters: { - "AddLiquidity(address,address,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent< - AddLiquidityEvent.InputTuple, - AddLiquidityEvent.OutputTuple, - AddLiquidityEvent.OutputObject - >; - AddLiquidity: TypedContractEvent< - AddLiquidityEvent.InputTuple, - AddLiquidityEvent.OutputTuple, - AddLiquidityEvent.OutputObject - >; - - "RemoveLiquidity(address,address,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent< - RemoveLiquidityEvent.InputTuple, - RemoveLiquidityEvent.OutputTuple, - RemoveLiquidityEvent.OutputObject - >; - RemoveLiquidity: TypedContractEvent< - RemoveLiquidityEvent.InputTuple, - RemoveLiquidityEvent.OutputTuple, - RemoveLiquidityEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/GlvReader.ts b/src/typechain-types/GlvReader.ts deleted file mode 100644 index 7eb24ff8b4..0000000000 --- a/src/typechain-types/GlvReader.ts +++ /dev/null @@ -1,578 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace GlvDeposit { - export type AddressesStruct = { - glv: AddressLike; - account: AddressLike; - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - initialLongToken: AddressLike; - initialShortToken: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type AddressesStructOutput = [ - glv: string, - account: string, - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - initialLongToken: string, - initialShortToken: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - glv: string; - account: string; - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - initialLongToken: string; - initialShortToken: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type NumbersStruct = { - marketTokenAmount: BigNumberish; - initialLongTokenAmount: BigNumberish; - initialShortTokenAmount: BigNumberish; - minGlvTokens: BigNumberish; - updatedAtTime: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - srcChainId: BigNumberish; - }; - - export type NumbersStructOutput = [ - marketTokenAmount: bigint, - initialLongTokenAmount: bigint, - initialShortTokenAmount: bigint, - minGlvTokens: bigint, - updatedAtTime: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - srcChainId: bigint, - ] & { - marketTokenAmount: bigint; - initialLongTokenAmount: bigint; - initialShortTokenAmount: bigint; - minGlvTokens: bigint; - updatedAtTime: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - srcChainId: bigint; - }; - - export type FlagsStruct = { - shouldUnwrapNativeToken: boolean; - isMarketTokenDeposit: boolean; - }; - - export type FlagsStructOutput = [shouldUnwrapNativeToken: boolean, isMarketTokenDeposit: boolean] & { - shouldUnwrapNativeToken: boolean; - isMarketTokenDeposit: boolean; - }; - - export type PropsStruct = { - addresses: GlvDeposit.AddressesStruct; - numbers: GlvDeposit.NumbersStruct; - flags: GlvDeposit.FlagsStruct; - _dataList: BytesLike[]; - }; - - export type PropsStructOutput = [ - addresses: GlvDeposit.AddressesStructOutput, - numbers: GlvDeposit.NumbersStructOutput, - flags: GlvDeposit.FlagsStructOutput, - _dataList: string[], - ] & { - addresses: GlvDeposit.AddressesStructOutput; - numbers: GlvDeposit.NumbersStructOutput; - flags: GlvDeposit.FlagsStructOutput; - _dataList: string[]; - }; -} - -export declare namespace GlvWithdrawal { - export type AddressesStruct = { - glv: AddressLike; - market: AddressLike; - account: AddressLike; - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type AddressesStructOutput = [ - glv: string, - market: string, - account: string, - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - glv: string; - market: string; - account: string; - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type NumbersStruct = { - glvTokenAmount: BigNumberish; - minLongTokenAmount: BigNumberish; - minShortTokenAmount: BigNumberish; - updatedAtTime: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - srcChainId: BigNumberish; - }; - - export type NumbersStructOutput = [ - glvTokenAmount: bigint, - minLongTokenAmount: bigint, - minShortTokenAmount: bigint, - updatedAtTime: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - srcChainId: bigint, - ] & { - glvTokenAmount: bigint; - minLongTokenAmount: bigint; - minShortTokenAmount: bigint; - updatedAtTime: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - srcChainId: bigint; - }; - - export type FlagsStruct = { shouldUnwrapNativeToken: boolean }; - - export type FlagsStructOutput = [shouldUnwrapNativeToken: boolean] & { - shouldUnwrapNativeToken: boolean; - }; - - export type PropsStruct = { - addresses: GlvWithdrawal.AddressesStruct; - numbers: GlvWithdrawal.NumbersStruct; - flags: GlvWithdrawal.FlagsStruct; - _dataList: BytesLike[]; - }; - - export type PropsStructOutput = [ - addresses: GlvWithdrawal.AddressesStructOutput, - numbers: GlvWithdrawal.NumbersStructOutput, - flags: GlvWithdrawal.FlagsStructOutput, - _dataList: string[], - ] & { - addresses: GlvWithdrawal.AddressesStructOutput; - numbers: GlvWithdrawal.NumbersStructOutput; - flags: GlvWithdrawal.FlagsStructOutput; - _dataList: string[]; - }; -} - -export declare namespace Glv { - export type PropsStruct = { - glvToken: AddressLike; - longToken: AddressLike; - shortToken: AddressLike; - }; - - export type PropsStructOutput = [glvToken: string, longToken: string, shortToken: string] & { - glvToken: string; - longToken: string; - shortToken: string; - }; -} - -export declare namespace GlvReader { - export type GlvInfoStruct = { glv: Glv.PropsStruct; markets: AddressLike[] }; - - export type GlvInfoStructOutput = [glv: Glv.PropsStructOutput, markets: string[]] & { - glv: Glv.PropsStructOutput; - markets: string[]; - }; -} - -export declare namespace GlvShift { - export type AddressesStruct = { - glv: AddressLike; - fromMarket: AddressLike; - toMarket: AddressLike; - }; - - export type AddressesStructOutput = [glv: string, fromMarket: string, toMarket: string] & { - glv: string; - fromMarket: string; - toMarket: string; - }; - - export type NumbersStruct = { - marketTokenAmount: BigNumberish; - minMarketTokens: BigNumberish; - updatedAtTime: BigNumberish; - }; - - export type NumbersStructOutput = [marketTokenAmount: bigint, minMarketTokens: bigint, updatedAtTime: bigint] & { - marketTokenAmount: bigint; - minMarketTokens: bigint; - updatedAtTime: bigint; - }; - - export type PropsStruct = { - addresses: GlvShift.AddressesStruct; - numbers: GlvShift.NumbersStruct; - }; - - export type PropsStructOutput = [addresses: GlvShift.AddressesStructOutput, numbers: GlvShift.NumbersStructOutput] & { - addresses: GlvShift.AddressesStructOutput; - numbers: GlvShift.NumbersStructOutput; - }; -} - -export declare namespace Price { - export type PropsStruct = { min: BigNumberish; max: BigNumberish }; - - export type PropsStructOutput = [min: bigint, max: bigint] & { - min: bigint; - max: bigint; - }; -} - -export interface GlvReaderInterface extends Interface { - getFunction( - nameOrSignature: - | "getAccountGlvDeposits" - | "getAccountGlvWithdrawals" - | "getGlv" - | "getGlvBySalt" - | "getGlvDeposit" - | "getGlvDeposits" - | "getGlvInfo" - | "getGlvInfoList" - | "getGlvShift" - | "getGlvShifts" - | "getGlvTokenPrice" - | "getGlvValue" - | "getGlvWithdrawal" - | "getGlvWithdrawals" - | "getGlvs" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "getAccountGlvDeposits", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getAccountGlvWithdrawals", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getGlv", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "getGlvBySalt", values: [AddressLike, BytesLike]): string; - encodeFunctionData(functionFragment: "getGlvDeposit", values: [AddressLike, BytesLike]): string; - encodeFunctionData(functionFragment: "getGlvDeposits", values: [AddressLike, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "getGlvInfo", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "getGlvInfoList", values: [AddressLike, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "getGlvShift", values: [AddressLike, BytesLike]): string; - encodeFunctionData(functionFragment: "getGlvShifts", values: [AddressLike, BigNumberish, BigNumberish]): string; - encodeFunctionData( - functionFragment: "getGlvTokenPrice", - values: [ - AddressLike, - AddressLike[], - Price.PropsStruct[], - Price.PropsStruct, - Price.PropsStruct, - AddressLike, - boolean, - ] - ): string; - encodeFunctionData( - functionFragment: "getGlvValue", - values: [ - AddressLike, - AddressLike[], - Price.PropsStruct[], - Price.PropsStruct, - Price.PropsStruct, - AddressLike, - boolean, - ] - ): string; - encodeFunctionData(functionFragment: "getGlvWithdrawal", values: [AddressLike, BytesLike]): string; - encodeFunctionData(functionFragment: "getGlvWithdrawals", values: [AddressLike, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "getGlvs", values: [AddressLike, BigNumberish, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "getAccountGlvDeposits", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAccountGlvWithdrawals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlv", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvBySalt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvDeposits", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvInfoList", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvShift", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvShifts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvTokenPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvValue", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvWithdrawals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlvs", data: BytesLike): Result; -} - -export interface GlvReader extends BaseContract { - connect(runner?: ContractRunner | null): GlvReader; - waitForDeployment(): Promise; - - interface: GlvReaderInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - getAccountGlvDeposits: TypedContractMethod< - [dataStore: AddressLike, account: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvDeposit.PropsStructOutput[]], - "view" - >; - - getAccountGlvWithdrawals: TypedContractMethod< - [dataStore: AddressLike, account: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvWithdrawal.PropsStructOutput[]], - "view" - >; - - getGlv: TypedContractMethod<[dataStore: AddressLike, glv: AddressLike], [Glv.PropsStructOutput], "view">; - - getGlvBySalt: TypedContractMethod<[dataStore: AddressLike, salt: BytesLike], [Glv.PropsStructOutput], "view">; - - getGlvDeposit: TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [GlvDeposit.PropsStructOutput], "view">; - - getGlvDeposits: TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvDeposit.PropsStructOutput[]], - "view" - >; - - getGlvInfo: TypedContractMethod<[dataStore: AddressLike, glv: AddressLike], [GlvReader.GlvInfoStructOutput], "view">; - - getGlvInfoList: TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvReader.GlvInfoStructOutput[]], - "view" - >; - - getGlvShift: TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [GlvShift.PropsStructOutput], "view">; - - getGlvShifts: TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvShift.PropsStructOutput[]], - "view" - >; - - getGlvTokenPrice: TypedContractMethod< - [ - dataStore: AddressLike, - marketAddresses: AddressLike[], - indexTokenPrices: Price.PropsStruct[], - longTokenPrice: Price.PropsStruct, - shortTokenPrice: Price.PropsStruct, - glv: AddressLike, - maximize: boolean, - ], - [[bigint, bigint, bigint]], - "view" - >; - - getGlvValue: TypedContractMethod< - [ - dataStore: AddressLike, - marketAddresses: AddressLike[], - indexTokenPrices: Price.PropsStruct[], - longTokenPrice: Price.PropsStruct, - shortTokenPrice: Price.PropsStruct, - glv: AddressLike, - maximize: boolean, - ], - [bigint], - "view" - >; - - getGlvWithdrawal: TypedContractMethod< - [dataStore: AddressLike, key: BytesLike], - [GlvWithdrawal.PropsStructOutput], - "view" - >; - - getGlvWithdrawals: TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvWithdrawal.PropsStructOutput[]], - "view" - >; - - getGlvs: TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [Glv.PropsStructOutput[]], - "view" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "getAccountGlvDeposits" - ): TypedContractMethod< - [dataStore: AddressLike, account: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvDeposit.PropsStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getAccountGlvWithdrawals" - ): TypedContractMethod< - [dataStore: AddressLike, account: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvWithdrawal.PropsStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getGlv" - ): TypedContractMethod<[dataStore: AddressLike, glv: AddressLike], [Glv.PropsStructOutput], "view">; - getFunction( - nameOrSignature: "getGlvBySalt" - ): TypedContractMethod<[dataStore: AddressLike, salt: BytesLike], [Glv.PropsStructOutput], "view">; - getFunction( - nameOrSignature: "getGlvDeposit" - ): TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [GlvDeposit.PropsStructOutput], "view">; - getFunction( - nameOrSignature: "getGlvDeposits" - ): TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvDeposit.PropsStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getGlvInfo" - ): TypedContractMethod<[dataStore: AddressLike, glv: AddressLike], [GlvReader.GlvInfoStructOutput], "view">; - getFunction( - nameOrSignature: "getGlvInfoList" - ): TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvReader.GlvInfoStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getGlvShift" - ): TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [GlvShift.PropsStructOutput], "view">; - getFunction( - nameOrSignature: "getGlvShifts" - ): TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvShift.PropsStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getGlvTokenPrice" - ): TypedContractMethod< - [ - dataStore: AddressLike, - marketAddresses: AddressLike[], - indexTokenPrices: Price.PropsStruct[], - longTokenPrice: Price.PropsStruct, - shortTokenPrice: Price.PropsStruct, - glv: AddressLike, - maximize: boolean, - ], - [[bigint, bigint, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getGlvValue" - ): TypedContractMethod< - [ - dataStore: AddressLike, - marketAddresses: AddressLike[], - indexTokenPrices: Price.PropsStruct[], - longTokenPrice: Price.PropsStruct, - shortTokenPrice: Price.PropsStruct, - glv: AddressLike, - maximize: boolean, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getGlvWithdrawal" - ): TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [GlvWithdrawal.PropsStructOutput], "view">; - getFunction( - nameOrSignature: "getGlvWithdrawals" - ): TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [GlvWithdrawal.PropsStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getGlvs" - ): TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [Glv.PropsStructOutput[]], - "view" - >; - - filters: {}; -} diff --git a/src/typechain-types/GlvRouter.ts b/src/typechain-types/GlvRouter.ts deleted file mode 100644 index 6780664333..0000000000 --- a/src/typechain-types/GlvRouter.ts +++ /dev/null @@ -1,464 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace IGlvDepositUtils { - export type CreateGlvDepositParamsAddressesStruct = { - glv: AddressLike; - market: AddressLike; - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - initialLongToken: AddressLike; - initialShortToken: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type CreateGlvDepositParamsAddressesStructOutput = [ - glv: string, - market: string, - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - initialLongToken: string, - initialShortToken: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - glv: string; - market: string; - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - initialLongToken: string; - initialShortToken: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type CreateGlvDepositParamsStruct = { - addresses: IGlvDepositUtils.CreateGlvDepositParamsAddressesStruct; - minGlvTokens: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - shouldUnwrapNativeToken: boolean; - isMarketTokenDeposit: boolean; - dataList: BytesLike[]; - }; - - export type CreateGlvDepositParamsStructOutput = [ - addresses: IGlvDepositUtils.CreateGlvDepositParamsAddressesStructOutput, - minGlvTokens: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - shouldUnwrapNativeToken: boolean, - isMarketTokenDeposit: boolean, - dataList: string[], - ] & { - addresses: IGlvDepositUtils.CreateGlvDepositParamsAddressesStructOutput; - minGlvTokens: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - shouldUnwrapNativeToken: boolean; - isMarketTokenDeposit: boolean; - dataList: string[]; - }; -} - -export declare namespace IGlvWithdrawalUtils { - export type CreateGlvWithdrawalParamsAddressesStruct = { - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - glv: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type CreateGlvWithdrawalParamsAddressesStructOutput = [ - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - glv: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - glv: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type CreateGlvWithdrawalParamsStruct = { - addresses: IGlvWithdrawalUtils.CreateGlvWithdrawalParamsAddressesStruct; - minLongTokenAmount: BigNumberish; - minShortTokenAmount: BigNumberish; - shouldUnwrapNativeToken: boolean; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - dataList: BytesLike[]; - }; - - export type CreateGlvWithdrawalParamsStructOutput = [ - addresses: IGlvWithdrawalUtils.CreateGlvWithdrawalParamsAddressesStructOutput, - minLongTokenAmount: bigint, - minShortTokenAmount: bigint, - shouldUnwrapNativeToken: boolean, - executionFee: bigint, - callbackGasLimit: bigint, - dataList: string[], - ] & { - addresses: IGlvWithdrawalUtils.CreateGlvWithdrawalParamsAddressesStructOutput; - minLongTokenAmount: bigint; - minShortTokenAmount: bigint; - shouldUnwrapNativeToken: boolean; - executionFee: bigint; - callbackGasLimit: bigint; - dataList: string[]; - }; -} - -export declare namespace Price { - export type PropsStruct = { min: BigNumberish; max: BigNumberish }; - - export type PropsStructOutput = [min: bigint, max: bigint] & { - min: bigint; - max: bigint; - }; -} - -export declare namespace OracleUtils { - export type SimulatePricesParamsStruct = { - primaryTokens: AddressLike[]; - primaryPrices: Price.PropsStruct[]; - minTimestamp: BigNumberish; - maxTimestamp: BigNumberish; - }; - - export type SimulatePricesParamsStructOutput = [ - primaryTokens: string[], - primaryPrices: Price.PropsStructOutput[], - minTimestamp: bigint, - maxTimestamp: bigint, - ] & { - primaryTokens: string[]; - primaryPrices: Price.PropsStructOutput[]; - minTimestamp: bigint; - maxTimestamp: bigint; - }; -} - -export interface GlvRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "cancelGlvDeposit" - | "cancelGlvWithdrawal" - | "createGlvDeposit" - | "createGlvWithdrawal" - | "dataStore" - | "eventEmitter" - | "externalHandler" - | "glvDepositHandler" - | "glvWithdrawalHandler" - | "makeExternalCalls" - | "multicall" - | "roleStore" - | "router" - | "sendNativeToken" - | "sendTokens" - | "sendWnt" - | "simulateExecuteGlvDeposit" - | "simulateExecuteGlvWithdrawal" - | "simulateExecuteLatestGlvDeposit" - | "simulateExecuteLatestGlvWithdrawal" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData(functionFragment: "cancelGlvDeposit", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "cancelGlvWithdrawal", values: [BytesLike]): string; - encodeFunctionData( - functionFragment: "createGlvDeposit", - values: [IGlvDepositUtils.CreateGlvDepositParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "createGlvWithdrawal", - values: [IGlvWithdrawalUtils.CreateGlvWithdrawalParamsStruct] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData(functionFragment: "externalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "glvDepositHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "glvWithdrawalHandler", values?: undefined): string; - encodeFunctionData( - functionFragment: "makeExternalCalls", - values: [AddressLike[], BytesLike[], AddressLike[], AddressLike[]] - ): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendNativeToken", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendWnt", values: [AddressLike, BigNumberish]): string; - encodeFunctionData( - functionFragment: "simulateExecuteGlvDeposit", - values: [BytesLike, OracleUtils.SimulatePricesParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "simulateExecuteGlvWithdrawal", - values: [BytesLike, OracleUtils.SimulatePricesParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "simulateExecuteLatestGlvDeposit", - values: [OracleUtils.SimulatePricesParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "simulateExecuteLatestGlvWithdrawal", - values: [OracleUtils.SimulatePricesParamsStruct] - ): string; - - decodeFunctionResult(functionFragment: "cancelGlvDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelGlvWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createGlvDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createGlvWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "externalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "glvDepositHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "glvWithdrawalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "makeExternalCalls", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendNativeToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendWnt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteGlvDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteGlvWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteLatestGlvDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "simulateExecuteLatestGlvWithdrawal", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface GlvRouter extends BaseContract { - connect(runner?: ContractRunner | null): GlvRouter; - waitForDeployment(): Promise; - - interface: GlvRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - cancelGlvDeposit: TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - cancelGlvWithdrawal: TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - - createGlvDeposit: TypedContractMethod<[params: IGlvDepositUtils.CreateGlvDepositParamsStruct], [string], "payable">; - - createGlvWithdrawal: TypedContractMethod< - [params: IGlvWithdrawalUtils.CreateGlvWithdrawalParamsStruct], - [string], - "payable" - >; - - dataStore: TypedContractMethod<[], [string], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - externalHandler: TypedContractMethod<[], [string], "view">; - - glvDepositHandler: TypedContractMethod<[], [string], "view">; - - glvWithdrawalHandler: TypedContractMethod<[], [string], "view">; - - makeExternalCalls: TypedContractMethod< - [ - externalCallTargets: AddressLike[], - externalCallDataList: BytesLike[], - refundTokens: AddressLike[], - refundReceivers: AddressLike[], - ], - [void], - "payable" - >; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - - roleStore: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendTokens: TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendWnt: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - simulateExecuteGlvDeposit: TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - - simulateExecuteGlvWithdrawal: TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - - simulateExecuteLatestGlvDeposit: TypedContractMethod< - [simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - - simulateExecuteLatestGlvWithdrawal: TypedContractMethod< - [simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "cancelGlvDeposit"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "cancelGlvWithdrawal"): TypedContractMethod<[key: BytesLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "createGlvDeposit" - ): TypedContractMethod<[params: IGlvDepositUtils.CreateGlvDepositParamsStruct], [string], "payable">; - getFunction( - nameOrSignature: "createGlvWithdrawal" - ): TypedContractMethod<[params: IGlvWithdrawalUtils.CreateGlvWithdrawalParamsStruct], [string], "payable">; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "externalHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "glvDepositHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "glvWithdrawalHandler"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "makeExternalCalls" - ): TypedContractMethod< - [ - externalCallTargets: AddressLike[], - externalCallDataList: BytesLike[], - refundTokens: AddressLike[], - refundReceivers: AddressLike[], - ], - [void], - "payable" - >; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendWnt" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "simulateExecuteGlvDeposit" - ): TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - getFunction( - nameOrSignature: "simulateExecuteGlvWithdrawal" - ): TypedContractMethod< - [key: BytesLike, simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], - [void], - "payable" - >; - getFunction( - nameOrSignature: "simulateExecuteLatestGlvDeposit" - ): TypedContractMethod<[simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], [void], "payable">; - getFunction( - nameOrSignature: "simulateExecuteLatestGlvWithdrawal" - ): TypedContractMethod<[simulatedOracleParams: OracleUtils.SimulatePricesParamsStruct], [void], "payable">; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/GmxMigrator.ts b/src/typechain-types/GmxMigrator.ts deleted file mode 100644 index a245aec766..0000000000 --- a/src/typechain-types/GmxMigrator.ts +++ /dev/null @@ -1,447 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface GmxMigratorInterface extends Interface { - getFunction( - nameOrSignature: - | "actionsNonce" - | "admin" - | "ammRouter" - | "approve" - | "caps" - | "endMigration" - | "getIouToken" - | "getTokenAmounts" - | "getTokenPrice" - | "gmxPrice" - | "initialize" - | "iouTokens" - | "isInitialized" - | "isMigrationActive" - | "isSigner" - | "lpTokenAs" - | "lpTokenBs" - | "lpTokens" - | "migrate" - | "minAuthorizations" - | "pendingActions" - | "prices" - | "signApprove" - | "signalApprove" - | "signedActions" - | "signers" - | "tokenAmounts" - | "whitelistedTokens" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: "ClearAction" | "SignAction" | "SignalApprove" | "SignalPendingAction" - ): EventFragment; - - encodeFunctionData(functionFragment: "actionsNonce", values?: undefined): string; - encodeFunctionData(functionFragment: "admin", values?: undefined): string; - encodeFunctionData(functionFragment: "ammRouter", values?: undefined): string; - encodeFunctionData( - functionFragment: "approve", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "caps", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "endMigration", values?: undefined): string; - encodeFunctionData(functionFragment: "getIouToken", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getTokenAmounts", values: [AddressLike[]]): string; - encodeFunctionData(functionFragment: "getTokenPrice", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "gmxPrice", values?: undefined): string; - encodeFunctionData( - functionFragment: "initialize", - values: [ - AddressLike, - BigNumberish, - AddressLike[], - AddressLike[], - AddressLike[], - BigNumberish[], - BigNumberish[], - AddressLike[], - AddressLike[], - AddressLike[], - ] - ): string; - encodeFunctionData(functionFragment: "iouTokens", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; - encodeFunctionData(functionFragment: "isMigrationActive", values?: undefined): string; - encodeFunctionData(functionFragment: "isSigner", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "lpTokenAs", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "lpTokenBs", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "lpTokens", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "migrate", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "minAuthorizations", values?: undefined): string; - encodeFunctionData(functionFragment: "pendingActions", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "prices", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "signApprove", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "signalApprove", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "signedActions", values: [AddressLike, BytesLike]): string; - encodeFunctionData(functionFragment: "signers", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "tokenAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "whitelistedTokens", values: [AddressLike]): string; - - decodeFunctionResult(functionFragment: "actionsNonce", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "ammRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "caps", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "endMigration", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getIouToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTokenAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTokenPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gmxPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "iouTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isMigrationActive", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isSigner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lpTokenAs", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lpTokenBs", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lpTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "migrate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minAuthorizations", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pendingActions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "prices", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signApprove", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signalApprove", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signedActions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signers", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "whitelistedTokens", data: BytesLike): Result; -} - -export namespace ClearActionEvent { - export type InputTuple = [action: BytesLike, nonce: BigNumberish]; - export type OutputTuple = [action: string, nonce: bigint]; - export interface OutputObject { - action: string; - nonce: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignActionEvent { - export type InputTuple = [action: BytesLike, nonce: BigNumberish]; - export type OutputTuple = [action: string, nonce: bigint]; - export interface OutputObject { - action: string; - nonce: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignalApproveEvent { - export type InputTuple = [ - token: AddressLike, - spender: AddressLike, - amount: BigNumberish, - action: BytesLike, - nonce: BigNumberish, - ]; - export type OutputTuple = [token: string, spender: string, amount: bigint, action: string, nonce: bigint]; - export interface OutputObject { - token: string; - spender: string; - amount: bigint; - action: string; - nonce: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignalPendingActionEvent { - export type InputTuple = [action: BytesLike, nonce: BigNumberish]; - export type OutputTuple = [action: string, nonce: bigint]; - export interface OutputObject { - action: string; - nonce: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface GmxMigrator extends BaseContract { - connect(runner?: ContractRunner | null): GmxMigrator; - waitForDeployment(): Promise; - - interface: GmxMigratorInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - actionsNonce: TypedContractMethod<[], [bigint], "view">; - - admin: TypedContractMethod<[], [string], "view">; - - ammRouter: TypedContractMethod<[], [string], "view">; - - approve: TypedContractMethod< - [_token: AddressLike, _spender: AddressLike, _amount: BigNumberish, _nonce: BigNumberish], - [void], - "nonpayable" - >; - - caps: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - endMigration: TypedContractMethod<[], [void], "nonpayable">; - - getIouToken: TypedContractMethod<[_token: AddressLike], [string], "view">; - - getTokenAmounts: TypedContractMethod<[_tokens: AddressLike[]], [bigint[]], "view">; - - getTokenPrice: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - gmxPrice: TypedContractMethod<[], [bigint], "view">; - - initialize: TypedContractMethod< - [ - _ammRouter: AddressLike, - _gmxPrice: BigNumberish, - _signers: AddressLike[], - _whitelistedTokens: AddressLike[], - _iouTokens: AddressLike[], - _prices: BigNumberish[], - _caps: BigNumberish[], - _lpTokens: AddressLike[], - _lpTokenAs: AddressLike[], - _lpTokenBs: AddressLike[], - ], - [void], - "nonpayable" - >; - - iouTokens: TypedContractMethod<[arg0: AddressLike], [string], "view">; - - isInitialized: TypedContractMethod<[], [boolean], "view">; - - isMigrationActive: TypedContractMethod<[], [boolean], "view">; - - isSigner: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - lpTokenAs: TypedContractMethod<[arg0: AddressLike], [string], "view">; - - lpTokenBs: TypedContractMethod<[arg0: AddressLike], [string], "view">; - - lpTokens: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - migrate: TypedContractMethod<[_token: AddressLike, _tokenAmount: BigNumberish], [void], "nonpayable">; - - minAuthorizations: TypedContractMethod<[], [bigint], "view">; - - pendingActions: TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - - prices: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - signApprove: TypedContractMethod< - [_token: AddressLike, _spender: AddressLike, _amount: BigNumberish, _nonce: BigNumberish], - [void], - "nonpayable" - >; - - signalApprove: TypedContractMethod< - [_token: AddressLike, _spender: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - signedActions: TypedContractMethod<[arg0: AddressLike, arg1: BytesLike], [boolean], "view">; - - signers: TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - tokenAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - whitelistedTokens: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "actionsNonce"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "admin"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "ammRouter"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod< - [_token: AddressLike, _spender: AddressLike, _amount: BigNumberish, _nonce: BigNumberish], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "caps"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "endMigration"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "getIouToken"): TypedContractMethod<[_token: AddressLike], [string], "view">; - getFunction(nameOrSignature: "getTokenAmounts"): TypedContractMethod<[_tokens: AddressLike[]], [bigint[]], "view">; - getFunction(nameOrSignature: "getTokenPrice"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "gmxPrice"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "initialize" - ): TypedContractMethod< - [ - _ammRouter: AddressLike, - _gmxPrice: BigNumberish, - _signers: AddressLike[], - _whitelistedTokens: AddressLike[], - _iouTokens: AddressLike[], - _prices: BigNumberish[], - _caps: BigNumberish[], - _lpTokens: AddressLike[], - _lpTokenAs: AddressLike[], - _lpTokenBs: AddressLike[], - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "iouTokens"): TypedContractMethod<[arg0: AddressLike], [string], "view">; - getFunction(nameOrSignature: "isInitialized"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isMigrationActive"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isSigner"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "lpTokenAs"): TypedContractMethod<[arg0: AddressLike], [string], "view">; - getFunction(nameOrSignature: "lpTokenBs"): TypedContractMethod<[arg0: AddressLike], [string], "view">; - getFunction(nameOrSignature: "lpTokens"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "migrate" - ): TypedContractMethod<[_token: AddressLike, _tokenAmount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "minAuthorizations"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "pendingActions"): TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "prices"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "signApprove" - ): TypedContractMethod< - [_token: AddressLike, _spender: AddressLike, _amount: BigNumberish, _nonce: BigNumberish], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "signalApprove" - ): TypedContractMethod<[_token: AddressLike, _spender: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "signedActions" - ): TypedContractMethod<[arg0: AddressLike, arg1: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "signers"): TypedContractMethod<[arg0: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "tokenAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "whitelistedTokens"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - getEvent( - key: "ClearAction" - ): TypedContractEvent; - getEvent( - key: "SignAction" - ): TypedContractEvent; - getEvent( - key: "SignalApprove" - ): TypedContractEvent; - getEvent( - key: "SignalPendingAction" - ): TypedContractEvent< - SignalPendingActionEvent.InputTuple, - SignalPendingActionEvent.OutputTuple, - SignalPendingActionEvent.OutputObject - >; - - filters: { - "ClearAction(bytes32,uint256)": TypedContractEvent< - ClearActionEvent.InputTuple, - ClearActionEvent.OutputTuple, - ClearActionEvent.OutputObject - >; - ClearAction: TypedContractEvent< - ClearActionEvent.InputTuple, - ClearActionEvent.OutputTuple, - ClearActionEvent.OutputObject - >; - - "SignAction(bytes32,uint256)": TypedContractEvent< - SignActionEvent.InputTuple, - SignActionEvent.OutputTuple, - SignActionEvent.OutputObject - >; - SignAction: TypedContractEvent< - SignActionEvent.InputTuple, - SignActionEvent.OutputTuple, - SignActionEvent.OutputObject - >; - - "SignalApprove(address,address,uint256,bytes32,uint256)": TypedContractEvent< - SignalApproveEvent.InputTuple, - SignalApproveEvent.OutputTuple, - SignalApproveEvent.OutputObject - >; - SignalApprove: TypedContractEvent< - SignalApproveEvent.InputTuple, - SignalApproveEvent.OutputTuple, - SignalApproveEvent.OutputObject - >; - - "SignalPendingAction(bytes32,uint256)": TypedContractEvent< - SignalPendingActionEvent.InputTuple, - SignalPendingActionEvent.OutputTuple, - SignalPendingActionEvent.OutputObject - >; - SignalPendingAction: TypedContractEvent< - SignalPendingActionEvent.InputTuple, - SignalPendingActionEvent.OutputTuple, - SignalPendingActionEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/GovToken.ts b/src/typechain-types/GovToken.ts deleted file mode 100644 index 1fae633be1..0000000000 --- a/src/typechain-types/GovToken.ts +++ /dev/null @@ -1,498 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace ERC20Votes { - export type CheckpointStruct = { - fromBlock: BigNumberish; - votes: BigNumberish; - }; - - export type CheckpointStructOutput = [fromBlock: bigint, votes: bigint] & { - fromBlock: bigint; - votes: bigint; - }; -} - -export interface GovTokenInterface extends Interface { - getFunction( - nameOrSignature: - | "CLOCK_MODE" - | "DOMAIN_SEPARATOR" - | "allowance" - | "approve" - | "balanceOf" - | "burn" - | "checkpoints" - | "clock" - | "decimals" - | "decreaseAllowance" - | "delegate" - | "delegateBySig" - | "delegates" - | "eip712Domain" - | "getPastTotalSupply" - | "getPastVotes" - | "getVotes" - | "increaseAllowance" - | "mint" - | "name" - | "nonces" - | "numCheckpoints" - | "permit" - | "roleStore" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: "Approval" | "DelegateChanged" | "DelegateVotesChanged" | "EIP712DomainChanged" | "Transfer" - ): EventFragment; - - encodeFunctionData(functionFragment: "CLOCK_MODE", values?: undefined): string; - encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; - encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "burn", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "checkpoints", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "clock", values?: undefined): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "decreaseAllowance", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "delegate", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "delegateBySig", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] - ): string; - encodeFunctionData(functionFragment: "delegates", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "eip712Domain", values?: undefined): string; - encodeFunctionData(functionFragment: "getPastTotalSupply", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "getPastVotes", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "getVotes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "increaseAllowance", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "mint", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "numCheckpoints", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "permit", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] - ): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "CLOCK_MODE", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "checkpoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "clock", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "delegateBySig", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eip712Domain", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPastTotalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPastVotes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "numCheckpoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; - export interface OutputObject { - owner: string; - spender: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DelegateChangedEvent { - export type InputTuple = [delegator: AddressLike, fromDelegate: AddressLike, toDelegate: AddressLike]; - export type OutputTuple = [delegator: string, fromDelegate: string, toDelegate: string]; - export interface OutputObject { - delegator: string; - fromDelegate: string; - toDelegate: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DelegateVotesChangedEvent { - export type InputTuple = [delegate: AddressLike, previousBalance: BigNumberish, newBalance: BigNumberish]; - export type OutputTuple = [delegate: string, previousBalance: bigint, newBalance: bigint]; - export interface OutputObject { - delegate: string; - previousBalance: bigint; - newBalance: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace EIP712DomainChangedEvent { - export type InputTuple = []; - export type OutputTuple = []; - export interface OutputObject {} - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface GovToken extends BaseContract { - connect(runner?: ContractRunner | null): GovToken; - waitForDeployment(): Promise; - - interface: GovTokenInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - CLOCK_MODE: TypedContractMethod<[], [string], "view">; - - DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; - - allowance: TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; - - approve: TypedContractMethod<[spender: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - - balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; - - burn: TypedContractMethod<[account: AddressLike, amount: BigNumberish], [void], "nonpayable">; - - checkpoints: TypedContractMethod< - [account: AddressLike, pos: BigNumberish], - [ERC20Votes.CheckpointStructOutput], - "view" - >; - - clock: TypedContractMethod<[], [bigint], "view">; - - decimals: TypedContractMethod<[], [bigint], "view">; - - decreaseAllowance: TypedContractMethod< - [spender: AddressLike, subtractedValue: BigNumberish], - [boolean], - "nonpayable" - >; - - delegate: TypedContractMethod<[delegatee: AddressLike], [void], "nonpayable">; - - delegateBySig: TypedContractMethod< - [delegatee: AddressLike, nonce: BigNumberish, expiry: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike], - [void], - "nonpayable" - >; - - delegates: TypedContractMethod<[account: AddressLike], [string], "view">; - - eip712Domain: TypedContractMethod< - [], - [ - [string, string, string, bigint, string, string, bigint[]] & { - fields: string; - name: string; - version: string; - chainId: bigint; - verifyingContract: string; - salt: string; - extensions: bigint[]; - }, - ], - "view" - >; - - getPastTotalSupply: TypedContractMethod<[timepoint: BigNumberish], [bigint], "view">; - - getPastVotes: TypedContractMethod<[account: AddressLike, timepoint: BigNumberish], [bigint], "view">; - - getVotes: TypedContractMethod<[account: AddressLike], [bigint], "view">; - - increaseAllowance: TypedContractMethod<[spender: AddressLike, addedValue: BigNumberish], [boolean], "nonpayable">; - - mint: TypedContractMethod<[account: AddressLike, amount: BigNumberish], [void], "nonpayable">; - - name: TypedContractMethod<[], [string], "view">; - - nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">; - - numCheckpoints: TypedContractMethod<[account: AddressLike], [bigint], "view">; - - permit: TypedContractMethod< - [ - owner: AddressLike, - spender: AddressLike, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - ], - [void], - "nonpayable" - >; - - roleStore: TypedContractMethod<[], [string], "view">; - - symbol: TypedContractMethod<[], [string], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transfer: TypedContractMethod<[to: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - - transferFrom: TypedContractMethod< - [from: AddressLike, to: AddressLike, amount: BigNumberish], - [boolean], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "CLOCK_MODE"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "DOMAIN_SEPARATOR"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "allowance" - ): TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[spender: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[account: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "burn" - ): TypedContractMethod<[account: AddressLike, amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "checkpoints" - ): TypedContractMethod<[account: AddressLike, pos: BigNumberish], [ERC20Votes.CheckpointStructOutput], "view">; - getFunction(nameOrSignature: "clock"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "decreaseAllowance" - ): TypedContractMethod<[spender: AddressLike, subtractedValue: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "delegate"): TypedContractMethod<[delegatee: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "delegateBySig" - ): TypedContractMethod< - [delegatee: AddressLike, nonce: BigNumberish, expiry: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "delegates"): TypedContractMethod<[account: AddressLike], [string], "view">; - getFunction(nameOrSignature: "eip712Domain"): TypedContractMethod< - [], - [ - [string, string, string, bigint, string, string, bigint[]] & { - fields: string; - name: string; - version: string; - chainId: bigint; - verifyingContract: string; - salt: string; - extensions: bigint[]; - }, - ], - "view" - >; - getFunction(nameOrSignature: "getPastTotalSupply"): TypedContractMethod<[timepoint: BigNumberish], [bigint], "view">; - getFunction( - nameOrSignature: "getPastVotes" - ): TypedContractMethod<[account: AddressLike, timepoint: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "getVotes"): TypedContractMethod<[account: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "increaseAllowance" - ): TypedContractMethod<[spender: AddressLike, addedValue: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "mint" - ): TypedContractMethod<[account: AddressLike, amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "nonces"): TypedContractMethod<[owner: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "numCheckpoints"): TypedContractMethod<[account: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "permit" - ): TypedContractMethod< - [ - owner: AddressLike, - spender: AddressLike, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transfer" - ): TypedContractMethod<[to: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod<[from: AddressLike, to: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent( - key: "DelegateChanged" - ): TypedContractEvent< - DelegateChangedEvent.InputTuple, - DelegateChangedEvent.OutputTuple, - DelegateChangedEvent.OutputObject - >; - getEvent( - key: "DelegateVotesChanged" - ): TypedContractEvent< - DelegateVotesChangedEvent.InputTuple, - DelegateVotesChangedEvent.OutputTuple, - DelegateVotesChangedEvent.OutputObject - >; - getEvent( - key: "EIP712DomainChanged" - ): TypedContractEvent< - EIP712DomainChangedEvent.InputTuple, - EIP712DomainChangedEvent.OutputTuple, - EIP712DomainChangedEvent.OutputObject - >; - getEvent( - key: "Transfer" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "DelegateChanged(address,address,address)": TypedContractEvent< - DelegateChangedEvent.InputTuple, - DelegateChangedEvent.OutputTuple, - DelegateChangedEvent.OutputObject - >; - DelegateChanged: TypedContractEvent< - DelegateChangedEvent.InputTuple, - DelegateChangedEvent.OutputTuple, - DelegateChangedEvent.OutputObject - >; - - "DelegateVotesChanged(address,uint256,uint256)": TypedContractEvent< - DelegateVotesChangedEvent.InputTuple, - DelegateVotesChangedEvent.OutputTuple, - DelegateVotesChangedEvent.OutputObject - >; - DelegateVotesChanged: TypedContractEvent< - DelegateVotesChangedEvent.InputTuple, - DelegateVotesChangedEvent.OutputTuple, - DelegateVotesChangedEvent.OutputObject - >; - - "EIP712DomainChanged()": TypedContractEvent< - EIP712DomainChangedEvent.InputTuple, - EIP712DomainChangedEvent.OutputTuple, - EIP712DomainChangedEvent.OutputObject - >; - EIP712DomainChanged: TypedContractEvent< - EIP712DomainChangedEvent.InputTuple, - EIP712DomainChangedEvent.OutputTuple, - EIP712DomainChangedEvent.OutputObject - >; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - }; -} diff --git a/src/typechain-types/LayerZeroProvider.ts b/src/typechain-types/LayerZeroProvider.ts deleted file mode 100644 index f6450a2f6a..0000000000 --- a/src/typechain-types/LayerZeroProvider.ts +++ /dev/null @@ -1,221 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace IRelayUtils { - export type BridgeOutParamsStruct = { - token: AddressLike; - amount: BigNumberish; - minAmountOut: BigNumberish; - provider: AddressLike; - data: BytesLike; - }; - - export type BridgeOutParamsStructOutput = [ - token: string, - amount: bigint, - minAmountOut: bigint, - provider: string, - data: string, - ] & { - token: string; - amount: bigint; - minAmountOut: bigint; - provider: string; - data: string; - }; -} - -export interface LayerZeroProviderInterface extends Interface { - getFunction( - nameOrSignature: - | "bridgeOut" - | "dataStore" - | "eventEmitter" - | "lzCompose" - | "multichainGlvRouter" - | "multichainGmRouter" - | "multichainOrderRouter" - | "multichainVault" - | "roleStore" - | "withdrawTokens" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData( - functionFragment: "bridgeOut", - values: [AddressLike, BigNumberish, IRelayUtils.BridgeOutParamsStruct] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData( - functionFragment: "lzCompose", - values: [AddressLike, BytesLike, BytesLike, AddressLike, BytesLike] - ): string; - encodeFunctionData(functionFragment: "multichainGlvRouter", values?: undefined): string; - encodeFunctionData(functionFragment: "multichainGmRouter", values?: undefined): string; - encodeFunctionData(functionFragment: "multichainOrderRouter", values?: undefined): string; - encodeFunctionData(functionFragment: "multichainVault", values?: undefined): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "withdrawTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "bridgeOut", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lzCompose", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multichainGlvRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multichainGmRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multichainOrderRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multichainVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawTokens", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface LayerZeroProvider extends BaseContract { - connect(runner?: ContractRunner | null): LayerZeroProvider; - waitForDeployment(): Promise; - - interface: LayerZeroProviderInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - bridgeOut: TypedContractMethod< - [account: AddressLike, srcChainId: BigNumberish, params: IRelayUtils.BridgeOutParamsStruct], - [bigint], - "nonpayable" - >; - - dataStore: TypedContractMethod<[], [string], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - lzCompose: TypedContractMethod< - [from: AddressLike, arg1: BytesLike, message: BytesLike, arg3: AddressLike, arg4: BytesLike], - [void], - "payable" - >; - - multichainGlvRouter: TypedContractMethod<[], [string], "view">; - - multichainGmRouter: TypedContractMethod<[], [string], "view">; - - multichainOrderRouter: TypedContractMethod<[], [string], "view">; - - multichainVault: TypedContractMethod<[], [string], "view">; - - roleStore: TypedContractMethod<[], [string], "view">; - - withdrawTokens: TypedContractMethod< - [token: AddressLike, receiver: AddressLike, amount: BigNumberish], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "bridgeOut" - ): TypedContractMethod< - [account: AddressLike, srcChainId: BigNumberish, params: IRelayUtils.BridgeOutParamsStruct], - [bigint], - "nonpayable" - >; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "lzCompose" - ): TypedContractMethod< - [from: AddressLike, arg1: BytesLike, message: BytesLike, arg3: AddressLike, arg4: BytesLike], - [void], - "payable" - >; - getFunction(nameOrSignature: "multichainGlvRouter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multichainGmRouter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multichainOrderRouter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multichainVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "withdrawTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "nonpayable">; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/MintableBaseToken.ts b/src/typechain-types/MintableBaseToken.ts deleted file mode 100644 index 69a612c060..0000000000 --- a/src/typechain-types/MintableBaseToken.ts +++ /dev/null @@ -1,380 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface MintableBaseTokenInterface extends Interface { - getFunction( - nameOrSignature: - | "addAdmin" - | "addNonStakingAccount" - | "admins" - | "allowance" - | "allowances" - | "approve" - | "balanceOf" - | "balances" - | "burn" - | "claim" - | "decimals" - | "gov" - | "inPrivateTransferMode" - | "isHandler" - | "isMinter" - | "mint" - | "name" - | "nonStakingAccounts" - | "nonStakingSupply" - | "recoverClaim" - | "removeAdmin" - | "removeNonStakingAccount" - | "setGov" - | "setHandler" - | "setInPrivateTransferMode" - | "setInfo" - | "setMinter" - | "setYieldTrackers" - | "stakedBalance" - | "symbol" - | "totalStaked" - | "totalSupply" - | "transfer" - | "transferFrom" - | "withdrawToken" - | "yieldTrackers" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; - - encodeFunctionData(functionFragment: "addAdmin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "addNonStakingAccount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "admins", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "allowances", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "balances", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "burn", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "claim", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "inPrivateTransferMode", values?: undefined): string; - encodeFunctionData(functionFragment: "isHandler", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isMinter", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "mint", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nonStakingAccounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "nonStakingSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "recoverClaim", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "removeAdmin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "removeNonStakingAccount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setHandler", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setInPrivateTransferMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setInfo", values: [string, string]): string; - encodeFunctionData(functionFragment: "setMinter", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setYieldTrackers", values: [AddressLike[]]): string; - encodeFunctionData(functionFragment: "stakedBalance", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "totalStaked", values?: undefined): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "withdrawToken", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "yieldTrackers", values: [BigNumberish]): string; - - decodeFunctionResult(functionFragment: "addAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addNonStakingAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "admins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inPrivateTransferMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isMinter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonStakingAccounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonStakingSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "recoverClaim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeNonStakingAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInPrivateTransferMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMinter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setYieldTrackers", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stakedBalance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalStaked", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "yieldTrackers", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; - export interface OutputObject { - owner: string; - spender: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface MintableBaseToken extends BaseContract { - connect(runner?: ContractRunner | null): MintableBaseToken; - waitForDeployment(): Promise; - - interface: MintableBaseTokenInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - addAdmin: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - addNonStakingAccount: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - admins: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - allowance: TypedContractMethod<[_owner: AddressLike, _spender: AddressLike], [bigint], "view">; - - allowances: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - - approve: TypedContractMethod<[_spender: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - - balanceOf: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - balances: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - burn: TypedContractMethod<[_account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - claim: TypedContractMethod<[_receiver: AddressLike], [void], "nonpayable">; - - decimals: TypedContractMethod<[], [bigint], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - inPrivateTransferMode: TypedContractMethod<[], [boolean], "view">; - - isHandler: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isMinter: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - mint: TypedContractMethod<[_account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - name: TypedContractMethod<[], [string], "view">; - - nonStakingAccounts: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - nonStakingSupply: TypedContractMethod<[], [bigint], "view">; - - recoverClaim: TypedContractMethod<[_account: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - - removeAdmin: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - removeNonStakingAccount: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setHandler: TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setInPrivateTransferMode: TypedContractMethod<[_inPrivateTransferMode: boolean], [void], "nonpayable">; - - setInfo: TypedContractMethod<[_name: string, _symbol: string], [void], "nonpayable">; - - setMinter: TypedContractMethod<[_minter: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setYieldTrackers: TypedContractMethod<[_yieldTrackers: AddressLike[]], [void], "nonpayable">; - - stakedBalance: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - symbol: TypedContractMethod<[], [string], "view">; - - totalStaked: TypedContractMethod<[], [bigint], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transfer: TypedContractMethod<[_recipient: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - - transferFrom: TypedContractMethod< - [_sender: AddressLike, _recipient: AddressLike, _amount: BigNumberish], - [boolean], - "nonpayable" - >; - - withdrawToken: TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - yieldTrackers: TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "addAdmin"): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "addNonStakingAccount" - ): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "admins"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "allowance" - ): TypedContractMethod<[_owner: AddressLike, _spender: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "allowances" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[_spender: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "balances"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "burn" - ): TypedContractMethod<[_account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "claim"): TypedContractMethod<[_receiver: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "inPrivateTransferMode"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isHandler"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isMinter"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "mint" - ): TypedContractMethod<[_account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "nonStakingAccounts"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "nonStakingSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "recoverClaim" - ): TypedContractMethod<[_account: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeAdmin"): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "removeNonStakingAccount" - ): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setHandler" - ): TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInPrivateTransferMode" - ): TypedContractMethod<[_inPrivateTransferMode: boolean], [void], "nonpayable">; - getFunction(nameOrSignature: "setInfo"): TypedContractMethod<[_name: string, _symbol: string], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMinter" - ): TypedContractMethod<[_minter: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setYieldTrackers" - ): TypedContractMethod<[_yieldTrackers: AddressLike[]], [void], "nonpayable">; - getFunction(nameOrSignature: "stakedBalance"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "totalStaked"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transfer" - ): TypedContractMethod<[_recipient: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod< - [_sender: AddressLike, _recipient: AddressLike, _amount: BigNumberish], - [boolean], - "nonpayable" - >; - getFunction( - nameOrSignature: "withdrawToken" - ): TypedContractMethod<[_token: AddressLike, _account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "yieldTrackers"): TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent( - key: "Transfer" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - }; -} diff --git a/src/typechain-types/Multicall.ts b/src/typechain-types/Multicall.ts deleted file mode 100644 index a9d100f7b5..0000000000 --- a/src/typechain-types/Multicall.ts +++ /dev/null @@ -1,269 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace Multicall3 { - export type CallStruct = { target: AddressLike; callData: BytesLike }; - - export type CallStructOutput = [target: string, callData: string] & { - target: string; - callData: string; - }; - - export type Call3Struct = { - target: AddressLike; - allowFailure: boolean; - callData: BytesLike; - }; - - export type Call3StructOutput = [target: string, allowFailure: boolean, callData: string] & { - target: string; - allowFailure: boolean; - callData: string; - }; - - export type ResultStruct = { success: boolean; returnData: BytesLike }; - - export type ResultStructOutput = [success: boolean, returnData: string] & { - success: boolean; - returnData: string; - }; - - export type Call3ValueStruct = { - target: AddressLike; - allowFailure: boolean; - value: BigNumberish; - callData: BytesLike; - }; - - export type Call3ValueStructOutput = [target: string, allowFailure: boolean, value: bigint, callData: string] & { - target: string; - allowFailure: boolean; - value: bigint; - callData: string; - }; -} - -export interface MulticallInterface extends Interface { - getFunction( - nameOrSignature: - | "aggregate" - | "aggregate3" - | "aggregate3Value" - | "blockAndAggregate" - | "getBasefee" - | "getBlockHash" - | "getBlockNumber" - | "getChainId" - | "getCurrentBlockCoinbase" - | "getCurrentBlockGasLimit" - | "getCurrentBlockTimestamp" - | "getEthBalance" - | "getLastBlockHash" - | "tryAggregate" - | "tryBlockAndAggregate" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "aggregate", values: [Multicall3.CallStruct[]]): string; - encodeFunctionData(functionFragment: "aggregate3", values: [Multicall3.Call3Struct[]]): string; - encodeFunctionData(functionFragment: "aggregate3Value", values: [Multicall3.Call3ValueStruct[]]): string; - encodeFunctionData(functionFragment: "blockAndAggregate", values: [Multicall3.CallStruct[]]): string; - encodeFunctionData(functionFragment: "getBasefee", values?: undefined): string; - encodeFunctionData(functionFragment: "getBlockHash", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "getBlockNumber", values?: undefined): string; - encodeFunctionData(functionFragment: "getChainId", values?: undefined): string; - encodeFunctionData(functionFragment: "getCurrentBlockCoinbase", values?: undefined): string; - encodeFunctionData(functionFragment: "getCurrentBlockGasLimit", values?: undefined): string; - encodeFunctionData(functionFragment: "getCurrentBlockTimestamp", values?: undefined): string; - encodeFunctionData(functionFragment: "getEthBalance", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getLastBlockHash", values?: undefined): string; - encodeFunctionData(functionFragment: "tryAggregate", values: [boolean, Multicall3.CallStruct[]]): string; - encodeFunctionData(functionFragment: "tryBlockAndAggregate", values: [boolean, Multicall3.CallStruct[]]): string; - - decodeFunctionResult(functionFragment: "aggregate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "aggregate3", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "aggregate3Value", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "blockAndAggregate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getBasefee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getBlockHash", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getBlockNumber", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getChainId", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getCurrentBlockCoinbase", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getCurrentBlockGasLimit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getCurrentBlockTimestamp", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getEthBalance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getLastBlockHash", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tryAggregate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tryBlockAndAggregate", data: BytesLike): Result; -} - -export interface Multicall extends BaseContract { - connect(runner?: ContractRunner | null): Multicall; - waitForDeployment(): Promise; - - interface: MulticallInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - aggregate: TypedContractMethod< - [calls: Multicall3.CallStruct[]], - [[bigint, string[]] & { blockNumber: bigint; returnData: string[] }], - "payable" - >; - - aggregate3: TypedContractMethod<[calls: Multicall3.Call3Struct[]], [Multicall3.ResultStructOutput[]], "payable">; - - aggregate3Value: TypedContractMethod< - [calls: Multicall3.Call3ValueStruct[]], - [Multicall3.ResultStructOutput[]], - "payable" - >; - - blockAndAggregate: TypedContractMethod< - [calls: Multicall3.CallStruct[]], - [ - [bigint, string, Multicall3.ResultStructOutput[]] & { - blockNumber: bigint; - blockHash: string; - returnData: Multicall3.ResultStructOutput[]; - }, - ], - "payable" - >; - - getBasefee: TypedContractMethod<[], [bigint], "view">; - - getBlockHash: TypedContractMethod<[blockNumber: BigNumberish], [string], "view">; - - getBlockNumber: TypedContractMethod<[], [bigint], "view">; - - getChainId: TypedContractMethod<[], [bigint], "view">; - - getCurrentBlockCoinbase: TypedContractMethod<[], [string], "view">; - - getCurrentBlockGasLimit: TypedContractMethod<[], [bigint], "view">; - - getCurrentBlockTimestamp: TypedContractMethod<[], [bigint], "view">; - - getEthBalance: TypedContractMethod<[addr: AddressLike], [bigint], "view">; - - getLastBlockHash: TypedContractMethod<[], [string], "view">; - - tryAggregate: TypedContractMethod< - [requireSuccess: boolean, calls: Multicall3.CallStruct[]], - [Multicall3.ResultStructOutput[]], - "payable" - >; - - tryBlockAndAggregate: TypedContractMethod< - [requireSuccess: boolean, calls: Multicall3.CallStruct[]], - [ - [bigint, string, Multicall3.ResultStructOutput[]] & { - blockNumber: bigint; - blockHash: string; - returnData: Multicall3.ResultStructOutput[]; - }, - ], - "payable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "aggregate" - ): TypedContractMethod< - [calls: Multicall3.CallStruct[]], - [[bigint, string[]] & { blockNumber: bigint; returnData: string[] }], - "payable" - >; - getFunction( - nameOrSignature: "aggregate3" - ): TypedContractMethod<[calls: Multicall3.Call3Struct[]], [Multicall3.ResultStructOutput[]], "payable">; - getFunction( - nameOrSignature: "aggregate3Value" - ): TypedContractMethod<[calls: Multicall3.Call3ValueStruct[]], [Multicall3.ResultStructOutput[]], "payable">; - getFunction(nameOrSignature: "blockAndAggregate"): TypedContractMethod< - [calls: Multicall3.CallStruct[]], - [ - [bigint, string, Multicall3.ResultStructOutput[]] & { - blockNumber: bigint; - blockHash: string; - returnData: Multicall3.ResultStructOutput[]; - }, - ], - "payable" - >; - getFunction(nameOrSignature: "getBasefee"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "getBlockHash"): TypedContractMethod<[blockNumber: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "getBlockNumber"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "getChainId"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "getCurrentBlockCoinbase"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "getCurrentBlockGasLimit"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "getCurrentBlockTimestamp"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "getEthBalance"): TypedContractMethod<[addr: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getLastBlockHash"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "tryAggregate" - ): TypedContractMethod< - [requireSuccess: boolean, calls: Multicall3.CallStruct[]], - [Multicall3.ResultStructOutput[]], - "payable" - >; - getFunction(nameOrSignature: "tryBlockAndAggregate"): TypedContractMethod< - [requireSuccess: boolean, calls: Multicall3.CallStruct[]], - [ - [bigint, string, Multicall3.ResultStructOutput[]] & { - blockNumber: bigint; - blockHash: string; - returnData: Multicall3.ResultStructOutput[]; - }, - ], - "payable" - >; - - filters: {}; -} diff --git a/src/typechain-types/MultichainClaimsRouter.ts b/src/typechain-types/MultichainClaimsRouter.ts deleted file mode 100644 index c6940aa308..0000000000 --- a/src/typechain-types/MultichainClaimsRouter.ts +++ /dev/null @@ -1,464 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace MultichainRouter { - export type BaseConstructorParamsStruct = { - router: AddressLike; - roleStore: AddressLike; - dataStore: AddressLike; - eventEmitter: AddressLike; - oracle: AddressLike; - orderVault: AddressLike; - orderHandler: AddressLike; - swapHandler: AddressLike; - externalHandler: AddressLike; - multichainVault: AddressLike; - }; - - export type BaseConstructorParamsStructOutput = [ - router: string, - roleStore: string, - dataStore: string, - eventEmitter: string, - oracle: string, - orderVault: string, - orderHandler: string, - swapHandler: string, - externalHandler: string, - multichainVault: string, - ] & { - router: string; - roleStore: string; - dataStore: string; - eventEmitter: string; - oracle: string; - orderVault: string; - orderHandler: string; - swapHandler: string; - externalHandler: string; - multichainVault: string; - }; -} - -export declare namespace OracleUtils { - export type SetPricesParamsStruct = { - tokens: AddressLike[]; - providers: AddressLike[]; - data: BytesLike[]; - }; - - export type SetPricesParamsStructOutput = [tokens: string[], providers: string[], data: string[]] & { - tokens: string[]; - providers: string[]; - data: string[]; - }; -} - -export declare namespace IRelayUtils { - export type ExternalCallsStruct = { - sendTokens: AddressLike[]; - sendAmounts: BigNumberish[]; - externalCallTargets: AddressLike[]; - externalCallDataList: BytesLike[]; - refundTokens: AddressLike[]; - refundReceivers: AddressLike[]; - }; - - export type ExternalCallsStructOutput = [ - sendTokens: string[], - sendAmounts: bigint[], - externalCallTargets: string[], - externalCallDataList: string[], - refundTokens: string[], - refundReceivers: string[], - ] & { - sendTokens: string[]; - sendAmounts: bigint[]; - externalCallTargets: string[]; - externalCallDataList: string[]; - refundTokens: string[]; - refundReceivers: string[]; - }; - - export type TokenPermitStruct = { - owner: AddressLike; - spender: AddressLike; - value: BigNumberish; - deadline: BigNumberish; - v: BigNumberish; - r: BytesLike; - s: BytesLike; - token: AddressLike; - }; - - export type TokenPermitStructOutput = [ - owner: string, - spender: string, - value: bigint, - deadline: bigint, - v: bigint, - r: string, - s: string, - token: string, - ] & { - owner: string; - spender: string; - value: bigint; - deadline: bigint; - v: bigint; - r: string; - s: string; - token: string; - }; - - export type FeeParamsStruct = { - feeToken: AddressLike; - feeAmount: BigNumberish; - feeSwapPath: AddressLike[]; - }; - - export type FeeParamsStructOutput = [feeToken: string, feeAmount: bigint, feeSwapPath: string[]] & { - feeToken: string; - feeAmount: bigint; - feeSwapPath: string[]; - }; - - export type RelayParamsStruct = { - oracleParams: OracleUtils.SetPricesParamsStruct; - externalCalls: IRelayUtils.ExternalCallsStruct; - tokenPermits: IRelayUtils.TokenPermitStruct[]; - fee: IRelayUtils.FeeParamsStruct; - userNonce: BigNumberish; - deadline: BigNumberish; - signature: BytesLike; - desChainId: BigNumberish; - }; - - export type RelayParamsStructOutput = [ - oracleParams: OracleUtils.SetPricesParamsStructOutput, - externalCalls: IRelayUtils.ExternalCallsStructOutput, - tokenPermits: IRelayUtils.TokenPermitStructOutput[], - fee: IRelayUtils.FeeParamsStructOutput, - userNonce: bigint, - deadline: bigint, - signature: string, - desChainId: bigint, - ] & { - oracleParams: OracleUtils.SetPricesParamsStructOutput; - externalCalls: IRelayUtils.ExternalCallsStructOutput; - tokenPermits: IRelayUtils.TokenPermitStructOutput[]; - fee: IRelayUtils.FeeParamsStructOutput; - userNonce: bigint; - deadline: bigint; - signature: string; - desChainId: bigint; - }; -} - -export interface MultichainClaimsRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "claimAffiliateRewards" - | "claimCollateral" - | "claimFundingFees" - | "dataStore" - | "digests" - | "eventEmitter" - | "externalHandler" - | "multicall" - | "multichainVault" - | "oracle" - | "orderHandler" - | "orderVault" - | "roleStore" - | "router" - | "sendNativeToken" - | "sendTokens" - | "sendWnt" - | "swapHandler" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData( - functionFragment: "claimAffiliateRewards", - values: [IRelayUtils.RelayParamsStruct, AddressLike, BigNumberish, AddressLike[], AddressLike[], AddressLike] - ): string; - encodeFunctionData( - functionFragment: "claimCollateral", - values: [ - IRelayUtils.RelayParamsStruct, - AddressLike, - BigNumberish, - AddressLike[], - AddressLike[], - BigNumberish[], - AddressLike, - ] - ): string; - encodeFunctionData( - functionFragment: "claimFundingFees", - values: [IRelayUtils.RelayParamsStruct, AddressLike, BigNumberish, AddressLike[], AddressLike[], AddressLike] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "digests", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData(functionFragment: "externalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "multichainVault", values?: undefined): string; - encodeFunctionData(functionFragment: "oracle", values?: undefined): string; - encodeFunctionData(functionFragment: "orderHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "orderVault", values?: undefined): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendNativeToken", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendWnt", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "swapHandler", values?: undefined): string; - - decodeFunctionResult(functionFragment: "claimAffiliateRewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimCollateral", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimFundingFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "digests", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "externalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multichainVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendNativeToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendWnt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapHandler", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface MultichainClaimsRouter extends BaseContract { - connect(runner?: ContractRunner | null): MultichainClaimsRouter; - waitForDeployment(): Promise; - - interface: MultichainClaimsRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - claimAffiliateRewards: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - markets: AddressLike[], - tokens: AddressLike[], - receiver: AddressLike, - ], - [bigint[]], - "nonpayable" - >; - - claimCollateral: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - markets: AddressLike[], - tokens: AddressLike[], - timeKeys: BigNumberish[], - receiver: AddressLike, - ], - [bigint[]], - "nonpayable" - >; - - claimFundingFees: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - markets: AddressLike[], - tokens: AddressLike[], - receiver: AddressLike, - ], - [bigint[]], - "nonpayable" - >; - - dataStore: TypedContractMethod<[], [string], "view">; - - digests: TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - externalHandler: TypedContractMethod<[], [string], "view">; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - - multichainVault: TypedContractMethod<[], [string], "view">; - - oracle: TypedContractMethod<[], [string], "view">; - - orderHandler: TypedContractMethod<[], [string], "view">; - - orderVault: TypedContractMethod<[], [string], "view">; - - roleStore: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendTokens: TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendWnt: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - swapHandler: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "claimAffiliateRewards" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - markets: AddressLike[], - tokens: AddressLike[], - receiver: AddressLike, - ], - [bigint[]], - "nonpayable" - >; - getFunction( - nameOrSignature: "claimCollateral" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - markets: AddressLike[], - tokens: AddressLike[], - timeKeys: BigNumberish[], - receiver: AddressLike, - ], - [bigint[]], - "nonpayable" - >; - getFunction( - nameOrSignature: "claimFundingFees" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - markets: AddressLike[], - tokens: AddressLike[], - receiver: AddressLike, - ], - [bigint[]], - "nonpayable" - >; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "digests"): TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "externalHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - getFunction(nameOrSignature: "multichainVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "oracle"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendWnt" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction(nameOrSignature: "swapHandler"): TypedContractMethod<[], [string], "view">; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/MultichainGlvRouter.ts b/src/typechain-types/MultichainGlvRouter.ts deleted file mode 100644 index be1882c54f..0000000000 --- a/src/typechain-types/MultichainGlvRouter.ts +++ /dev/null @@ -1,581 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace MultichainRouter { - export type BaseConstructorParamsStruct = { - router: AddressLike; - roleStore: AddressLike; - dataStore: AddressLike; - eventEmitter: AddressLike; - oracle: AddressLike; - orderVault: AddressLike; - orderHandler: AddressLike; - swapHandler: AddressLike; - externalHandler: AddressLike; - multichainVault: AddressLike; - }; - - export type BaseConstructorParamsStructOutput = [ - router: string, - roleStore: string, - dataStore: string, - eventEmitter: string, - oracle: string, - orderVault: string, - orderHandler: string, - swapHandler: string, - externalHandler: string, - multichainVault: string, - ] & { - router: string; - roleStore: string; - dataStore: string; - eventEmitter: string; - oracle: string; - orderVault: string; - orderHandler: string; - swapHandler: string; - externalHandler: string; - multichainVault: string; - }; -} - -export declare namespace OracleUtils { - export type SetPricesParamsStruct = { - tokens: AddressLike[]; - providers: AddressLike[]; - data: BytesLike[]; - }; - - export type SetPricesParamsStructOutput = [tokens: string[], providers: string[], data: string[]] & { - tokens: string[]; - providers: string[]; - data: string[]; - }; -} - -export declare namespace IRelayUtils { - export type ExternalCallsStruct = { - sendTokens: AddressLike[]; - sendAmounts: BigNumberish[]; - externalCallTargets: AddressLike[]; - externalCallDataList: BytesLike[]; - refundTokens: AddressLike[]; - refundReceivers: AddressLike[]; - }; - - export type ExternalCallsStructOutput = [ - sendTokens: string[], - sendAmounts: bigint[], - externalCallTargets: string[], - externalCallDataList: string[], - refundTokens: string[], - refundReceivers: string[], - ] & { - sendTokens: string[]; - sendAmounts: bigint[]; - externalCallTargets: string[]; - externalCallDataList: string[]; - refundTokens: string[]; - refundReceivers: string[]; - }; - - export type TokenPermitStruct = { - owner: AddressLike; - spender: AddressLike; - value: BigNumberish; - deadline: BigNumberish; - v: BigNumberish; - r: BytesLike; - s: BytesLike; - token: AddressLike; - }; - - export type TokenPermitStructOutput = [ - owner: string, - spender: string, - value: bigint, - deadline: bigint, - v: bigint, - r: string, - s: string, - token: string, - ] & { - owner: string; - spender: string; - value: bigint; - deadline: bigint; - v: bigint; - r: string; - s: string; - token: string; - }; - - export type FeeParamsStruct = { - feeToken: AddressLike; - feeAmount: BigNumberish; - feeSwapPath: AddressLike[]; - }; - - export type FeeParamsStructOutput = [feeToken: string, feeAmount: bigint, feeSwapPath: string[]] & { - feeToken: string; - feeAmount: bigint; - feeSwapPath: string[]; - }; - - export type RelayParamsStruct = { - oracleParams: OracleUtils.SetPricesParamsStruct; - externalCalls: IRelayUtils.ExternalCallsStruct; - tokenPermits: IRelayUtils.TokenPermitStruct[]; - fee: IRelayUtils.FeeParamsStruct; - userNonce: BigNumberish; - deadline: BigNumberish; - signature: BytesLike; - desChainId: BigNumberish; - }; - - export type RelayParamsStructOutput = [ - oracleParams: OracleUtils.SetPricesParamsStructOutput, - externalCalls: IRelayUtils.ExternalCallsStructOutput, - tokenPermits: IRelayUtils.TokenPermitStructOutput[], - fee: IRelayUtils.FeeParamsStructOutput, - userNonce: bigint, - deadline: bigint, - signature: string, - desChainId: bigint, - ] & { - oracleParams: OracleUtils.SetPricesParamsStructOutput; - externalCalls: IRelayUtils.ExternalCallsStructOutput; - tokenPermits: IRelayUtils.TokenPermitStructOutput[]; - fee: IRelayUtils.FeeParamsStructOutput; - userNonce: bigint; - deadline: bigint; - signature: string; - desChainId: bigint; - }; - - export type TransferRequestsStruct = { - tokens: AddressLike[]; - receivers: AddressLike[]; - amounts: BigNumberish[]; - }; - - export type TransferRequestsStructOutput = [tokens: string[], receivers: string[], amounts: bigint[]] & { - tokens: string[]; - receivers: string[]; - amounts: bigint[]; - }; -} - -export declare namespace IGlvDepositUtils { - export type CreateGlvDepositParamsAddressesStruct = { - glv: AddressLike; - market: AddressLike; - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - initialLongToken: AddressLike; - initialShortToken: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type CreateGlvDepositParamsAddressesStructOutput = [ - glv: string, - market: string, - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - initialLongToken: string, - initialShortToken: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - glv: string; - market: string; - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - initialLongToken: string; - initialShortToken: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type CreateGlvDepositParamsStruct = { - addresses: IGlvDepositUtils.CreateGlvDepositParamsAddressesStruct; - minGlvTokens: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - shouldUnwrapNativeToken: boolean; - isMarketTokenDeposit: boolean; - dataList: BytesLike[]; - }; - - export type CreateGlvDepositParamsStructOutput = [ - addresses: IGlvDepositUtils.CreateGlvDepositParamsAddressesStructOutput, - minGlvTokens: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - shouldUnwrapNativeToken: boolean, - isMarketTokenDeposit: boolean, - dataList: string[], - ] & { - addresses: IGlvDepositUtils.CreateGlvDepositParamsAddressesStructOutput; - minGlvTokens: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - shouldUnwrapNativeToken: boolean; - isMarketTokenDeposit: boolean; - dataList: string[]; - }; -} - -export declare namespace IGlvWithdrawalUtils { - export type CreateGlvWithdrawalParamsAddressesStruct = { - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - glv: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type CreateGlvWithdrawalParamsAddressesStructOutput = [ - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - glv: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - glv: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type CreateGlvWithdrawalParamsStruct = { - addresses: IGlvWithdrawalUtils.CreateGlvWithdrawalParamsAddressesStruct; - minLongTokenAmount: BigNumberish; - minShortTokenAmount: BigNumberish; - shouldUnwrapNativeToken: boolean; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - dataList: BytesLike[]; - }; - - export type CreateGlvWithdrawalParamsStructOutput = [ - addresses: IGlvWithdrawalUtils.CreateGlvWithdrawalParamsAddressesStructOutput, - minLongTokenAmount: bigint, - minShortTokenAmount: bigint, - shouldUnwrapNativeToken: boolean, - executionFee: bigint, - callbackGasLimit: bigint, - dataList: string[], - ] & { - addresses: IGlvWithdrawalUtils.CreateGlvWithdrawalParamsAddressesStructOutput; - minLongTokenAmount: bigint; - minShortTokenAmount: bigint; - shouldUnwrapNativeToken: boolean; - executionFee: bigint; - callbackGasLimit: bigint; - dataList: string[]; - }; -} - -export interface MultichainGlvRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "createGlvDeposit" - | "createGlvWithdrawal" - | "dataStore" - | "digests" - | "eventEmitter" - | "externalHandler" - | "glvDepositHandler" - | "glvVault" - | "glvWithdrawalHandler" - | "multicall" - | "multichainVault" - | "oracle" - | "orderHandler" - | "orderVault" - | "roleStore" - | "router" - | "sendNativeToken" - | "sendTokens" - | "sendWnt" - | "swapHandler" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData( - functionFragment: "createGlvDeposit", - values: [ - IRelayUtils.RelayParamsStruct, - AddressLike, - BigNumberish, - IRelayUtils.TransferRequestsStruct, - IGlvDepositUtils.CreateGlvDepositParamsStruct, - ] - ): string; - encodeFunctionData( - functionFragment: "createGlvWithdrawal", - values: [ - IRelayUtils.RelayParamsStruct, - AddressLike, - BigNumberish, - IRelayUtils.TransferRequestsStruct, - IGlvWithdrawalUtils.CreateGlvWithdrawalParamsStruct, - ] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "digests", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData(functionFragment: "externalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "glvDepositHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "glvVault", values?: undefined): string; - encodeFunctionData(functionFragment: "glvWithdrawalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "multichainVault", values?: undefined): string; - encodeFunctionData(functionFragment: "oracle", values?: undefined): string; - encodeFunctionData(functionFragment: "orderHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "orderVault", values?: undefined): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendNativeToken", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendWnt", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "swapHandler", values?: undefined): string; - - decodeFunctionResult(functionFragment: "createGlvDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createGlvWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "digests", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "externalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "glvDepositHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "glvVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "glvWithdrawalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multichainVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendNativeToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendWnt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapHandler", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface MultichainGlvRouter extends BaseContract { - connect(runner?: ContractRunner | null): MultichainGlvRouter; - waitForDeployment(): Promise; - - interface: MultichainGlvRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - createGlvDeposit: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - transferRequests: IRelayUtils.TransferRequestsStruct, - params: IGlvDepositUtils.CreateGlvDepositParamsStruct, - ], - [string], - "nonpayable" - >; - - createGlvWithdrawal: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - transferRequests: IRelayUtils.TransferRequestsStruct, - params: IGlvWithdrawalUtils.CreateGlvWithdrawalParamsStruct, - ], - [string], - "nonpayable" - >; - - dataStore: TypedContractMethod<[], [string], "view">; - - digests: TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - externalHandler: TypedContractMethod<[], [string], "view">; - - glvDepositHandler: TypedContractMethod<[], [string], "view">; - - glvVault: TypedContractMethod<[], [string], "view">; - - glvWithdrawalHandler: TypedContractMethod<[], [string], "view">; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - - multichainVault: TypedContractMethod<[], [string], "view">; - - oracle: TypedContractMethod<[], [string], "view">; - - orderHandler: TypedContractMethod<[], [string], "view">; - - orderVault: TypedContractMethod<[], [string], "view">; - - roleStore: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendTokens: TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendWnt: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - swapHandler: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "createGlvDeposit" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - transferRequests: IRelayUtils.TransferRequestsStruct, - params: IGlvDepositUtils.CreateGlvDepositParamsStruct, - ], - [string], - "nonpayable" - >; - getFunction( - nameOrSignature: "createGlvWithdrawal" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - transferRequests: IRelayUtils.TransferRequestsStruct, - params: IGlvWithdrawalUtils.CreateGlvWithdrawalParamsStruct, - ], - [string], - "nonpayable" - >; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "digests"): TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "externalHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "glvDepositHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "glvVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "glvWithdrawalHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - getFunction(nameOrSignature: "multichainVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "oracle"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendWnt" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction(nameOrSignature: "swapHandler"): TypedContractMethod<[], [string], "view">; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/MultichainGmRouter.ts b/src/typechain-types/MultichainGmRouter.ts deleted file mode 100644 index 9aa7da5170..0000000000 --- a/src/typechain-types/MultichainGmRouter.ts +++ /dev/null @@ -1,673 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace MultichainRouter { - export type BaseConstructorParamsStruct = { - router: AddressLike; - roleStore: AddressLike; - dataStore: AddressLike; - eventEmitter: AddressLike; - oracle: AddressLike; - orderVault: AddressLike; - orderHandler: AddressLike; - swapHandler: AddressLike; - externalHandler: AddressLike; - multichainVault: AddressLike; - }; - - export type BaseConstructorParamsStructOutput = [ - router: string, - roleStore: string, - dataStore: string, - eventEmitter: string, - oracle: string, - orderVault: string, - orderHandler: string, - swapHandler: string, - externalHandler: string, - multichainVault: string, - ] & { - router: string; - roleStore: string; - dataStore: string; - eventEmitter: string; - oracle: string; - orderVault: string; - orderHandler: string; - swapHandler: string; - externalHandler: string; - multichainVault: string; - }; -} - -export declare namespace OracleUtils { - export type SetPricesParamsStruct = { - tokens: AddressLike[]; - providers: AddressLike[]; - data: BytesLike[]; - }; - - export type SetPricesParamsStructOutput = [tokens: string[], providers: string[], data: string[]] & { - tokens: string[]; - providers: string[]; - data: string[]; - }; -} - -export declare namespace IRelayUtils { - export type ExternalCallsStruct = { - sendTokens: AddressLike[]; - sendAmounts: BigNumberish[]; - externalCallTargets: AddressLike[]; - externalCallDataList: BytesLike[]; - refundTokens: AddressLike[]; - refundReceivers: AddressLike[]; - }; - - export type ExternalCallsStructOutput = [ - sendTokens: string[], - sendAmounts: bigint[], - externalCallTargets: string[], - externalCallDataList: string[], - refundTokens: string[], - refundReceivers: string[], - ] & { - sendTokens: string[]; - sendAmounts: bigint[]; - externalCallTargets: string[]; - externalCallDataList: string[]; - refundTokens: string[]; - refundReceivers: string[]; - }; - - export type TokenPermitStruct = { - owner: AddressLike; - spender: AddressLike; - value: BigNumberish; - deadline: BigNumberish; - v: BigNumberish; - r: BytesLike; - s: BytesLike; - token: AddressLike; - }; - - export type TokenPermitStructOutput = [ - owner: string, - spender: string, - value: bigint, - deadline: bigint, - v: bigint, - r: string, - s: string, - token: string, - ] & { - owner: string; - spender: string; - value: bigint; - deadline: bigint; - v: bigint; - r: string; - s: string; - token: string; - }; - - export type FeeParamsStruct = { - feeToken: AddressLike; - feeAmount: BigNumberish; - feeSwapPath: AddressLike[]; - }; - - export type FeeParamsStructOutput = [feeToken: string, feeAmount: bigint, feeSwapPath: string[]] & { - feeToken: string; - feeAmount: bigint; - feeSwapPath: string[]; - }; - - export type RelayParamsStruct = { - oracleParams: OracleUtils.SetPricesParamsStruct; - externalCalls: IRelayUtils.ExternalCallsStruct; - tokenPermits: IRelayUtils.TokenPermitStruct[]; - fee: IRelayUtils.FeeParamsStruct; - userNonce: BigNumberish; - deadline: BigNumberish; - signature: BytesLike; - desChainId: BigNumberish; - }; - - export type RelayParamsStructOutput = [ - oracleParams: OracleUtils.SetPricesParamsStructOutput, - externalCalls: IRelayUtils.ExternalCallsStructOutput, - tokenPermits: IRelayUtils.TokenPermitStructOutput[], - fee: IRelayUtils.FeeParamsStructOutput, - userNonce: bigint, - deadline: bigint, - signature: string, - desChainId: bigint, - ] & { - oracleParams: OracleUtils.SetPricesParamsStructOutput; - externalCalls: IRelayUtils.ExternalCallsStructOutput; - tokenPermits: IRelayUtils.TokenPermitStructOutput[]; - fee: IRelayUtils.FeeParamsStructOutput; - userNonce: bigint; - deadline: bigint; - signature: string; - desChainId: bigint; - }; - - export type TransferRequestsStruct = { - tokens: AddressLike[]; - receivers: AddressLike[]; - amounts: BigNumberish[]; - }; - - export type TransferRequestsStructOutput = [tokens: string[], receivers: string[], amounts: bigint[]] & { - tokens: string[]; - receivers: string[]; - amounts: bigint[]; - }; -} - -export declare namespace IDepositUtils { - export type CreateDepositParamsAddressesStruct = { - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - initialLongToken: AddressLike; - initialShortToken: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type CreateDepositParamsAddressesStructOutput = [ - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - initialLongToken: string, - initialShortToken: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - initialLongToken: string; - initialShortToken: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type CreateDepositParamsStruct = { - addresses: IDepositUtils.CreateDepositParamsAddressesStruct; - minMarketTokens: BigNumberish; - shouldUnwrapNativeToken: boolean; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - dataList: BytesLike[]; - }; - - export type CreateDepositParamsStructOutput = [ - addresses: IDepositUtils.CreateDepositParamsAddressesStructOutput, - minMarketTokens: bigint, - shouldUnwrapNativeToken: boolean, - executionFee: bigint, - callbackGasLimit: bigint, - dataList: string[], - ] & { - addresses: IDepositUtils.CreateDepositParamsAddressesStructOutput; - minMarketTokens: bigint; - shouldUnwrapNativeToken: boolean; - executionFee: bigint; - callbackGasLimit: bigint; - dataList: string[]; - }; -} - -export declare namespace IShiftUtils { - export type CreateShiftParamsAddressesStruct = { - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - fromMarket: AddressLike; - toMarket: AddressLike; - }; - - export type CreateShiftParamsAddressesStructOutput = [ - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - fromMarket: string, - toMarket: string, - ] & { - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - fromMarket: string; - toMarket: string; - }; - - export type CreateShiftParamsStruct = { - addresses: IShiftUtils.CreateShiftParamsAddressesStruct; - minMarketTokens: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - dataList: BytesLike[]; - }; - - export type CreateShiftParamsStructOutput = [ - addresses: IShiftUtils.CreateShiftParamsAddressesStructOutput, - minMarketTokens: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - dataList: string[], - ] & { - addresses: IShiftUtils.CreateShiftParamsAddressesStructOutput; - minMarketTokens: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - dataList: string[]; - }; -} - -export declare namespace IWithdrawalUtils { - export type CreateWithdrawalParamsAddressesStruct = { - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type CreateWithdrawalParamsAddressesStructOutput = [ - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type CreateWithdrawalParamsStruct = { - addresses: IWithdrawalUtils.CreateWithdrawalParamsAddressesStruct; - minLongTokenAmount: BigNumberish; - minShortTokenAmount: BigNumberish; - shouldUnwrapNativeToken: boolean; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - dataList: BytesLike[]; - }; - - export type CreateWithdrawalParamsStructOutput = [ - addresses: IWithdrawalUtils.CreateWithdrawalParamsAddressesStructOutput, - minLongTokenAmount: bigint, - minShortTokenAmount: bigint, - shouldUnwrapNativeToken: boolean, - executionFee: bigint, - callbackGasLimit: bigint, - dataList: string[], - ] & { - addresses: IWithdrawalUtils.CreateWithdrawalParamsAddressesStructOutput; - minLongTokenAmount: bigint; - minShortTokenAmount: bigint; - shouldUnwrapNativeToken: boolean; - executionFee: bigint; - callbackGasLimit: bigint; - dataList: string[]; - }; -} - -export interface MultichainGmRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "createDeposit" - | "createShift" - | "createWithdrawal" - | "dataStore" - | "depositHandler" - | "depositVault" - | "digests" - | "eventEmitter" - | "externalHandler" - | "multicall" - | "multichainVault" - | "oracle" - | "orderHandler" - | "orderVault" - | "roleStore" - | "router" - | "sendNativeToken" - | "sendTokens" - | "sendWnt" - | "shiftHandler" - | "shiftVault" - | "swapHandler" - | "withdrawalHandler" - | "withdrawalVault" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData( - functionFragment: "createDeposit", - values: [ - IRelayUtils.RelayParamsStruct, - AddressLike, - BigNumberish, - IRelayUtils.TransferRequestsStruct, - IDepositUtils.CreateDepositParamsStruct, - ] - ): string; - encodeFunctionData( - functionFragment: "createShift", - values: [ - IRelayUtils.RelayParamsStruct, - AddressLike, - BigNumberish, - IRelayUtils.TransferRequestsStruct, - IShiftUtils.CreateShiftParamsStruct, - ] - ): string; - encodeFunctionData( - functionFragment: "createWithdrawal", - values: [ - IRelayUtils.RelayParamsStruct, - AddressLike, - BigNumberish, - IRelayUtils.TransferRequestsStruct, - IWithdrawalUtils.CreateWithdrawalParamsStruct, - ] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "depositHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "depositVault", values?: undefined): string; - encodeFunctionData(functionFragment: "digests", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData(functionFragment: "externalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "multichainVault", values?: undefined): string; - encodeFunctionData(functionFragment: "oracle", values?: undefined): string; - encodeFunctionData(functionFragment: "orderHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "orderVault", values?: undefined): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendNativeToken", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendWnt", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "shiftHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "shiftVault", values?: undefined): string; - encodeFunctionData(functionFragment: "swapHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "withdrawalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "withdrawalVault", values?: undefined): string; - - decodeFunctionResult(functionFragment: "createDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createShift", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "depositHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "depositVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "digests", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "externalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multichainVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendNativeToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendWnt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "shiftHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "shiftVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawalVault", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface MultichainGmRouter extends BaseContract { - connect(runner?: ContractRunner | null): MultichainGmRouter; - waitForDeployment(): Promise; - - interface: MultichainGmRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - createDeposit: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - transferRequests: IRelayUtils.TransferRequestsStruct, - params: IDepositUtils.CreateDepositParamsStruct, - ], - [string], - "nonpayable" - >; - - createShift: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - transferRequests: IRelayUtils.TransferRequestsStruct, - params: IShiftUtils.CreateShiftParamsStruct, - ], - [string], - "nonpayable" - >; - - createWithdrawal: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - transferRequests: IRelayUtils.TransferRequestsStruct, - params: IWithdrawalUtils.CreateWithdrawalParamsStruct, - ], - [string], - "nonpayable" - >; - - dataStore: TypedContractMethod<[], [string], "view">; - - depositHandler: TypedContractMethod<[], [string], "view">; - - depositVault: TypedContractMethod<[], [string], "view">; - - digests: TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - externalHandler: TypedContractMethod<[], [string], "view">; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - - multichainVault: TypedContractMethod<[], [string], "view">; - - oracle: TypedContractMethod<[], [string], "view">; - - orderHandler: TypedContractMethod<[], [string], "view">; - - orderVault: TypedContractMethod<[], [string], "view">; - - roleStore: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendTokens: TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendWnt: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - shiftHandler: TypedContractMethod<[], [string], "view">; - - shiftVault: TypedContractMethod<[], [string], "view">; - - swapHandler: TypedContractMethod<[], [string], "view">; - - withdrawalHandler: TypedContractMethod<[], [string], "view">; - - withdrawalVault: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "createDeposit" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - transferRequests: IRelayUtils.TransferRequestsStruct, - params: IDepositUtils.CreateDepositParamsStruct, - ], - [string], - "nonpayable" - >; - getFunction( - nameOrSignature: "createShift" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - transferRequests: IRelayUtils.TransferRequestsStruct, - params: IShiftUtils.CreateShiftParamsStruct, - ], - [string], - "nonpayable" - >; - getFunction( - nameOrSignature: "createWithdrawal" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - transferRequests: IRelayUtils.TransferRequestsStruct, - params: IWithdrawalUtils.CreateWithdrawalParamsStruct, - ], - [string], - "nonpayable" - >; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "depositHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "depositVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "digests"): TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "externalHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - getFunction(nameOrSignature: "multichainVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "oracle"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendWnt" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction(nameOrSignature: "shiftHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "shiftVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "swapHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "withdrawalHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "withdrawalVault"): TypedContractMethod<[], [string], "view">; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/MultichainOrderRouter.ts b/src/typechain-types/MultichainOrderRouter.ts deleted file mode 100644 index e32bc6cd0e..0000000000 --- a/src/typechain-types/MultichainOrderRouter.ts +++ /dev/null @@ -1,638 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace MultichainRouter { - export type BaseConstructorParamsStruct = { - router: AddressLike; - roleStore: AddressLike; - dataStore: AddressLike; - eventEmitter: AddressLike; - oracle: AddressLike; - orderVault: AddressLike; - orderHandler: AddressLike; - swapHandler: AddressLike; - externalHandler: AddressLike; - multichainVault: AddressLike; - }; - - export type BaseConstructorParamsStructOutput = [ - router: string, - roleStore: string, - dataStore: string, - eventEmitter: string, - oracle: string, - orderVault: string, - orderHandler: string, - swapHandler: string, - externalHandler: string, - multichainVault: string, - ] & { - router: string; - roleStore: string; - dataStore: string; - eventEmitter: string; - oracle: string; - orderVault: string; - orderHandler: string; - swapHandler: string; - externalHandler: string; - multichainVault: string; - }; -} - -export declare namespace OracleUtils { - export type SetPricesParamsStruct = { - tokens: AddressLike[]; - providers: AddressLike[]; - data: BytesLike[]; - }; - - export type SetPricesParamsStructOutput = [tokens: string[], providers: string[], data: string[]] & { - tokens: string[]; - providers: string[]; - data: string[]; - }; -} - -export declare namespace IRelayUtils { - export type ExternalCallsStruct = { - sendTokens: AddressLike[]; - sendAmounts: BigNumberish[]; - externalCallTargets: AddressLike[]; - externalCallDataList: BytesLike[]; - refundTokens: AddressLike[]; - refundReceivers: AddressLike[]; - }; - - export type ExternalCallsStructOutput = [ - sendTokens: string[], - sendAmounts: bigint[], - externalCallTargets: string[], - externalCallDataList: string[], - refundTokens: string[], - refundReceivers: string[], - ] & { - sendTokens: string[]; - sendAmounts: bigint[]; - externalCallTargets: string[]; - externalCallDataList: string[]; - refundTokens: string[]; - refundReceivers: string[]; - }; - - export type TokenPermitStruct = { - owner: AddressLike; - spender: AddressLike; - value: BigNumberish; - deadline: BigNumberish; - v: BigNumberish; - r: BytesLike; - s: BytesLike; - token: AddressLike; - }; - - export type TokenPermitStructOutput = [ - owner: string, - spender: string, - value: bigint, - deadline: bigint, - v: bigint, - r: string, - s: string, - token: string, - ] & { - owner: string; - spender: string; - value: bigint; - deadline: bigint; - v: bigint; - r: string; - s: string; - token: string; - }; - - export type FeeParamsStruct = { - feeToken: AddressLike; - feeAmount: BigNumberish; - feeSwapPath: AddressLike[]; - }; - - export type FeeParamsStructOutput = [feeToken: string, feeAmount: bigint, feeSwapPath: string[]] & { - feeToken: string; - feeAmount: bigint; - feeSwapPath: string[]; - }; - - export type RelayParamsStruct = { - oracleParams: OracleUtils.SetPricesParamsStruct; - externalCalls: IRelayUtils.ExternalCallsStruct; - tokenPermits: IRelayUtils.TokenPermitStruct[]; - fee: IRelayUtils.FeeParamsStruct; - userNonce: BigNumberish; - deadline: BigNumberish; - signature: BytesLike; - desChainId: BigNumberish; - }; - - export type RelayParamsStructOutput = [ - oracleParams: OracleUtils.SetPricesParamsStructOutput, - externalCalls: IRelayUtils.ExternalCallsStructOutput, - tokenPermits: IRelayUtils.TokenPermitStructOutput[], - fee: IRelayUtils.FeeParamsStructOutput, - userNonce: bigint, - deadline: bigint, - signature: string, - desChainId: bigint, - ] & { - oracleParams: OracleUtils.SetPricesParamsStructOutput; - externalCalls: IRelayUtils.ExternalCallsStructOutput; - tokenPermits: IRelayUtils.TokenPermitStructOutput[]; - fee: IRelayUtils.FeeParamsStructOutput; - userNonce: bigint; - deadline: bigint; - signature: string; - desChainId: bigint; - }; - - export type UpdateOrderParamsStruct = { - key: BytesLike; - sizeDeltaUsd: BigNumberish; - acceptablePrice: BigNumberish; - triggerPrice: BigNumberish; - minOutputAmount: BigNumberish; - validFromTime: BigNumberish; - autoCancel: boolean; - executionFeeIncrease: BigNumberish; - }; - - export type UpdateOrderParamsStructOutput = [ - key: string, - sizeDeltaUsd: bigint, - acceptablePrice: bigint, - triggerPrice: bigint, - minOutputAmount: bigint, - validFromTime: bigint, - autoCancel: boolean, - executionFeeIncrease: bigint, - ] & { - key: string; - sizeDeltaUsd: bigint; - acceptablePrice: bigint; - triggerPrice: bigint; - minOutputAmount: bigint; - validFromTime: bigint; - autoCancel: boolean; - executionFeeIncrease: bigint; - }; - - export type BatchParamsStruct = { - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStruct[]; - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStruct[]; - cancelOrderKeys: BytesLike[]; - }; - - export type BatchParamsStructOutput = [ - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStructOutput[], - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStructOutput[], - cancelOrderKeys: string[], - ] & { - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStructOutput[]; - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStructOutput[]; - cancelOrderKeys: string[]; - }; -} - -export declare namespace IBaseOrderUtils { - export type CreateOrderParamsAddressesStruct = { - receiver: AddressLike; - cancellationReceiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - initialCollateralToken: AddressLike; - swapPath: AddressLike[]; - }; - - export type CreateOrderParamsAddressesStructOutput = [ - receiver: string, - cancellationReceiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - initialCollateralToken: string, - swapPath: string[], - ] & { - receiver: string; - cancellationReceiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - initialCollateralToken: string; - swapPath: string[]; - }; - - export type CreateOrderParamsNumbersStruct = { - sizeDeltaUsd: BigNumberish; - initialCollateralDeltaAmount: BigNumberish; - triggerPrice: BigNumberish; - acceptablePrice: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - minOutputAmount: BigNumberish; - validFromTime: BigNumberish; - }; - - export type CreateOrderParamsNumbersStructOutput = [ - sizeDeltaUsd: bigint, - initialCollateralDeltaAmount: bigint, - triggerPrice: bigint, - acceptablePrice: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - minOutputAmount: bigint, - validFromTime: bigint, - ] & { - sizeDeltaUsd: bigint; - initialCollateralDeltaAmount: bigint; - triggerPrice: bigint; - acceptablePrice: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - minOutputAmount: bigint; - validFromTime: bigint; - }; - - export type CreateOrderParamsStruct = { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStruct; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStruct; - orderType: BigNumberish; - decreasePositionSwapType: BigNumberish; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: BytesLike; - dataList: BytesLike[]; - }; - - export type CreateOrderParamsStructOutput = [ - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput, - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput, - orderType: bigint, - decreasePositionSwapType: bigint, - isLong: boolean, - shouldUnwrapNativeToken: boolean, - autoCancel: boolean, - referralCode: string, - dataList: string[], - ] & { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput; - orderType: bigint; - decreasePositionSwapType: bigint; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: string; - dataList: string[]; - }; -} - -export interface MultichainOrderRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "batch" - | "cancelOrder" - | "createOrder" - | "dataStore" - | "digests" - | "eventEmitter" - | "externalHandler" - | "multicall" - | "multichainVault" - | "oracle" - | "orderHandler" - | "orderVault" - | "referralStorage" - | "roleStore" - | "router" - | "sendNativeToken" - | "sendTokens" - | "sendWnt" - | "setTraderReferralCode" - | "swapHandler" - | "updateOrder" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData( - functionFragment: "batch", - values: [IRelayUtils.RelayParamsStruct, AddressLike, BigNumberish, IRelayUtils.BatchParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "cancelOrder", - values: [IRelayUtils.RelayParamsStruct, AddressLike, BigNumberish, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "createOrder", - values: [IRelayUtils.RelayParamsStruct, AddressLike, BigNumberish, IBaseOrderUtils.CreateOrderParamsStruct] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "digests", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData(functionFragment: "externalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "multichainVault", values?: undefined): string; - encodeFunctionData(functionFragment: "oracle", values?: undefined): string; - encodeFunctionData(functionFragment: "orderHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "orderVault", values?: undefined): string; - encodeFunctionData(functionFragment: "referralStorage", values?: undefined): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendNativeToken", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendWnt", values: [AddressLike, BigNumberish]): string; - encodeFunctionData( - functionFragment: "setTraderReferralCode", - values: [IRelayUtils.RelayParamsStruct, AddressLike, BigNumberish, BytesLike] - ): string; - encodeFunctionData(functionFragment: "swapHandler", values?: undefined): string; - encodeFunctionData( - functionFragment: "updateOrder", - values: [IRelayUtils.RelayParamsStruct, AddressLike, BigNumberish, IRelayUtils.UpdateOrderParamsStruct] - ): string; - - decodeFunctionResult(functionFragment: "batch", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "digests", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "externalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multichainVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "referralStorage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendNativeToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendWnt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTraderReferralCode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateOrder", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface MultichainOrderRouter extends BaseContract { - connect(runner?: ContractRunner | null): MultichainOrderRouter; - waitForDeployment(): Promise; - - interface: MultichainOrderRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - batch: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - params: IRelayUtils.BatchParamsStruct, - ], - [string[]], - "nonpayable" - >; - - cancelOrder: TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, srcChainId: BigNumberish, key: BytesLike], - [void], - "nonpayable" - >; - - createOrder: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - params: IBaseOrderUtils.CreateOrderParamsStruct, - ], - [string], - "nonpayable" - >; - - dataStore: TypedContractMethod<[], [string], "view">; - - digests: TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - externalHandler: TypedContractMethod<[], [string], "view">; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - - multichainVault: TypedContractMethod<[], [string], "view">; - - oracle: TypedContractMethod<[], [string], "view">; - - orderHandler: TypedContractMethod<[], [string], "view">; - - orderVault: TypedContractMethod<[], [string], "view">; - - referralStorage: TypedContractMethod<[], [string], "view">; - - roleStore: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendTokens: TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendWnt: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - setTraderReferralCode: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - referralCode: BytesLike, - ], - [void], - "nonpayable" - >; - - swapHandler: TypedContractMethod<[], [string], "view">; - - updateOrder: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - params: IRelayUtils.UpdateOrderParamsStruct, - ], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "batch" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - params: IRelayUtils.BatchParamsStruct, - ], - [string[]], - "nonpayable" - >; - getFunction( - nameOrSignature: "cancelOrder" - ): TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, srcChainId: BigNumberish, key: BytesLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "createOrder" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - params: IBaseOrderUtils.CreateOrderParamsStruct, - ], - [string], - "nonpayable" - >; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "digests"): TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "externalHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - getFunction(nameOrSignature: "multichainVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "oracle"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "referralStorage"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendWnt" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "setTraderReferralCode" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - referralCode: BytesLike, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "swapHandler"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "updateOrder" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - params: IRelayUtils.UpdateOrderParamsStruct, - ], - [void], - "nonpayable" - >; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/MultichainSubaccountRouter.ts b/src/typechain-types/MultichainSubaccountRouter.ts deleted file mode 100644 index edbc3738e7..0000000000 --- a/src/typechain-types/MultichainSubaccountRouter.ts +++ /dev/null @@ -1,722 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export type SubaccountApprovalStruct = { - subaccount: AddressLike; - shouldAdd: boolean; - expiresAt: BigNumberish; - maxAllowedCount: BigNumberish; - actionType: BytesLike; - nonce: BigNumberish; - desChainId: BigNumberish; - deadline: BigNumberish; - integrationId: BytesLike; - signature: BytesLike; -}; - -export type SubaccountApprovalStructOutput = [ - subaccount: string, - shouldAdd: boolean, - expiresAt: bigint, - maxAllowedCount: bigint, - actionType: string, - nonce: bigint, - desChainId: bigint, - deadline: bigint, - integrationId: string, - signature: string, -] & { - subaccount: string; - shouldAdd: boolean; - expiresAt: bigint; - maxAllowedCount: bigint; - actionType: string; - nonce: bigint; - desChainId: bigint; - deadline: bigint; - integrationId: string; - signature: string; -}; - -export declare namespace MultichainRouter { - export type BaseConstructorParamsStruct = { - router: AddressLike; - roleStore: AddressLike; - dataStore: AddressLike; - eventEmitter: AddressLike; - oracle: AddressLike; - orderVault: AddressLike; - orderHandler: AddressLike; - swapHandler: AddressLike; - externalHandler: AddressLike; - multichainVault: AddressLike; - }; - - export type BaseConstructorParamsStructOutput = [ - router: string, - roleStore: string, - dataStore: string, - eventEmitter: string, - oracle: string, - orderVault: string, - orderHandler: string, - swapHandler: string, - externalHandler: string, - multichainVault: string, - ] & { - router: string; - roleStore: string; - dataStore: string; - eventEmitter: string; - oracle: string; - orderVault: string; - orderHandler: string; - swapHandler: string; - externalHandler: string; - multichainVault: string; - }; -} - -export declare namespace OracleUtils { - export type SetPricesParamsStruct = { - tokens: AddressLike[]; - providers: AddressLike[]; - data: BytesLike[]; - }; - - export type SetPricesParamsStructOutput = [tokens: string[], providers: string[], data: string[]] & { - tokens: string[]; - providers: string[]; - data: string[]; - }; -} - -export declare namespace IRelayUtils { - export type ExternalCallsStruct = { - sendTokens: AddressLike[]; - sendAmounts: BigNumberish[]; - externalCallTargets: AddressLike[]; - externalCallDataList: BytesLike[]; - refundTokens: AddressLike[]; - refundReceivers: AddressLike[]; - }; - - export type ExternalCallsStructOutput = [ - sendTokens: string[], - sendAmounts: bigint[], - externalCallTargets: string[], - externalCallDataList: string[], - refundTokens: string[], - refundReceivers: string[], - ] & { - sendTokens: string[]; - sendAmounts: bigint[]; - externalCallTargets: string[]; - externalCallDataList: string[]; - refundTokens: string[]; - refundReceivers: string[]; - }; - - export type TokenPermitStruct = { - owner: AddressLike; - spender: AddressLike; - value: BigNumberish; - deadline: BigNumberish; - v: BigNumberish; - r: BytesLike; - s: BytesLike; - token: AddressLike; - }; - - export type TokenPermitStructOutput = [ - owner: string, - spender: string, - value: bigint, - deadline: bigint, - v: bigint, - r: string, - s: string, - token: string, - ] & { - owner: string; - spender: string; - value: bigint; - deadline: bigint; - v: bigint; - r: string; - s: string; - token: string; - }; - - export type FeeParamsStruct = { - feeToken: AddressLike; - feeAmount: BigNumberish; - feeSwapPath: AddressLike[]; - }; - - export type FeeParamsStructOutput = [feeToken: string, feeAmount: bigint, feeSwapPath: string[]] & { - feeToken: string; - feeAmount: bigint; - feeSwapPath: string[]; - }; - - export type RelayParamsStruct = { - oracleParams: OracleUtils.SetPricesParamsStruct; - externalCalls: IRelayUtils.ExternalCallsStruct; - tokenPermits: IRelayUtils.TokenPermitStruct[]; - fee: IRelayUtils.FeeParamsStruct; - userNonce: BigNumberish; - deadline: BigNumberish; - signature: BytesLike; - desChainId: BigNumberish; - }; - - export type RelayParamsStructOutput = [ - oracleParams: OracleUtils.SetPricesParamsStructOutput, - externalCalls: IRelayUtils.ExternalCallsStructOutput, - tokenPermits: IRelayUtils.TokenPermitStructOutput[], - fee: IRelayUtils.FeeParamsStructOutput, - userNonce: bigint, - deadline: bigint, - signature: string, - desChainId: bigint, - ] & { - oracleParams: OracleUtils.SetPricesParamsStructOutput; - externalCalls: IRelayUtils.ExternalCallsStructOutput; - tokenPermits: IRelayUtils.TokenPermitStructOutput[]; - fee: IRelayUtils.FeeParamsStructOutput; - userNonce: bigint; - deadline: bigint; - signature: string; - desChainId: bigint; - }; - - export type UpdateOrderParamsStruct = { - key: BytesLike; - sizeDeltaUsd: BigNumberish; - acceptablePrice: BigNumberish; - triggerPrice: BigNumberish; - minOutputAmount: BigNumberish; - validFromTime: BigNumberish; - autoCancel: boolean; - executionFeeIncrease: BigNumberish; - }; - - export type UpdateOrderParamsStructOutput = [ - key: string, - sizeDeltaUsd: bigint, - acceptablePrice: bigint, - triggerPrice: bigint, - minOutputAmount: bigint, - validFromTime: bigint, - autoCancel: boolean, - executionFeeIncrease: bigint, - ] & { - key: string; - sizeDeltaUsd: bigint; - acceptablePrice: bigint; - triggerPrice: bigint; - minOutputAmount: bigint; - validFromTime: bigint; - autoCancel: boolean; - executionFeeIncrease: bigint; - }; - - export type BatchParamsStruct = { - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStruct[]; - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStruct[]; - cancelOrderKeys: BytesLike[]; - }; - - export type BatchParamsStructOutput = [ - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStructOutput[], - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStructOutput[], - cancelOrderKeys: string[], - ] & { - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStructOutput[]; - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStructOutput[]; - cancelOrderKeys: string[]; - }; -} - -export declare namespace IBaseOrderUtils { - export type CreateOrderParamsAddressesStruct = { - receiver: AddressLike; - cancellationReceiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - initialCollateralToken: AddressLike; - swapPath: AddressLike[]; - }; - - export type CreateOrderParamsAddressesStructOutput = [ - receiver: string, - cancellationReceiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - initialCollateralToken: string, - swapPath: string[], - ] & { - receiver: string; - cancellationReceiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - initialCollateralToken: string; - swapPath: string[]; - }; - - export type CreateOrderParamsNumbersStruct = { - sizeDeltaUsd: BigNumberish; - initialCollateralDeltaAmount: BigNumberish; - triggerPrice: BigNumberish; - acceptablePrice: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - minOutputAmount: BigNumberish; - validFromTime: BigNumberish; - }; - - export type CreateOrderParamsNumbersStructOutput = [ - sizeDeltaUsd: bigint, - initialCollateralDeltaAmount: bigint, - triggerPrice: bigint, - acceptablePrice: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - minOutputAmount: bigint, - validFromTime: bigint, - ] & { - sizeDeltaUsd: bigint; - initialCollateralDeltaAmount: bigint; - triggerPrice: bigint; - acceptablePrice: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - minOutputAmount: bigint; - validFromTime: bigint; - }; - - export type CreateOrderParamsStruct = { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStruct; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStruct; - orderType: BigNumberish; - decreasePositionSwapType: BigNumberish; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: BytesLike; - dataList: BytesLike[]; - }; - - export type CreateOrderParamsStructOutput = [ - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput, - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput, - orderType: bigint, - decreasePositionSwapType: bigint, - isLong: boolean, - shouldUnwrapNativeToken: boolean, - autoCancel: boolean, - referralCode: string, - dataList: string[], - ] & { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput; - orderType: bigint; - decreasePositionSwapType: bigint; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: string; - dataList: string[]; - }; -} - -export interface MultichainSubaccountRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "batch" - | "cancelOrder" - | "createOrder" - | "dataStore" - | "digests" - | "eventEmitter" - | "externalHandler" - | "multicall" - | "multichainVault" - | "oracle" - | "orderHandler" - | "orderVault" - | "removeSubaccount" - | "roleStore" - | "router" - | "sendNativeToken" - | "sendTokens" - | "sendWnt" - | "subaccountApprovalNonces" - | "swapHandler" - | "updateOrder" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData( - functionFragment: "batch", - values: [ - IRelayUtils.RelayParamsStruct, - SubaccountApprovalStruct, - AddressLike, - BigNumberish, - AddressLike, - IRelayUtils.BatchParamsStruct, - ] - ): string; - encodeFunctionData( - functionFragment: "cancelOrder", - values: [IRelayUtils.RelayParamsStruct, SubaccountApprovalStruct, AddressLike, BigNumberish, AddressLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "createOrder", - values: [ - IRelayUtils.RelayParamsStruct, - SubaccountApprovalStruct, - AddressLike, - BigNumberish, - AddressLike, - IBaseOrderUtils.CreateOrderParamsStruct, - ] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "digests", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData(functionFragment: "externalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "multichainVault", values?: undefined): string; - encodeFunctionData(functionFragment: "oracle", values?: undefined): string; - encodeFunctionData(functionFragment: "orderHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "orderVault", values?: undefined): string; - encodeFunctionData( - functionFragment: "removeSubaccount", - values: [IRelayUtils.RelayParamsStruct, AddressLike, BigNumberish, AddressLike] - ): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendNativeToken", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendWnt", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "subaccountApprovalNonces", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "swapHandler", values?: undefined): string; - encodeFunctionData( - functionFragment: "updateOrder", - values: [ - IRelayUtils.RelayParamsStruct, - SubaccountApprovalStruct, - AddressLike, - BigNumberish, - AddressLike, - IRelayUtils.UpdateOrderParamsStruct, - ] - ): string; - - decodeFunctionResult(functionFragment: "batch", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "digests", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "externalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multichainVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeSubaccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendNativeToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendWnt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "subaccountApprovalNonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateOrder", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface MultichainSubaccountRouter extends BaseContract { - connect(runner?: ContractRunner | null): MultichainSubaccountRouter; - waitForDeployment(): Promise; - - interface: MultichainSubaccountRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - batch: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - srcChainId: BigNumberish, - subaccount: AddressLike, - params: IRelayUtils.BatchParamsStruct, - ], - [string[]], - "nonpayable" - >; - - cancelOrder: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - srcChainId: BigNumberish, - subaccount: AddressLike, - key: BytesLike, - ], - [void], - "nonpayable" - >; - - createOrder: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - srcChainId: BigNumberish, - subaccount: AddressLike, - params: IBaseOrderUtils.CreateOrderParamsStruct, - ], - [string], - "nonpayable" - >; - - dataStore: TypedContractMethod<[], [string], "view">; - - digests: TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - externalHandler: TypedContractMethod<[], [string], "view">; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - - multichainVault: TypedContractMethod<[], [string], "view">; - - oracle: TypedContractMethod<[], [string], "view">; - - orderHandler: TypedContractMethod<[], [string], "view">; - - orderVault: TypedContractMethod<[], [string], "view">; - - removeSubaccount: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - subaccount: AddressLike, - ], - [void], - "nonpayable" - >; - - roleStore: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendTokens: TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendWnt: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - subaccountApprovalNonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - swapHandler: TypedContractMethod<[], [string], "view">; - - updateOrder: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - srcChainId: BigNumberish, - subaccount: AddressLike, - params: IRelayUtils.UpdateOrderParamsStruct, - ], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "batch" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - srcChainId: BigNumberish, - subaccount: AddressLike, - params: IRelayUtils.BatchParamsStruct, - ], - [string[]], - "nonpayable" - >; - getFunction( - nameOrSignature: "cancelOrder" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - srcChainId: BigNumberish, - subaccount: AddressLike, - key: BytesLike, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "createOrder" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - srcChainId: BigNumberish, - subaccount: AddressLike, - params: IBaseOrderUtils.CreateOrderParamsStruct, - ], - [string], - "nonpayable" - >; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "digests"): TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "externalHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - getFunction(nameOrSignature: "multichainVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "oracle"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderVault"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "removeSubaccount" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - subaccount: AddressLike, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendWnt" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction(nameOrSignature: "subaccountApprovalNonces"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "swapHandler"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "updateOrder" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - srcChainId: BigNumberish, - subaccount: AddressLike, - params: IRelayUtils.UpdateOrderParamsStruct, - ], - [void], - "nonpayable" - >; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/MultichainTransferRouter.ts b/src/typechain-types/MultichainTransferRouter.ts deleted file mode 100644 index b5f30a817d..0000000000 --- a/src/typechain-types/MultichainTransferRouter.ts +++ /dev/null @@ -1,493 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace MultichainRouter { - export type BaseConstructorParamsStruct = { - router: AddressLike; - roleStore: AddressLike; - dataStore: AddressLike; - eventEmitter: AddressLike; - oracle: AddressLike; - orderVault: AddressLike; - orderHandler: AddressLike; - swapHandler: AddressLike; - externalHandler: AddressLike; - multichainVault: AddressLike; - }; - - export type BaseConstructorParamsStructOutput = [ - router: string, - roleStore: string, - dataStore: string, - eventEmitter: string, - oracle: string, - orderVault: string, - orderHandler: string, - swapHandler: string, - externalHandler: string, - multichainVault: string, - ] & { - router: string; - roleStore: string; - dataStore: string; - eventEmitter: string; - oracle: string; - orderVault: string; - orderHandler: string; - swapHandler: string; - externalHandler: string; - multichainVault: string; - }; -} - -export declare namespace OracleUtils { - export type SetPricesParamsStruct = { - tokens: AddressLike[]; - providers: AddressLike[]; - data: BytesLike[]; - }; - - export type SetPricesParamsStructOutput = [tokens: string[], providers: string[], data: string[]] & { - tokens: string[]; - providers: string[]; - data: string[]; - }; -} - -export declare namespace IRelayUtils { - export type ExternalCallsStruct = { - sendTokens: AddressLike[]; - sendAmounts: BigNumberish[]; - externalCallTargets: AddressLike[]; - externalCallDataList: BytesLike[]; - refundTokens: AddressLike[]; - refundReceivers: AddressLike[]; - }; - - export type ExternalCallsStructOutput = [ - sendTokens: string[], - sendAmounts: bigint[], - externalCallTargets: string[], - externalCallDataList: string[], - refundTokens: string[], - refundReceivers: string[], - ] & { - sendTokens: string[]; - sendAmounts: bigint[]; - externalCallTargets: string[]; - externalCallDataList: string[]; - refundTokens: string[]; - refundReceivers: string[]; - }; - - export type TokenPermitStruct = { - owner: AddressLike; - spender: AddressLike; - value: BigNumberish; - deadline: BigNumberish; - v: BigNumberish; - r: BytesLike; - s: BytesLike; - token: AddressLike; - }; - - export type TokenPermitStructOutput = [ - owner: string, - spender: string, - value: bigint, - deadline: bigint, - v: bigint, - r: string, - s: string, - token: string, - ] & { - owner: string; - spender: string; - value: bigint; - deadline: bigint; - v: bigint; - r: string; - s: string; - token: string; - }; - - export type FeeParamsStruct = { - feeToken: AddressLike; - feeAmount: BigNumberish; - feeSwapPath: AddressLike[]; - }; - - export type FeeParamsStructOutput = [feeToken: string, feeAmount: bigint, feeSwapPath: string[]] & { - feeToken: string; - feeAmount: bigint; - feeSwapPath: string[]; - }; - - export type RelayParamsStruct = { - oracleParams: OracleUtils.SetPricesParamsStruct; - externalCalls: IRelayUtils.ExternalCallsStruct; - tokenPermits: IRelayUtils.TokenPermitStruct[]; - fee: IRelayUtils.FeeParamsStruct; - userNonce: BigNumberish; - deadline: BigNumberish; - signature: BytesLike; - desChainId: BigNumberish; - }; - - export type RelayParamsStructOutput = [ - oracleParams: OracleUtils.SetPricesParamsStructOutput, - externalCalls: IRelayUtils.ExternalCallsStructOutput, - tokenPermits: IRelayUtils.TokenPermitStructOutput[], - fee: IRelayUtils.FeeParamsStructOutput, - userNonce: bigint, - deadline: bigint, - signature: string, - desChainId: bigint, - ] & { - oracleParams: OracleUtils.SetPricesParamsStructOutput; - externalCalls: IRelayUtils.ExternalCallsStructOutput; - tokenPermits: IRelayUtils.TokenPermitStructOutput[]; - fee: IRelayUtils.FeeParamsStructOutput; - userNonce: bigint; - deadline: bigint; - signature: string; - desChainId: bigint; - }; - - export type BridgeOutParamsStruct = { - token: AddressLike; - amount: BigNumberish; - minAmountOut: BigNumberish; - provider: AddressLike; - data: BytesLike; - }; - - export type BridgeOutParamsStructOutput = [ - token: string, - amount: bigint, - minAmountOut: bigint, - provider: string, - data: string, - ] & { - token: string; - amount: bigint; - minAmountOut: bigint; - provider: string; - data: string; - }; -} - -export interface MultichainTransferRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "bridgeIn" - | "bridgeOut" - | "bridgeOutFromController" - | "dataStore" - | "digests" - | "eventEmitter" - | "externalHandler" - | "initialize" - | "multicall" - | "multichainProvider" - | "multichainVault" - | "oracle" - | "orderHandler" - | "orderVault" - | "roleStore" - | "router" - | "sendNativeToken" - | "sendTokens" - | "sendWnt" - | "swapHandler" - | "transferOut" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Initialized" | "TokenTransferReverted"): EventFragment; - - encodeFunctionData(functionFragment: "bridgeIn", values: [AddressLike, AddressLike]): string; - encodeFunctionData( - functionFragment: "bridgeOut", - values: [IRelayUtils.RelayParamsStruct, AddressLike, BigNumberish, IRelayUtils.BridgeOutParamsStruct] - ): string; - encodeFunctionData( - functionFragment: "bridgeOutFromController", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, IRelayUtils.BridgeOutParamsStruct] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "digests", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData(functionFragment: "externalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "initialize", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "multichainProvider", values?: undefined): string; - encodeFunctionData(functionFragment: "multichainVault", values?: undefined): string; - encodeFunctionData(functionFragment: "oracle", values?: undefined): string; - encodeFunctionData(functionFragment: "orderHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "orderVault", values?: undefined): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendNativeToken", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendWnt", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "swapHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "transferOut", values: [IRelayUtils.BridgeOutParamsStruct]): string; - - decodeFunctionResult(functionFragment: "bridgeIn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "bridgeOut", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "bridgeOutFromController", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "digests", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "externalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multichainProvider", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multichainVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendNativeToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendWnt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferOut", data: BytesLike): Result; -} - -export namespace InitializedEvent { - export type InputTuple = [version: BigNumberish]; - export type OutputTuple = [version: bigint]; - export interface OutputObject { - version: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface MultichainTransferRouter extends BaseContract { - connect(runner?: ContractRunner | null): MultichainTransferRouter; - waitForDeployment(): Promise; - - interface: MultichainTransferRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - bridgeIn: TypedContractMethod<[account: AddressLike, token: AddressLike], [void], "payable">; - - bridgeOut: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - params: IRelayUtils.BridgeOutParamsStruct, - ], - [void], - "nonpayable" - >; - - bridgeOutFromController: TypedContractMethod< - [ - account: AddressLike, - srcChainId: BigNumberish, - desChainId: BigNumberish, - deadline: BigNumberish, - params: IRelayUtils.BridgeOutParamsStruct, - ], - [void], - "nonpayable" - >; - - dataStore: TypedContractMethod<[], [string], "view">; - - digests: TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - externalHandler: TypedContractMethod<[], [string], "view">; - - initialize: TypedContractMethod<[_multichainProvider: AddressLike], [void], "nonpayable">; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - - multichainProvider: TypedContractMethod<[], [string], "view">; - - multichainVault: TypedContractMethod<[], [string], "view">; - - oracle: TypedContractMethod<[], [string], "view">; - - orderHandler: TypedContractMethod<[], [string], "view">; - - orderVault: TypedContractMethod<[], [string], "view">; - - roleStore: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendTokens: TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendWnt: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - swapHandler: TypedContractMethod<[], [string], "view">; - - transferOut: TypedContractMethod<[params: IRelayUtils.BridgeOutParamsStruct], [void], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "bridgeIn" - ): TypedContractMethod<[account: AddressLike, token: AddressLike], [void], "payable">; - getFunction( - nameOrSignature: "bridgeOut" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - account: AddressLike, - srcChainId: BigNumberish, - params: IRelayUtils.BridgeOutParamsStruct, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "bridgeOutFromController" - ): TypedContractMethod< - [ - account: AddressLike, - srcChainId: BigNumberish, - desChainId: BigNumberish, - deadline: BigNumberish, - params: IRelayUtils.BridgeOutParamsStruct, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "digests"): TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "externalHandler"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "initialize" - ): TypedContractMethod<[_multichainProvider: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - getFunction(nameOrSignature: "multichainProvider"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multichainVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "oracle"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendWnt" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction(nameOrSignature: "swapHandler"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "transferOut" - ): TypedContractMethod<[params: IRelayUtils.BridgeOutParamsStruct], [void], "nonpayable">; - - getEvent( - key: "Initialized" - ): TypedContractEvent; - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "Initialized(uint8)": TypedContractEvent< - InitializedEvent.InputTuple, - InitializedEvent.OutputTuple, - InitializedEvent.OutputObject - >; - Initialized: TypedContractEvent< - InitializedEvent.InputTuple, - InitializedEvent.OutputTuple, - InitializedEvent.OutputObject - >; - - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/MultichainUtils.ts b/src/typechain-types/MultichainUtils.ts deleted file mode 100644 index 412447a926..0000000000 --- a/src/typechain-types/MultichainUtils.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface MultichainUtilsInterface extends Interface { - getFunction( - nameOrSignature: "getMultichainBalanceAmount" | "validateMultichainEndpoint" | "validateMultichainProvider" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "getMultichainBalanceAmount", - values: [AddressLike, AddressLike, AddressLike] - ): string; - encodeFunctionData(functionFragment: "validateMultichainEndpoint", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "validateMultichainProvider", values: [AddressLike, AddressLike]): string; - - decodeFunctionResult(functionFragment: "getMultichainBalanceAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "validateMultichainEndpoint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "validateMultichainProvider", data: BytesLike): Result; -} - -export interface MultichainUtils extends BaseContract { - connect(runner?: ContractRunner | null): MultichainUtils; - waitForDeployment(): Promise; - - interface: MultichainUtilsInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - getMultichainBalanceAmount: TypedContractMethod< - [dataStore: AddressLike, account: AddressLike, token: AddressLike], - [bigint], - "view" - >; - - validateMultichainEndpoint: TypedContractMethod<[dataStore: AddressLike, endpoint: AddressLike], [void], "view">; - - validateMultichainProvider: TypedContractMethod<[dataStore: AddressLike, provider: AddressLike], [void], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "getMultichainBalanceAmount" - ): TypedContractMethod<[dataStore: AddressLike, account: AddressLike, token: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "validateMultichainEndpoint" - ): TypedContractMethod<[dataStore: AddressLike, endpoint: AddressLike], [void], "view">; - getFunction( - nameOrSignature: "validateMultichainProvider" - ): TypedContractMethod<[dataStore: AddressLike, provider: AddressLike], [void], "view">; - - filters: {}; -} diff --git a/src/typechain-types/MultichainVault.ts b/src/typechain-types/MultichainVault.ts deleted file mode 100644 index 10d4d35f73..0000000000 --- a/src/typechain-types/MultichainVault.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface MultichainVaultInterface extends Interface { - getFunction( - nameOrSignature: - | "dataStore" - | "recordTransferIn" - | "roleStore" - | "syncTokenBalance" - | "tokenBalances" - | "transferOut(address,address,uint256)" - | "transferOut(address,address,uint256,bool)" - | "transferOutNativeToken" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "recordTransferIn", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "syncTokenBalance", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "tokenBalances", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "transferOut(address,address,uint256)", - values: [AddressLike, AddressLike, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferOut(address,address,uint256,bool)", - values: [AddressLike, AddressLike, BigNumberish, boolean] - ): string; - encodeFunctionData(functionFragment: "transferOutNativeToken", values: [AddressLike, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "recordTransferIn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "syncTokenBalance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenBalances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferOut(address,address,uint256)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferOut(address,address,uint256,bool)", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferOutNativeToken", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface MultichainVault extends BaseContract { - connect(runner?: ContractRunner | null): MultichainVault; - waitForDeployment(): Promise; - - interface: MultichainVaultInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - dataStore: TypedContractMethod<[], [string], "view">; - - recordTransferIn: TypedContractMethod<[token: AddressLike], [bigint], "nonpayable">; - - roleStore: TypedContractMethod<[], [string], "view">; - - syncTokenBalance: TypedContractMethod<[token: AddressLike], [bigint], "nonpayable">; - - tokenBalances: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - "transferOut(address,address,uint256)": TypedContractMethod< - [token: AddressLike, receiver: AddressLike, amount: BigNumberish], - [void], - "nonpayable" - >; - - "transferOut(address,address,uint256,bool)": TypedContractMethod< - [token: AddressLike, receiver: AddressLike, amount: BigNumberish, shouldUnwrapNativeToken: boolean], - [void], - "nonpayable" - >; - - transferOutNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "recordTransferIn"): TypedContractMethod<[token: AddressLike], [bigint], "nonpayable">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "syncTokenBalance"): TypedContractMethod<[token: AddressLike], [bigint], "nonpayable">; - getFunction(nameOrSignature: "tokenBalances"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "transferOut(address,address,uint256)" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "transferOut(address,address,uint256,bool)" - ): TypedContractMethod< - [token: AddressLike, receiver: AddressLike, amount: BigNumberish, shouldUnwrapNativeToken: boolean], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "transferOutNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "nonpayable">; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/OrderBook.ts b/src/typechain-types/OrderBook.ts deleted file mode 100644 index 6d7d2a51ae..0000000000 --- a/src/typechain-types/OrderBook.ts +++ /dev/null @@ -1,1650 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface OrderBookInterface extends Interface { - getFunction( - nameOrSignature: - | "PRICE_PRECISION" - | "USDG_PRECISION" - | "cancelDecreaseOrder" - | "cancelIncreaseOrder" - | "cancelMultiple" - | "cancelSwapOrder" - | "createDecreaseOrder" - | "createIncreaseOrder" - | "createSwapOrder" - | "decreaseOrders" - | "decreaseOrdersIndex" - | "executeDecreaseOrder" - | "executeIncreaseOrder" - | "executeSwapOrder" - | "getDecreaseOrder" - | "getIncreaseOrder" - | "getSwapOrder" - | "getUsdgMinPrice" - | "gov" - | "increaseOrders" - | "increaseOrdersIndex" - | "initialize" - | "isInitialized" - | "minExecutionFee" - | "minPurchaseTokenAmountUsd" - | "router" - | "setGov" - | "setMinExecutionFee" - | "setMinPurchaseTokenAmountUsd" - | "swapOrders" - | "swapOrdersIndex" - | "updateDecreaseOrder" - | "updateIncreaseOrder" - | "updateSwapOrder" - | "usdg" - | "validatePositionOrderPrice" - | "validateSwapOrderPriceWithTriggerAboveThreshold" - | "vault" - | "weth" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: - | "CancelDecreaseOrder" - | "CancelIncreaseOrder" - | "CancelSwapOrder" - | "CreateDecreaseOrder" - | "CreateIncreaseOrder" - | "CreateSwapOrder" - | "ExecuteDecreaseOrder" - | "ExecuteIncreaseOrder" - | "ExecuteSwapOrder" - | "Initialize" - | "UpdateDecreaseOrder" - | "UpdateGov" - | "UpdateIncreaseOrder" - | "UpdateMinExecutionFee" - | "UpdateMinPurchaseTokenAmountUsd" - | "UpdateSwapOrder" - ): EventFragment; - - encodeFunctionData(functionFragment: "PRICE_PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "USDG_PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "cancelDecreaseOrder", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "cancelIncreaseOrder", values: [BigNumberish]): string; - encodeFunctionData( - functionFragment: "cancelMultiple", - values: [BigNumberish[], BigNumberish[], BigNumberish[]] - ): string; - encodeFunctionData(functionFragment: "cancelSwapOrder", values: [BigNumberish]): string; - encodeFunctionData( - functionFragment: "createDecreaseOrder", - values: [AddressLike, BigNumberish, AddressLike, BigNumberish, boolean, BigNumberish, boolean] - ): string; - encodeFunctionData( - functionFragment: "createIncreaseOrder", - values: [ - AddressLike[], - BigNumberish, - AddressLike, - BigNumberish, - BigNumberish, - AddressLike, - boolean, - BigNumberish, - boolean, - BigNumberish, - boolean, - ] - ): string; - encodeFunctionData( - functionFragment: "createSwapOrder", - values: [AddressLike[], BigNumberish, BigNumberish, BigNumberish, boolean, BigNumberish, boolean, boolean] - ): string; - encodeFunctionData(functionFragment: "decreaseOrders", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "decreaseOrdersIndex", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "executeDecreaseOrder", - values: [AddressLike, BigNumberish, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "executeIncreaseOrder", - values: [AddressLike, BigNumberish, AddressLike] - ): string; - encodeFunctionData(functionFragment: "executeSwapOrder", values: [AddressLike, BigNumberish, AddressLike]): string; - encodeFunctionData(functionFragment: "getDecreaseOrder", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "getIncreaseOrder", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "getSwapOrder", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "getUsdgMinPrice", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "increaseOrders", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "increaseOrdersIndex", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "initialize", - values: [AddressLike, AddressLike, AddressLike, AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; - encodeFunctionData(functionFragment: "minExecutionFee", values?: undefined): string; - encodeFunctionData(functionFragment: "minPurchaseTokenAmountUsd", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setMinExecutionFee", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setMinPurchaseTokenAmountUsd", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "swapOrders", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "swapOrdersIndex", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "updateDecreaseOrder", - values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish, boolean] - ): string; - encodeFunctionData( - functionFragment: "updateIncreaseOrder", - values: [BigNumberish, BigNumberish, BigNumberish, boolean] - ): string; - encodeFunctionData( - functionFragment: "updateSwapOrder", - values: [BigNumberish, BigNumberish, BigNumberish, boolean] - ): string; - encodeFunctionData(functionFragment: "usdg", values?: undefined): string; - encodeFunctionData( - functionFragment: "validatePositionOrderPrice", - values: [boolean, BigNumberish, AddressLike, boolean, boolean] - ): string; - encodeFunctionData( - functionFragment: "validateSwapOrderPriceWithTriggerAboveThreshold", - values: [AddressLike[], BigNumberish] - ): string; - encodeFunctionData(functionFragment: "vault", values?: undefined): string; - encodeFunctionData(functionFragment: "weth", values?: undefined): string; - - decodeFunctionResult(functionFragment: "PRICE_PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "USDG_PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelDecreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelIncreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelMultiple", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelSwapOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createDecreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createIncreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createSwapOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreaseOrders", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreaseOrdersIndex", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeDecreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeIncreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeSwapOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getDecreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getIncreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getSwapOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getUsdgMinPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increaseOrders", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increaseOrdersIndex", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minExecutionFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minPurchaseTokenAmountUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMinExecutionFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMinPurchaseTokenAmountUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapOrders", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapOrdersIndex", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateDecreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateIncreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateSwapOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdg", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "validatePositionOrderPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "validateSwapOrderPriceWithTriggerAboveThreshold", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; -} - -export namespace CancelDecreaseOrderEvent { - export type InputTuple = [ - account: AddressLike, - orderIndex: BigNumberish, - collateralToken: AddressLike, - collateralDelta: BigNumberish, - indexToken: AddressLike, - sizeDelta: BigNumberish, - isLong: boolean, - triggerPrice: BigNumberish, - triggerAboveThreshold: boolean, - executionFee: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - orderIndex: bigint, - collateralToken: string, - collateralDelta: bigint, - indexToken: string, - sizeDelta: bigint, - isLong: boolean, - triggerPrice: bigint, - triggerAboveThreshold: boolean, - executionFee: bigint, - ]; - export interface OutputObject { - account: string; - orderIndex: bigint; - collateralToken: string; - collateralDelta: bigint; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CancelIncreaseOrderEvent { - export type InputTuple = [ - account: AddressLike, - orderIndex: BigNumberish, - purchaseToken: AddressLike, - purchaseTokenAmount: BigNumberish, - collateralToken: AddressLike, - indexToken: AddressLike, - sizeDelta: BigNumberish, - isLong: boolean, - triggerPrice: BigNumberish, - triggerAboveThreshold: boolean, - executionFee: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - orderIndex: bigint, - purchaseToken: string, - purchaseTokenAmount: bigint, - collateralToken: string, - indexToken: string, - sizeDelta: bigint, - isLong: boolean, - triggerPrice: bigint, - triggerAboveThreshold: boolean, - executionFee: bigint, - ]; - export interface OutputObject { - account: string; - orderIndex: bigint; - purchaseToken: string; - purchaseTokenAmount: bigint; - collateralToken: string; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CancelSwapOrderEvent { - export type InputTuple = [ - account: AddressLike, - orderIndex: BigNumberish, - path: AddressLike[], - amountIn: BigNumberish, - minOut: BigNumberish, - triggerRatio: BigNumberish, - triggerAboveThreshold: boolean, - shouldUnwrap: boolean, - executionFee: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - orderIndex: bigint, - path: string[], - amountIn: bigint, - minOut: bigint, - triggerRatio: bigint, - triggerAboveThreshold: boolean, - shouldUnwrap: boolean, - executionFee: bigint, - ]; - export interface OutputObject { - account: string; - orderIndex: bigint; - path: string[]; - amountIn: bigint; - minOut: bigint; - triggerRatio: bigint; - triggerAboveThreshold: boolean; - shouldUnwrap: boolean; - executionFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CreateDecreaseOrderEvent { - export type InputTuple = [ - account: AddressLike, - orderIndex: BigNumberish, - collateralToken: AddressLike, - collateralDelta: BigNumberish, - indexToken: AddressLike, - sizeDelta: BigNumberish, - isLong: boolean, - triggerPrice: BigNumberish, - triggerAboveThreshold: boolean, - executionFee: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - orderIndex: bigint, - collateralToken: string, - collateralDelta: bigint, - indexToken: string, - sizeDelta: bigint, - isLong: boolean, - triggerPrice: bigint, - triggerAboveThreshold: boolean, - executionFee: bigint, - ]; - export interface OutputObject { - account: string; - orderIndex: bigint; - collateralToken: string; - collateralDelta: bigint; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CreateIncreaseOrderEvent { - export type InputTuple = [ - account: AddressLike, - orderIndex: BigNumberish, - purchaseToken: AddressLike, - purchaseTokenAmount: BigNumberish, - collateralToken: AddressLike, - indexToken: AddressLike, - sizeDelta: BigNumberish, - isLong: boolean, - triggerPrice: BigNumberish, - triggerAboveThreshold: boolean, - executionFee: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - orderIndex: bigint, - purchaseToken: string, - purchaseTokenAmount: bigint, - collateralToken: string, - indexToken: string, - sizeDelta: bigint, - isLong: boolean, - triggerPrice: bigint, - triggerAboveThreshold: boolean, - executionFee: bigint, - ]; - export interface OutputObject { - account: string; - orderIndex: bigint; - purchaseToken: string; - purchaseTokenAmount: bigint; - collateralToken: string; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CreateSwapOrderEvent { - export type InputTuple = [ - account: AddressLike, - orderIndex: BigNumberish, - path: AddressLike[], - amountIn: BigNumberish, - minOut: BigNumberish, - triggerRatio: BigNumberish, - triggerAboveThreshold: boolean, - shouldUnwrap: boolean, - executionFee: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - orderIndex: bigint, - path: string[], - amountIn: bigint, - minOut: bigint, - triggerRatio: bigint, - triggerAboveThreshold: boolean, - shouldUnwrap: boolean, - executionFee: bigint, - ]; - export interface OutputObject { - account: string; - orderIndex: bigint; - path: string[]; - amountIn: bigint; - minOut: bigint; - triggerRatio: bigint; - triggerAboveThreshold: boolean; - shouldUnwrap: boolean; - executionFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace ExecuteDecreaseOrderEvent { - export type InputTuple = [ - account: AddressLike, - orderIndex: BigNumberish, - collateralToken: AddressLike, - collateralDelta: BigNumberish, - indexToken: AddressLike, - sizeDelta: BigNumberish, - isLong: boolean, - triggerPrice: BigNumberish, - triggerAboveThreshold: boolean, - executionFee: BigNumberish, - executionPrice: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - orderIndex: bigint, - collateralToken: string, - collateralDelta: bigint, - indexToken: string, - sizeDelta: bigint, - isLong: boolean, - triggerPrice: bigint, - triggerAboveThreshold: boolean, - executionFee: bigint, - executionPrice: bigint, - ]; - export interface OutputObject { - account: string; - orderIndex: bigint; - collateralToken: string; - collateralDelta: bigint; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - executionPrice: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace ExecuteIncreaseOrderEvent { - export type InputTuple = [ - account: AddressLike, - orderIndex: BigNumberish, - purchaseToken: AddressLike, - purchaseTokenAmount: BigNumberish, - collateralToken: AddressLike, - indexToken: AddressLike, - sizeDelta: BigNumberish, - isLong: boolean, - triggerPrice: BigNumberish, - triggerAboveThreshold: boolean, - executionFee: BigNumberish, - executionPrice: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - orderIndex: bigint, - purchaseToken: string, - purchaseTokenAmount: bigint, - collateralToken: string, - indexToken: string, - sizeDelta: bigint, - isLong: boolean, - triggerPrice: bigint, - triggerAboveThreshold: boolean, - executionFee: bigint, - executionPrice: bigint, - ]; - export interface OutputObject { - account: string; - orderIndex: bigint; - purchaseToken: string; - purchaseTokenAmount: bigint; - collateralToken: string; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - executionPrice: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace ExecuteSwapOrderEvent { - export type InputTuple = [ - account: AddressLike, - orderIndex: BigNumberish, - path: AddressLike[], - amountIn: BigNumberish, - minOut: BigNumberish, - amountOut: BigNumberish, - triggerRatio: BigNumberish, - triggerAboveThreshold: boolean, - shouldUnwrap: boolean, - executionFee: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - orderIndex: bigint, - path: string[], - amountIn: bigint, - minOut: bigint, - amountOut: bigint, - triggerRatio: bigint, - triggerAboveThreshold: boolean, - shouldUnwrap: boolean, - executionFee: bigint, - ]; - export interface OutputObject { - account: string; - orderIndex: bigint; - path: string[]; - amountIn: bigint; - minOut: bigint; - amountOut: bigint; - triggerRatio: bigint; - triggerAboveThreshold: boolean; - shouldUnwrap: boolean; - executionFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace InitializeEvent { - export type InputTuple = [ - router: AddressLike, - vault: AddressLike, - weth: AddressLike, - usdg: AddressLike, - minExecutionFee: BigNumberish, - minPurchaseTokenAmountUsd: BigNumberish, - ]; - export type OutputTuple = [ - router: string, - vault: string, - weth: string, - usdg: string, - minExecutionFee: bigint, - minPurchaseTokenAmountUsd: bigint, - ]; - export interface OutputObject { - router: string; - vault: string; - weth: string; - usdg: string; - minExecutionFee: bigint; - minPurchaseTokenAmountUsd: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdateDecreaseOrderEvent { - export type InputTuple = [ - account: AddressLike, - orderIndex: BigNumberish, - collateralToken: AddressLike, - collateralDelta: BigNumberish, - indexToken: AddressLike, - sizeDelta: BigNumberish, - isLong: boolean, - triggerPrice: BigNumberish, - triggerAboveThreshold: boolean, - ]; - export type OutputTuple = [ - account: string, - orderIndex: bigint, - collateralToken: string, - collateralDelta: bigint, - indexToken: string, - sizeDelta: bigint, - isLong: boolean, - triggerPrice: bigint, - triggerAboveThreshold: boolean, - ]; - export interface OutputObject { - account: string; - orderIndex: bigint; - collateralToken: string; - collateralDelta: bigint; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdateGovEvent { - export type InputTuple = [gov: AddressLike]; - export type OutputTuple = [gov: string]; - export interface OutputObject { - gov: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdateIncreaseOrderEvent { - export type InputTuple = [ - account: AddressLike, - orderIndex: BigNumberish, - collateralToken: AddressLike, - indexToken: AddressLike, - isLong: boolean, - sizeDelta: BigNumberish, - triggerPrice: BigNumberish, - triggerAboveThreshold: boolean, - ]; - export type OutputTuple = [ - account: string, - orderIndex: bigint, - collateralToken: string, - indexToken: string, - isLong: boolean, - sizeDelta: bigint, - triggerPrice: bigint, - triggerAboveThreshold: boolean, - ]; - export interface OutputObject { - account: string; - orderIndex: bigint; - collateralToken: string; - indexToken: string; - isLong: boolean; - sizeDelta: bigint; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdateMinExecutionFeeEvent { - export type InputTuple = [minExecutionFee: BigNumberish]; - export type OutputTuple = [minExecutionFee: bigint]; - export interface OutputObject { - minExecutionFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdateMinPurchaseTokenAmountUsdEvent { - export type InputTuple = [minPurchaseTokenAmountUsd: BigNumberish]; - export type OutputTuple = [minPurchaseTokenAmountUsd: bigint]; - export interface OutputObject { - minPurchaseTokenAmountUsd: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdateSwapOrderEvent { - export type InputTuple = [ - account: AddressLike, - ordexIndex: BigNumberish, - path: AddressLike[], - amountIn: BigNumberish, - minOut: BigNumberish, - triggerRatio: BigNumberish, - triggerAboveThreshold: boolean, - shouldUnwrap: boolean, - executionFee: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - ordexIndex: bigint, - path: string[], - amountIn: bigint, - minOut: bigint, - triggerRatio: bigint, - triggerAboveThreshold: boolean, - shouldUnwrap: boolean, - executionFee: bigint, - ]; - export interface OutputObject { - account: string; - ordexIndex: bigint; - path: string[]; - amountIn: bigint; - minOut: bigint; - triggerRatio: bigint; - triggerAboveThreshold: boolean; - shouldUnwrap: boolean; - executionFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface OrderBook extends BaseContract { - connect(runner?: ContractRunner | null): OrderBook; - waitForDeployment(): Promise; - - interface: OrderBookInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - PRICE_PRECISION: TypedContractMethod<[], [bigint], "view">; - - USDG_PRECISION: TypedContractMethod<[], [bigint], "view">; - - cancelDecreaseOrder: TypedContractMethod<[_orderIndex: BigNumberish], [void], "nonpayable">; - - cancelIncreaseOrder: TypedContractMethod<[_orderIndex: BigNumberish], [void], "nonpayable">; - - cancelMultiple: TypedContractMethod< - [_swapOrderIndexes: BigNumberish[], _increaseOrderIndexes: BigNumberish[], _decreaseOrderIndexes: BigNumberish[]], - [void], - "nonpayable" - >; - - cancelSwapOrder: TypedContractMethod<[_orderIndex: BigNumberish], [void], "nonpayable">; - - createDecreaseOrder: TypedContractMethod< - [ - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _collateralToken: AddressLike, - _collateralDelta: BigNumberish, - _isLong: boolean, - _triggerPrice: BigNumberish, - _triggerAboveThreshold: boolean, - ], - [void], - "payable" - >; - - createIncreaseOrder: TypedContractMethod< - [ - _path: AddressLike[], - _amountIn: BigNumberish, - _indexToken: AddressLike, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _collateralToken: AddressLike, - _isLong: boolean, - _triggerPrice: BigNumberish, - _triggerAboveThreshold: boolean, - _executionFee: BigNumberish, - _shouldWrap: boolean, - ], - [void], - "payable" - >; - - createSwapOrder: TypedContractMethod< - [ - _path: AddressLike[], - _amountIn: BigNumberish, - _minOut: BigNumberish, - _triggerRatio: BigNumberish, - _triggerAboveThreshold: boolean, - _executionFee: BigNumberish, - _shouldWrap: boolean, - _shouldUnwrap: boolean, - ], - [void], - "payable" - >; - - decreaseOrders: TypedContractMethod< - [arg0: AddressLike, arg1: BigNumberish], - [ - [string, string, bigint, string, bigint, boolean, bigint, boolean, bigint] & { - account: string; - collateralToken: string; - collateralDelta: bigint; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - }, - ], - "view" - >; - - decreaseOrdersIndex: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - executeDecreaseOrder: TypedContractMethod< - [_address: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - - executeIncreaseOrder: TypedContractMethod< - [_address: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - - executeSwapOrder: TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - - getDecreaseOrder: TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish], - [ - [string, bigint, string, bigint, boolean, bigint, boolean, bigint] & { - collateralToken: string; - collateralDelta: bigint; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - }, - ], - "view" - >; - - getIncreaseOrder: TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish], - [ - [string, bigint, string, string, bigint, boolean, bigint, boolean, bigint] & { - purchaseToken: string; - purchaseTokenAmount: bigint; - collateralToken: string; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - }, - ], - "view" - >; - - getSwapOrder: TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish], - [ - [string, string, string, bigint, bigint, bigint, boolean, boolean, bigint] & { - path0: string; - path1: string; - path2: string; - amountIn: bigint; - minOut: bigint; - triggerRatio: bigint; - triggerAboveThreshold: boolean; - shouldUnwrap: boolean; - executionFee: bigint; - }, - ], - "view" - >; - - getUsdgMinPrice: TypedContractMethod<[_otherToken: AddressLike], [bigint], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - increaseOrders: TypedContractMethod< - [arg0: AddressLike, arg1: BigNumberish], - [ - [string, string, bigint, string, string, bigint, boolean, bigint, boolean, bigint] & { - account: string; - purchaseToken: string; - purchaseTokenAmount: bigint; - collateralToken: string; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - }, - ], - "view" - >; - - increaseOrdersIndex: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - initialize: TypedContractMethod< - [ - _router: AddressLike, - _vault: AddressLike, - _weth: AddressLike, - _usdg: AddressLike, - _minExecutionFee: BigNumberish, - _minPurchaseTokenAmountUsd: BigNumberish, - ], - [void], - "nonpayable" - >; - - isInitialized: TypedContractMethod<[], [boolean], "view">; - - minExecutionFee: TypedContractMethod<[], [bigint], "view">; - - minPurchaseTokenAmountUsd: TypedContractMethod<[], [bigint], "view">; - - router: TypedContractMethod<[], [string], "view">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setMinExecutionFee: TypedContractMethod<[_minExecutionFee: BigNumberish], [void], "nonpayable">; - - setMinPurchaseTokenAmountUsd: TypedContractMethod<[_minPurchaseTokenAmountUsd: BigNumberish], [void], "nonpayable">; - - swapOrders: TypedContractMethod< - [arg0: AddressLike, arg1: BigNumberish], - [ - [string, bigint, bigint, bigint, boolean, boolean, bigint] & { - account: string; - amountIn: bigint; - minOut: bigint; - triggerRatio: bigint; - triggerAboveThreshold: boolean; - shouldUnwrap: boolean; - executionFee: bigint; - }, - ], - "view" - >; - - swapOrdersIndex: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - updateDecreaseOrder: TypedContractMethod< - [ - _orderIndex: BigNumberish, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _triggerPrice: BigNumberish, - _triggerAboveThreshold: boolean, - ], - [void], - "nonpayable" - >; - - updateIncreaseOrder: TypedContractMethod< - [_orderIndex: BigNumberish, _sizeDelta: BigNumberish, _triggerPrice: BigNumberish, _triggerAboveThreshold: boolean], - [void], - "nonpayable" - >; - - updateSwapOrder: TypedContractMethod< - [_orderIndex: BigNumberish, _minOut: BigNumberish, _triggerRatio: BigNumberish, _triggerAboveThreshold: boolean], - [void], - "nonpayable" - >; - - usdg: TypedContractMethod<[], [string], "view">; - - validatePositionOrderPrice: TypedContractMethod< - [ - _triggerAboveThreshold: boolean, - _triggerPrice: BigNumberish, - _indexToken: AddressLike, - _maximizePrice: boolean, - _raise: boolean, - ], - [[bigint, boolean]], - "view" - >; - - validateSwapOrderPriceWithTriggerAboveThreshold: TypedContractMethod< - [_path: AddressLike[], _triggerRatio: BigNumberish], - [boolean], - "view" - >; - - vault: TypedContractMethod<[], [string], "view">; - - weth: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "PRICE_PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "USDG_PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "cancelDecreaseOrder" - ): TypedContractMethod<[_orderIndex: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "cancelIncreaseOrder" - ): TypedContractMethod<[_orderIndex: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "cancelMultiple" - ): TypedContractMethod< - [_swapOrderIndexes: BigNumberish[], _increaseOrderIndexes: BigNumberish[], _decreaseOrderIndexes: BigNumberish[]], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "cancelSwapOrder" - ): TypedContractMethod<[_orderIndex: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "createDecreaseOrder" - ): TypedContractMethod< - [ - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _collateralToken: AddressLike, - _collateralDelta: BigNumberish, - _isLong: boolean, - _triggerPrice: BigNumberish, - _triggerAboveThreshold: boolean, - ], - [void], - "payable" - >; - getFunction( - nameOrSignature: "createIncreaseOrder" - ): TypedContractMethod< - [ - _path: AddressLike[], - _amountIn: BigNumberish, - _indexToken: AddressLike, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _collateralToken: AddressLike, - _isLong: boolean, - _triggerPrice: BigNumberish, - _triggerAboveThreshold: boolean, - _executionFee: BigNumberish, - _shouldWrap: boolean, - ], - [void], - "payable" - >; - getFunction( - nameOrSignature: "createSwapOrder" - ): TypedContractMethod< - [ - _path: AddressLike[], - _amountIn: BigNumberish, - _minOut: BigNumberish, - _triggerRatio: BigNumberish, - _triggerAboveThreshold: boolean, - _executionFee: BigNumberish, - _shouldWrap: boolean, - _shouldUnwrap: boolean, - ], - [void], - "payable" - >; - getFunction(nameOrSignature: "decreaseOrders"): TypedContractMethod< - [arg0: AddressLike, arg1: BigNumberish], - [ - [string, string, bigint, string, bigint, boolean, bigint, boolean, bigint] & { - account: string; - collateralToken: string; - collateralDelta: bigint; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - }, - ], - "view" - >; - getFunction(nameOrSignature: "decreaseOrdersIndex"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "executeDecreaseOrder" - ): TypedContractMethod< - [_address: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "executeIncreaseOrder" - ): TypedContractMethod< - [_address: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "executeSwapOrder" - ): TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "getDecreaseOrder"): TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish], - [ - [string, bigint, string, bigint, boolean, bigint, boolean, bigint] & { - collateralToken: string; - collateralDelta: bigint; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - }, - ], - "view" - >; - getFunction(nameOrSignature: "getIncreaseOrder"): TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish], - [ - [string, bigint, string, string, bigint, boolean, bigint, boolean, bigint] & { - purchaseToken: string; - purchaseTokenAmount: bigint; - collateralToken: string; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - }, - ], - "view" - >; - getFunction(nameOrSignature: "getSwapOrder"): TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish], - [ - [string, string, string, bigint, bigint, bigint, boolean, boolean, bigint] & { - path0: string; - path1: string; - path2: string; - amountIn: bigint; - minOut: bigint; - triggerRatio: bigint; - triggerAboveThreshold: boolean; - shouldUnwrap: boolean; - executionFee: bigint; - }, - ], - "view" - >; - getFunction(nameOrSignature: "getUsdgMinPrice"): TypedContractMethod<[_otherToken: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "increaseOrders"): TypedContractMethod< - [arg0: AddressLike, arg1: BigNumberish], - [ - [string, string, bigint, string, string, bigint, boolean, bigint, boolean, bigint] & { - account: string; - purchaseToken: string; - purchaseTokenAmount: bigint; - collateralToken: string; - indexToken: string; - sizeDelta: bigint; - isLong: boolean; - triggerPrice: bigint; - triggerAboveThreshold: boolean; - executionFee: bigint; - }, - ], - "view" - >; - getFunction(nameOrSignature: "increaseOrdersIndex"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "initialize" - ): TypedContractMethod< - [ - _router: AddressLike, - _vault: AddressLike, - _weth: AddressLike, - _usdg: AddressLike, - _minExecutionFee: BigNumberish, - _minPurchaseTokenAmountUsd: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "isInitialized"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "minExecutionFee"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "minPurchaseTokenAmountUsd"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMinExecutionFee" - ): TypedContractMethod<[_minExecutionFee: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMinPurchaseTokenAmountUsd" - ): TypedContractMethod<[_minPurchaseTokenAmountUsd: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "swapOrders"): TypedContractMethod< - [arg0: AddressLike, arg1: BigNumberish], - [ - [string, bigint, bigint, bigint, boolean, boolean, bigint] & { - account: string; - amountIn: bigint; - minOut: bigint; - triggerRatio: bigint; - triggerAboveThreshold: boolean; - shouldUnwrap: boolean; - executionFee: bigint; - }, - ], - "view" - >; - getFunction(nameOrSignature: "swapOrdersIndex"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "updateDecreaseOrder" - ): TypedContractMethod< - [ - _orderIndex: BigNumberish, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _triggerPrice: BigNumberish, - _triggerAboveThreshold: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "updateIncreaseOrder" - ): TypedContractMethod< - [_orderIndex: BigNumberish, _sizeDelta: BigNumberish, _triggerPrice: BigNumberish, _triggerAboveThreshold: boolean], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "updateSwapOrder" - ): TypedContractMethod< - [_orderIndex: BigNumberish, _minOut: BigNumberish, _triggerRatio: BigNumberish, _triggerAboveThreshold: boolean], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "usdg"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "validatePositionOrderPrice" - ): TypedContractMethod< - [ - _triggerAboveThreshold: boolean, - _triggerPrice: BigNumberish, - _indexToken: AddressLike, - _maximizePrice: boolean, - _raise: boolean, - ], - [[bigint, boolean]], - "view" - >; - getFunction( - nameOrSignature: "validateSwapOrderPriceWithTriggerAboveThreshold" - ): TypedContractMethod<[_path: AddressLike[], _triggerRatio: BigNumberish], [boolean], "view">; - getFunction(nameOrSignature: "vault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "weth"): TypedContractMethod<[], [string], "view">; - - getEvent( - key: "CancelDecreaseOrder" - ): TypedContractEvent< - CancelDecreaseOrderEvent.InputTuple, - CancelDecreaseOrderEvent.OutputTuple, - CancelDecreaseOrderEvent.OutputObject - >; - getEvent( - key: "CancelIncreaseOrder" - ): TypedContractEvent< - CancelIncreaseOrderEvent.InputTuple, - CancelIncreaseOrderEvent.OutputTuple, - CancelIncreaseOrderEvent.OutputObject - >; - getEvent( - key: "CancelSwapOrder" - ): TypedContractEvent< - CancelSwapOrderEvent.InputTuple, - CancelSwapOrderEvent.OutputTuple, - CancelSwapOrderEvent.OutputObject - >; - getEvent( - key: "CreateDecreaseOrder" - ): TypedContractEvent< - CreateDecreaseOrderEvent.InputTuple, - CreateDecreaseOrderEvent.OutputTuple, - CreateDecreaseOrderEvent.OutputObject - >; - getEvent( - key: "CreateIncreaseOrder" - ): TypedContractEvent< - CreateIncreaseOrderEvent.InputTuple, - CreateIncreaseOrderEvent.OutputTuple, - CreateIncreaseOrderEvent.OutputObject - >; - getEvent( - key: "CreateSwapOrder" - ): TypedContractEvent< - CreateSwapOrderEvent.InputTuple, - CreateSwapOrderEvent.OutputTuple, - CreateSwapOrderEvent.OutputObject - >; - getEvent( - key: "ExecuteDecreaseOrder" - ): TypedContractEvent< - ExecuteDecreaseOrderEvent.InputTuple, - ExecuteDecreaseOrderEvent.OutputTuple, - ExecuteDecreaseOrderEvent.OutputObject - >; - getEvent( - key: "ExecuteIncreaseOrder" - ): TypedContractEvent< - ExecuteIncreaseOrderEvent.InputTuple, - ExecuteIncreaseOrderEvent.OutputTuple, - ExecuteIncreaseOrderEvent.OutputObject - >; - getEvent( - key: "ExecuteSwapOrder" - ): TypedContractEvent< - ExecuteSwapOrderEvent.InputTuple, - ExecuteSwapOrderEvent.OutputTuple, - ExecuteSwapOrderEvent.OutputObject - >; - getEvent( - key: "Initialize" - ): TypedContractEvent; - getEvent( - key: "UpdateDecreaseOrder" - ): TypedContractEvent< - UpdateDecreaseOrderEvent.InputTuple, - UpdateDecreaseOrderEvent.OutputTuple, - UpdateDecreaseOrderEvent.OutputObject - >; - getEvent( - key: "UpdateGov" - ): TypedContractEvent; - getEvent( - key: "UpdateIncreaseOrder" - ): TypedContractEvent< - UpdateIncreaseOrderEvent.InputTuple, - UpdateIncreaseOrderEvent.OutputTuple, - UpdateIncreaseOrderEvent.OutputObject - >; - getEvent( - key: "UpdateMinExecutionFee" - ): TypedContractEvent< - UpdateMinExecutionFeeEvent.InputTuple, - UpdateMinExecutionFeeEvent.OutputTuple, - UpdateMinExecutionFeeEvent.OutputObject - >; - getEvent( - key: "UpdateMinPurchaseTokenAmountUsd" - ): TypedContractEvent< - UpdateMinPurchaseTokenAmountUsdEvent.InputTuple, - UpdateMinPurchaseTokenAmountUsdEvent.OutputTuple, - UpdateMinPurchaseTokenAmountUsdEvent.OutputObject - >; - getEvent( - key: "UpdateSwapOrder" - ): TypedContractEvent< - UpdateSwapOrderEvent.InputTuple, - UpdateSwapOrderEvent.OutputTuple, - UpdateSwapOrderEvent.OutputObject - >; - - filters: { - "CancelDecreaseOrder(address,uint256,address,uint256,address,uint256,bool,uint256,bool,uint256)": TypedContractEvent< - CancelDecreaseOrderEvent.InputTuple, - CancelDecreaseOrderEvent.OutputTuple, - CancelDecreaseOrderEvent.OutputObject - >; - CancelDecreaseOrder: TypedContractEvent< - CancelDecreaseOrderEvent.InputTuple, - CancelDecreaseOrderEvent.OutputTuple, - CancelDecreaseOrderEvent.OutputObject - >; - - "CancelIncreaseOrder(address,uint256,address,uint256,address,address,uint256,bool,uint256,bool,uint256)": TypedContractEvent< - CancelIncreaseOrderEvent.InputTuple, - CancelIncreaseOrderEvent.OutputTuple, - CancelIncreaseOrderEvent.OutputObject - >; - CancelIncreaseOrder: TypedContractEvent< - CancelIncreaseOrderEvent.InputTuple, - CancelIncreaseOrderEvent.OutputTuple, - CancelIncreaseOrderEvent.OutputObject - >; - - "CancelSwapOrder(address,uint256,address[],uint256,uint256,uint256,bool,bool,uint256)": TypedContractEvent< - CancelSwapOrderEvent.InputTuple, - CancelSwapOrderEvent.OutputTuple, - CancelSwapOrderEvent.OutputObject - >; - CancelSwapOrder: TypedContractEvent< - CancelSwapOrderEvent.InputTuple, - CancelSwapOrderEvent.OutputTuple, - CancelSwapOrderEvent.OutputObject - >; - - "CreateDecreaseOrder(address,uint256,address,uint256,address,uint256,bool,uint256,bool,uint256)": TypedContractEvent< - CreateDecreaseOrderEvent.InputTuple, - CreateDecreaseOrderEvent.OutputTuple, - CreateDecreaseOrderEvent.OutputObject - >; - CreateDecreaseOrder: TypedContractEvent< - CreateDecreaseOrderEvent.InputTuple, - CreateDecreaseOrderEvent.OutputTuple, - CreateDecreaseOrderEvent.OutputObject - >; - - "CreateIncreaseOrder(address,uint256,address,uint256,address,address,uint256,bool,uint256,bool,uint256)": TypedContractEvent< - CreateIncreaseOrderEvent.InputTuple, - CreateIncreaseOrderEvent.OutputTuple, - CreateIncreaseOrderEvent.OutputObject - >; - CreateIncreaseOrder: TypedContractEvent< - CreateIncreaseOrderEvent.InputTuple, - CreateIncreaseOrderEvent.OutputTuple, - CreateIncreaseOrderEvent.OutputObject - >; - - "CreateSwapOrder(address,uint256,address[],uint256,uint256,uint256,bool,bool,uint256)": TypedContractEvent< - CreateSwapOrderEvent.InputTuple, - CreateSwapOrderEvent.OutputTuple, - CreateSwapOrderEvent.OutputObject - >; - CreateSwapOrder: TypedContractEvent< - CreateSwapOrderEvent.InputTuple, - CreateSwapOrderEvent.OutputTuple, - CreateSwapOrderEvent.OutputObject - >; - - "ExecuteDecreaseOrder(address,uint256,address,uint256,address,uint256,bool,uint256,bool,uint256,uint256)": TypedContractEvent< - ExecuteDecreaseOrderEvent.InputTuple, - ExecuteDecreaseOrderEvent.OutputTuple, - ExecuteDecreaseOrderEvent.OutputObject - >; - ExecuteDecreaseOrder: TypedContractEvent< - ExecuteDecreaseOrderEvent.InputTuple, - ExecuteDecreaseOrderEvent.OutputTuple, - ExecuteDecreaseOrderEvent.OutputObject - >; - - "ExecuteIncreaseOrder(address,uint256,address,uint256,address,address,uint256,bool,uint256,bool,uint256,uint256)": TypedContractEvent< - ExecuteIncreaseOrderEvent.InputTuple, - ExecuteIncreaseOrderEvent.OutputTuple, - ExecuteIncreaseOrderEvent.OutputObject - >; - ExecuteIncreaseOrder: TypedContractEvent< - ExecuteIncreaseOrderEvent.InputTuple, - ExecuteIncreaseOrderEvent.OutputTuple, - ExecuteIncreaseOrderEvent.OutputObject - >; - - "ExecuteSwapOrder(address,uint256,address[],uint256,uint256,uint256,uint256,bool,bool,uint256)": TypedContractEvent< - ExecuteSwapOrderEvent.InputTuple, - ExecuteSwapOrderEvent.OutputTuple, - ExecuteSwapOrderEvent.OutputObject - >; - ExecuteSwapOrder: TypedContractEvent< - ExecuteSwapOrderEvent.InputTuple, - ExecuteSwapOrderEvent.OutputTuple, - ExecuteSwapOrderEvent.OutputObject - >; - - "Initialize(address,address,address,address,uint256,uint256)": TypedContractEvent< - InitializeEvent.InputTuple, - InitializeEvent.OutputTuple, - InitializeEvent.OutputObject - >; - Initialize: TypedContractEvent< - InitializeEvent.InputTuple, - InitializeEvent.OutputTuple, - InitializeEvent.OutputObject - >; - - "UpdateDecreaseOrder(address,uint256,address,uint256,address,uint256,bool,uint256,bool)": TypedContractEvent< - UpdateDecreaseOrderEvent.InputTuple, - UpdateDecreaseOrderEvent.OutputTuple, - UpdateDecreaseOrderEvent.OutputObject - >; - UpdateDecreaseOrder: TypedContractEvent< - UpdateDecreaseOrderEvent.InputTuple, - UpdateDecreaseOrderEvent.OutputTuple, - UpdateDecreaseOrderEvent.OutputObject - >; - - "UpdateGov(address)": TypedContractEvent< - UpdateGovEvent.InputTuple, - UpdateGovEvent.OutputTuple, - UpdateGovEvent.OutputObject - >; - UpdateGov: TypedContractEvent; - - "UpdateIncreaseOrder(address,uint256,address,address,bool,uint256,uint256,bool)": TypedContractEvent< - UpdateIncreaseOrderEvent.InputTuple, - UpdateIncreaseOrderEvent.OutputTuple, - UpdateIncreaseOrderEvent.OutputObject - >; - UpdateIncreaseOrder: TypedContractEvent< - UpdateIncreaseOrderEvent.InputTuple, - UpdateIncreaseOrderEvent.OutputTuple, - UpdateIncreaseOrderEvent.OutputObject - >; - - "UpdateMinExecutionFee(uint256)": TypedContractEvent< - UpdateMinExecutionFeeEvent.InputTuple, - UpdateMinExecutionFeeEvent.OutputTuple, - UpdateMinExecutionFeeEvent.OutputObject - >; - UpdateMinExecutionFee: TypedContractEvent< - UpdateMinExecutionFeeEvent.InputTuple, - UpdateMinExecutionFeeEvent.OutputTuple, - UpdateMinExecutionFeeEvent.OutputObject - >; - - "UpdateMinPurchaseTokenAmountUsd(uint256)": TypedContractEvent< - UpdateMinPurchaseTokenAmountUsdEvent.InputTuple, - UpdateMinPurchaseTokenAmountUsdEvent.OutputTuple, - UpdateMinPurchaseTokenAmountUsdEvent.OutputObject - >; - UpdateMinPurchaseTokenAmountUsd: TypedContractEvent< - UpdateMinPurchaseTokenAmountUsdEvent.InputTuple, - UpdateMinPurchaseTokenAmountUsdEvent.OutputTuple, - UpdateMinPurchaseTokenAmountUsdEvent.OutputObject - >; - - "UpdateSwapOrder(address,uint256,address[],uint256,uint256,uint256,bool,bool,uint256)": TypedContractEvent< - UpdateSwapOrderEvent.InputTuple, - UpdateSwapOrderEvent.OutputTuple, - UpdateSwapOrderEvent.OutputObject - >; - UpdateSwapOrder: TypedContractEvent< - UpdateSwapOrderEvent.InputTuple, - UpdateSwapOrderEvent.OutputTuple, - UpdateSwapOrderEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/OrderBookReader.ts b/src/typechain-types/OrderBookReader.ts deleted file mode 100644 index ea3cf7274c..0000000000 --- a/src/typechain-types/OrderBookReader.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface OrderBookReaderInterface extends Interface { - getFunction(nameOrSignature: "getDecreaseOrders" | "getIncreaseOrders" | "getSwapOrders"): FunctionFragment; - - encodeFunctionData(functionFragment: "getDecreaseOrders", values: [AddressLike, AddressLike, BigNumberish[]]): string; - encodeFunctionData(functionFragment: "getIncreaseOrders", values: [AddressLike, AddressLike, BigNumberish[]]): string; - encodeFunctionData(functionFragment: "getSwapOrders", values: [AddressLike, AddressLike, BigNumberish[]]): string; - - decodeFunctionResult(functionFragment: "getDecreaseOrders", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getIncreaseOrders", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getSwapOrders", data: BytesLike): Result; -} - -export interface OrderBookReader extends BaseContract { - connect(runner?: ContractRunner | null): OrderBookReader; - waitForDeployment(): Promise; - - interface: OrderBookReaderInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - getDecreaseOrders: TypedContractMethod< - [_orderBookAddress: AddressLike, _account: AddressLike, _indices: BigNumberish[]], - [[bigint[], string[]]], - "view" - >; - - getIncreaseOrders: TypedContractMethod< - [_orderBookAddress: AddressLike, _account: AddressLike, _indices: BigNumberish[]], - [[bigint[], string[]]], - "view" - >; - - getSwapOrders: TypedContractMethod< - [_orderBookAddress: AddressLike, _account: AddressLike, _indices: BigNumberish[]], - [[bigint[], string[]]], - "view" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "getDecreaseOrders" - ): TypedContractMethod< - [_orderBookAddress: AddressLike, _account: AddressLike, _indices: BigNumberish[]], - [[bigint[], string[]]], - "view" - >; - getFunction( - nameOrSignature: "getIncreaseOrders" - ): TypedContractMethod< - [_orderBookAddress: AddressLike, _account: AddressLike, _indices: BigNumberish[]], - [[bigint[], string[]]], - "view" - >; - getFunction( - nameOrSignature: "getSwapOrders" - ): TypedContractMethod< - [_orderBookAddress: AddressLike, _account: AddressLike, _indices: BigNumberish[]], - [[bigint[], string[]]], - "view" - >; - - filters: {}; -} diff --git a/src/typechain-types/OrderExecutor.ts b/src/typechain-types/OrderExecutor.ts deleted file mode 100644 index e1816ee8f5..0000000000 --- a/src/typechain-types/OrderExecutor.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface OrderExecutorInterface extends Interface { - getFunction( - nameOrSignature: "executeDecreaseOrder" | "executeIncreaseOrder" | "executeSwapOrder" | "orderBook" | "vault" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "executeDecreaseOrder", - values: [AddressLike, BigNumberish, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "executeIncreaseOrder", - values: [AddressLike, BigNumberish, AddressLike] - ): string; - encodeFunctionData(functionFragment: "executeSwapOrder", values: [AddressLike, BigNumberish, AddressLike]): string; - encodeFunctionData(functionFragment: "orderBook", values?: undefined): string; - encodeFunctionData(functionFragment: "vault", values?: undefined): string; - - decodeFunctionResult(functionFragment: "executeDecreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeIncreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeSwapOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderBook", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vault", data: BytesLike): Result; -} - -export interface OrderExecutor extends BaseContract { - connect(runner?: ContractRunner | null): OrderExecutor; - waitForDeployment(): Promise; - - interface: OrderExecutorInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - executeDecreaseOrder: TypedContractMethod< - [_address: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - - executeIncreaseOrder: TypedContractMethod< - [_address: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - - executeSwapOrder: TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - - orderBook: TypedContractMethod<[], [string], "view">; - - vault: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "executeDecreaseOrder" - ): TypedContractMethod< - [_address: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "executeIncreaseOrder" - ): TypedContractMethod< - [_address: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "executeSwapOrder" - ): TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "orderBook"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "vault"): TypedContractMethod<[], [string], "view">; - - filters: {}; -} diff --git a/src/typechain-types/PositionManager.ts b/src/typechain-types/PositionManager.ts deleted file mode 100644 index eef18e49fe..0000000000 --- a/src/typechain-types/PositionManager.ts +++ /dev/null @@ -1,1018 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface PositionManagerInterface extends Interface { - getFunction( - nameOrSignature: - | "BASIS_POINTS_DIVISOR" - | "admin" - | "approve" - | "decreasePosition" - | "decreasePositionAndSwap" - | "decreasePositionAndSwapETH" - | "decreasePositionETH" - | "depositFee" - | "executeDecreaseOrder" - | "executeIncreaseOrder" - | "executeSwapOrder" - | "feeReserves" - | "gov" - | "inLegacyMode" - | "increasePosition" - | "increasePositionBufferBps" - | "increasePositionETH" - | "isLiquidator" - | "isOrderKeeper" - | "isPartner" - | "liquidatePosition" - | "maxGlobalLongSizes" - | "maxGlobalShortSizes" - | "orderBook" - | "referralStorage" - | "router" - | "sendValue" - | "setAdmin" - | "setDepositFee" - | "setGov" - | "setInLegacyMode" - | "setIncreasePositionBufferBps" - | "setLiquidator" - | "setMaxGlobalSizes" - | "setOrderKeeper" - | "setPartner" - | "setReferralStorage" - | "setShouldValidateIncreaseOrder" - | "shouldValidateIncreaseOrder" - | "vault" - | "weth" - | "withdrawFees" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: - | "DecreasePositionReferral" - | "IncreasePositionReferral" - | "SetAdmin" - | "SetDepositFee" - | "SetInLegacyMode" - | "SetIncreasePositionBufferBps" - | "SetLiquidator" - | "SetMaxGlobalSizes" - | "SetOrderKeeper" - | "SetPartner" - | "SetReferralStorage" - | "SetShouldValidateIncreaseOrder" - | "WithdrawFees" - ): EventFragment; - - encodeFunctionData(functionFragment: "BASIS_POINTS_DIVISOR", values?: undefined): string; - encodeFunctionData(functionFragment: "admin", values?: undefined): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData( - functionFragment: "decreasePosition", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, boolean, AddressLike, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "decreasePositionAndSwap", - values: [AddressLike[], AddressLike, BigNumberish, BigNumberish, boolean, AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "decreasePositionAndSwapETH", - values: [AddressLike[], AddressLike, BigNumberish, BigNumberish, boolean, AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "decreasePositionETH", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, boolean, AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "depositFee", values?: undefined): string; - encodeFunctionData( - functionFragment: "executeDecreaseOrder", - values: [AddressLike, BigNumberish, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "executeIncreaseOrder", - values: [AddressLike, BigNumberish, AddressLike] - ): string; - encodeFunctionData(functionFragment: "executeSwapOrder", values: [AddressLike, BigNumberish, AddressLike]): string; - encodeFunctionData(functionFragment: "feeReserves", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "inLegacyMode", values?: undefined): string; - encodeFunctionData( - functionFragment: "increasePosition", - values: [AddressLike[], AddressLike, BigNumberish, BigNumberish, BigNumberish, boolean, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "increasePositionBufferBps", values?: undefined): string; - encodeFunctionData( - functionFragment: "increasePositionETH", - values: [AddressLike[], AddressLike, BigNumberish, BigNumberish, boolean, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "isLiquidator", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isOrderKeeper", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isPartner", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "liquidatePosition", - values: [AddressLike, AddressLike, AddressLike, boolean, AddressLike] - ): string; - encodeFunctionData(functionFragment: "maxGlobalLongSizes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "maxGlobalShortSizes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "orderBook", values?: undefined): string; - encodeFunctionData(functionFragment: "referralStorage", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendValue", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setAdmin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setDepositFee", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setInLegacyMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setIncreasePositionBufferBps", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setLiquidator", values: [AddressLike, boolean]): string; - encodeFunctionData( - functionFragment: "setMaxGlobalSizes", - values: [AddressLike[], BigNumberish[], BigNumberish[]] - ): string; - encodeFunctionData(functionFragment: "setOrderKeeper", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setPartner", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setReferralStorage", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setShouldValidateIncreaseOrder", values: [boolean]): string; - encodeFunctionData(functionFragment: "shouldValidateIncreaseOrder", values?: undefined): string; - encodeFunctionData(functionFragment: "vault", values?: undefined): string; - encodeFunctionData(functionFragment: "weth", values?: undefined): string; - encodeFunctionData(functionFragment: "withdrawFees", values: [AddressLike, AddressLike]): string; - - decodeFunctionResult(functionFragment: "BASIS_POINTS_DIVISOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePositionAndSwap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePositionAndSwapETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePositionETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "depositFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeDecreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeIncreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeSwapOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "feeReserves", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inLegacyMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePositionBufferBps", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePositionETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isLiquidator", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isOrderKeeper", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isPartner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "liquidatePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxGlobalLongSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxGlobalShortSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderBook", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "referralStorage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendValue", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setDepositFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInLegacyMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIncreasePositionBufferBps", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setLiquidator", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxGlobalSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setOrderKeeper", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setPartner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setReferralStorage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setShouldValidateIncreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "shouldValidateIncreaseOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawFees", data: BytesLike): Result; -} - -export namespace DecreasePositionReferralEvent { - export type InputTuple = [ - account: AddressLike, - sizeDelta: BigNumberish, - marginFeeBasisPoints: BigNumberish, - referralCode: BytesLike, - referrer: AddressLike, - ]; - export type OutputTuple = [ - account: string, - sizeDelta: bigint, - marginFeeBasisPoints: bigint, - referralCode: string, - referrer: string, - ]; - export interface OutputObject { - account: string; - sizeDelta: bigint; - marginFeeBasisPoints: bigint; - referralCode: string; - referrer: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreasePositionReferralEvent { - export type InputTuple = [ - account: AddressLike, - sizeDelta: BigNumberish, - marginFeeBasisPoints: BigNumberish, - referralCode: BytesLike, - referrer: AddressLike, - ]; - export type OutputTuple = [ - account: string, - sizeDelta: bigint, - marginFeeBasisPoints: bigint, - referralCode: string, - referrer: string, - ]; - export interface OutputObject { - account: string; - sizeDelta: bigint; - marginFeeBasisPoints: bigint; - referralCode: string; - referrer: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetAdminEvent { - export type InputTuple = [admin: AddressLike]; - export type OutputTuple = [admin: string]; - export interface OutputObject { - admin: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetDepositFeeEvent { - export type InputTuple = [depositFee: BigNumberish]; - export type OutputTuple = [depositFee: bigint]; - export interface OutputObject { - depositFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetInLegacyModeEvent { - export type InputTuple = [inLegacyMode: boolean]; - export type OutputTuple = [inLegacyMode: boolean]; - export interface OutputObject { - inLegacyMode: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetIncreasePositionBufferBpsEvent { - export type InputTuple = [increasePositionBufferBps: BigNumberish]; - export type OutputTuple = [increasePositionBufferBps: bigint]; - export interface OutputObject { - increasePositionBufferBps: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetLiquidatorEvent { - export type InputTuple = [account: AddressLike, isActive: boolean]; - export type OutputTuple = [account: string, isActive: boolean]; - export interface OutputObject { - account: string; - isActive: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetMaxGlobalSizesEvent { - export type InputTuple = [tokens: AddressLike[], longSizes: BigNumberish[], shortSizes: BigNumberish[]]; - export type OutputTuple = [tokens: string[], longSizes: bigint[], shortSizes: bigint[]]; - export interface OutputObject { - tokens: string[]; - longSizes: bigint[]; - shortSizes: bigint[]; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetOrderKeeperEvent { - export type InputTuple = [account: AddressLike, isActive: boolean]; - export type OutputTuple = [account: string, isActive: boolean]; - export interface OutputObject { - account: string; - isActive: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetPartnerEvent { - export type InputTuple = [account: AddressLike, isActive: boolean]; - export type OutputTuple = [account: string, isActive: boolean]; - export interface OutputObject { - account: string; - isActive: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetReferralStorageEvent { - export type InputTuple = [referralStorage: AddressLike]; - export type OutputTuple = [referralStorage: string]; - export interface OutputObject { - referralStorage: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetShouldValidateIncreaseOrderEvent { - export type InputTuple = [shouldValidateIncreaseOrder: boolean]; - export type OutputTuple = [shouldValidateIncreaseOrder: boolean]; - export interface OutputObject { - shouldValidateIncreaseOrder: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace WithdrawFeesEvent { - export type InputTuple = [token: AddressLike, receiver: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, receiver: string, amount: bigint]; - export interface OutputObject { - token: string; - receiver: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface PositionManager extends BaseContract { - connect(runner?: ContractRunner | null): PositionManager; - waitForDeployment(): Promise; - - interface: PositionManagerInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - BASIS_POINTS_DIVISOR: TypedContractMethod<[], [bigint], "view">; - - admin: TypedContractMethod<[], [string], "view">; - - approve: TypedContractMethod< - [_token: AddressLike, _spender: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - decreasePosition: TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - - decreasePositionAndSwap: TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - _minOut: BigNumberish, - ], - [void], - "nonpayable" - >; - - decreasePositionAndSwapETH: TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - _minOut: BigNumberish, - ], - [void], - "nonpayable" - >; - - decreasePositionETH: TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - - depositFee: TypedContractMethod<[], [bigint], "view">; - - executeDecreaseOrder: TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - - executeIncreaseOrder: TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - - executeSwapOrder: TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - - feeReserves: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - inLegacyMode: TypedContractMethod<[], [boolean], "view">; - - increasePosition: TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _amountIn: BigNumberish, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - - increasePositionBufferBps: TypedContractMethod<[], [bigint], "view">; - - increasePositionETH: TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "payable" - >; - - isLiquidator: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isOrderKeeper: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isPartner: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - liquidatePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _feeReceiver: AddressLike, - ], - [void], - "nonpayable" - >; - - maxGlobalLongSizes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - maxGlobalShortSizes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - orderBook: TypedContractMethod<[], [string], "view">; - - referralStorage: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendValue: TypedContractMethod<[_receiver: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - setAdmin: TypedContractMethod<[_admin: AddressLike], [void], "nonpayable">; - - setDepositFee: TypedContractMethod<[_depositFee: BigNumberish], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setInLegacyMode: TypedContractMethod<[_inLegacyMode: boolean], [void], "nonpayable">; - - setIncreasePositionBufferBps: TypedContractMethod<[_increasePositionBufferBps: BigNumberish], [void], "nonpayable">; - - setLiquidator: TypedContractMethod<[_account: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setMaxGlobalSizes: TypedContractMethod< - [_tokens: AddressLike[], _longSizes: BigNumberish[], _shortSizes: BigNumberish[]], - [void], - "nonpayable" - >; - - setOrderKeeper: TypedContractMethod<[_account: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setPartner: TypedContractMethod<[_account: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setReferralStorage: TypedContractMethod<[_referralStorage: AddressLike], [void], "nonpayable">; - - setShouldValidateIncreaseOrder: TypedContractMethod<[_shouldValidateIncreaseOrder: boolean], [void], "nonpayable">; - - shouldValidateIncreaseOrder: TypedContractMethod<[], [boolean], "view">; - - vault: TypedContractMethod<[], [string], "view">; - - weth: TypedContractMethod<[], [string], "view">; - - withdrawFees: TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "BASIS_POINTS_DIVISOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "admin"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[_token: AddressLike, _spender: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "decreasePosition" - ): TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "decreasePositionAndSwap" - ): TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - _minOut: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "decreasePositionAndSwapETH" - ): TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - _minOut: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "decreasePositionETH" - ): TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "depositFee"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "executeDecreaseOrder" - ): TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "executeIncreaseOrder" - ): TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "executeSwapOrder" - ): TypedContractMethod< - [_account: AddressLike, _orderIndex: BigNumberish, _feeReceiver: AddressLike], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "feeReserves"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "inLegacyMode"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "increasePosition" - ): TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _amountIn: BigNumberish, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "increasePositionBufferBps"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "increasePositionETH" - ): TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "payable" - >; - getFunction(nameOrSignature: "isLiquidator"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isOrderKeeper"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isPartner"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "liquidatePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _feeReceiver: AddressLike, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "maxGlobalLongSizes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "maxGlobalShortSizes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "orderBook"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "referralStorage"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendValue" - ): TypedContractMethod<[_receiver: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "setAdmin"): TypedContractMethod<[_admin: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setDepositFee"): TypedContractMethod<[_depositFee: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setInLegacyMode"): TypedContractMethod<[_inLegacyMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setIncreasePositionBufferBps" - ): TypedContractMethod<[_increasePositionBufferBps: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setLiquidator" - ): TypedContractMethod<[_account: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxGlobalSizes" - ): TypedContractMethod< - [_tokens: AddressLike[], _longSizes: BigNumberish[], _shortSizes: BigNumberish[]], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setOrderKeeper" - ): TypedContractMethod<[_account: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setPartner" - ): TypedContractMethod<[_account: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setReferralStorage" - ): TypedContractMethod<[_referralStorage: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setShouldValidateIncreaseOrder" - ): TypedContractMethod<[_shouldValidateIncreaseOrder: boolean], [void], "nonpayable">; - getFunction(nameOrSignature: "shouldValidateIncreaseOrder"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "vault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "weth"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "withdrawFees" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - - getEvent( - key: "DecreasePositionReferral" - ): TypedContractEvent< - DecreasePositionReferralEvent.InputTuple, - DecreasePositionReferralEvent.OutputTuple, - DecreasePositionReferralEvent.OutputObject - >; - getEvent( - key: "IncreasePositionReferral" - ): TypedContractEvent< - IncreasePositionReferralEvent.InputTuple, - IncreasePositionReferralEvent.OutputTuple, - IncreasePositionReferralEvent.OutputObject - >; - getEvent( - key: "SetAdmin" - ): TypedContractEvent; - getEvent( - key: "SetDepositFee" - ): TypedContractEvent; - getEvent( - key: "SetInLegacyMode" - ): TypedContractEvent< - SetInLegacyModeEvent.InputTuple, - SetInLegacyModeEvent.OutputTuple, - SetInLegacyModeEvent.OutputObject - >; - getEvent( - key: "SetIncreasePositionBufferBps" - ): TypedContractEvent< - SetIncreasePositionBufferBpsEvent.InputTuple, - SetIncreasePositionBufferBpsEvent.OutputTuple, - SetIncreasePositionBufferBpsEvent.OutputObject - >; - getEvent( - key: "SetLiquidator" - ): TypedContractEvent; - getEvent( - key: "SetMaxGlobalSizes" - ): TypedContractEvent< - SetMaxGlobalSizesEvent.InputTuple, - SetMaxGlobalSizesEvent.OutputTuple, - SetMaxGlobalSizesEvent.OutputObject - >; - getEvent( - key: "SetOrderKeeper" - ): TypedContractEvent< - SetOrderKeeperEvent.InputTuple, - SetOrderKeeperEvent.OutputTuple, - SetOrderKeeperEvent.OutputObject - >; - getEvent( - key: "SetPartner" - ): TypedContractEvent; - getEvent( - key: "SetReferralStorage" - ): TypedContractEvent< - SetReferralStorageEvent.InputTuple, - SetReferralStorageEvent.OutputTuple, - SetReferralStorageEvent.OutputObject - >; - getEvent( - key: "SetShouldValidateIncreaseOrder" - ): TypedContractEvent< - SetShouldValidateIncreaseOrderEvent.InputTuple, - SetShouldValidateIncreaseOrderEvent.OutputTuple, - SetShouldValidateIncreaseOrderEvent.OutputObject - >; - getEvent( - key: "WithdrawFees" - ): TypedContractEvent; - - filters: { - "DecreasePositionReferral(address,uint256,uint256,bytes32,address)": TypedContractEvent< - DecreasePositionReferralEvent.InputTuple, - DecreasePositionReferralEvent.OutputTuple, - DecreasePositionReferralEvent.OutputObject - >; - DecreasePositionReferral: TypedContractEvent< - DecreasePositionReferralEvent.InputTuple, - DecreasePositionReferralEvent.OutputTuple, - DecreasePositionReferralEvent.OutputObject - >; - - "IncreasePositionReferral(address,uint256,uint256,bytes32,address)": TypedContractEvent< - IncreasePositionReferralEvent.InputTuple, - IncreasePositionReferralEvent.OutputTuple, - IncreasePositionReferralEvent.OutputObject - >; - IncreasePositionReferral: TypedContractEvent< - IncreasePositionReferralEvent.InputTuple, - IncreasePositionReferralEvent.OutputTuple, - IncreasePositionReferralEvent.OutputObject - >; - - "SetAdmin(address)": TypedContractEvent< - SetAdminEvent.InputTuple, - SetAdminEvent.OutputTuple, - SetAdminEvent.OutputObject - >; - SetAdmin: TypedContractEvent; - - "SetDepositFee(uint256)": TypedContractEvent< - SetDepositFeeEvent.InputTuple, - SetDepositFeeEvent.OutputTuple, - SetDepositFeeEvent.OutputObject - >; - SetDepositFee: TypedContractEvent< - SetDepositFeeEvent.InputTuple, - SetDepositFeeEvent.OutputTuple, - SetDepositFeeEvent.OutputObject - >; - - "SetInLegacyMode(bool)": TypedContractEvent< - SetInLegacyModeEvent.InputTuple, - SetInLegacyModeEvent.OutputTuple, - SetInLegacyModeEvent.OutputObject - >; - SetInLegacyMode: TypedContractEvent< - SetInLegacyModeEvent.InputTuple, - SetInLegacyModeEvent.OutputTuple, - SetInLegacyModeEvent.OutputObject - >; - - "SetIncreasePositionBufferBps(uint256)": TypedContractEvent< - SetIncreasePositionBufferBpsEvent.InputTuple, - SetIncreasePositionBufferBpsEvent.OutputTuple, - SetIncreasePositionBufferBpsEvent.OutputObject - >; - SetIncreasePositionBufferBps: TypedContractEvent< - SetIncreasePositionBufferBpsEvent.InputTuple, - SetIncreasePositionBufferBpsEvent.OutputTuple, - SetIncreasePositionBufferBpsEvent.OutputObject - >; - - "SetLiquidator(address,bool)": TypedContractEvent< - SetLiquidatorEvent.InputTuple, - SetLiquidatorEvent.OutputTuple, - SetLiquidatorEvent.OutputObject - >; - SetLiquidator: TypedContractEvent< - SetLiquidatorEvent.InputTuple, - SetLiquidatorEvent.OutputTuple, - SetLiquidatorEvent.OutputObject - >; - - "SetMaxGlobalSizes(address[],uint256[],uint256[])": TypedContractEvent< - SetMaxGlobalSizesEvent.InputTuple, - SetMaxGlobalSizesEvent.OutputTuple, - SetMaxGlobalSizesEvent.OutputObject - >; - SetMaxGlobalSizes: TypedContractEvent< - SetMaxGlobalSizesEvent.InputTuple, - SetMaxGlobalSizesEvent.OutputTuple, - SetMaxGlobalSizesEvent.OutputObject - >; - - "SetOrderKeeper(address,bool)": TypedContractEvent< - SetOrderKeeperEvent.InputTuple, - SetOrderKeeperEvent.OutputTuple, - SetOrderKeeperEvent.OutputObject - >; - SetOrderKeeper: TypedContractEvent< - SetOrderKeeperEvent.InputTuple, - SetOrderKeeperEvent.OutputTuple, - SetOrderKeeperEvent.OutputObject - >; - - "SetPartner(address,bool)": TypedContractEvent< - SetPartnerEvent.InputTuple, - SetPartnerEvent.OutputTuple, - SetPartnerEvent.OutputObject - >; - SetPartner: TypedContractEvent< - SetPartnerEvent.InputTuple, - SetPartnerEvent.OutputTuple, - SetPartnerEvent.OutputObject - >; - - "SetReferralStorage(address)": TypedContractEvent< - SetReferralStorageEvent.InputTuple, - SetReferralStorageEvent.OutputTuple, - SetReferralStorageEvent.OutputObject - >; - SetReferralStorage: TypedContractEvent< - SetReferralStorageEvent.InputTuple, - SetReferralStorageEvent.OutputTuple, - SetReferralStorageEvent.OutputObject - >; - - "SetShouldValidateIncreaseOrder(bool)": TypedContractEvent< - SetShouldValidateIncreaseOrderEvent.InputTuple, - SetShouldValidateIncreaseOrderEvent.OutputTuple, - SetShouldValidateIncreaseOrderEvent.OutputObject - >; - SetShouldValidateIncreaseOrder: TypedContractEvent< - SetShouldValidateIncreaseOrderEvent.InputTuple, - SetShouldValidateIncreaseOrderEvent.OutputTuple, - SetShouldValidateIncreaseOrderEvent.OutputObject - >; - - "WithdrawFees(address,address,uint256)": TypedContractEvent< - WithdrawFeesEvent.InputTuple, - WithdrawFeesEvent.OutputTuple, - WithdrawFeesEvent.OutputObject - >; - WithdrawFees: TypedContractEvent< - WithdrawFeesEvent.InputTuple, - WithdrawFeesEvent.OutputTuple, - WithdrawFeesEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/PositionRouter.ts b/src/typechain-types/PositionRouter.ts deleted file mode 100644 index 5e10d3c3e3..0000000000 --- a/src/typechain-types/PositionRouter.ts +++ /dev/null @@ -1,1634 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface PositionRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "BASIS_POINTS_DIVISOR" - | "admin" - | "approve" - | "callbackGasLimit" - | "cancelDecreasePosition" - | "cancelIncreasePosition" - | "createDecreasePosition" - | "createIncreasePosition" - | "createIncreasePositionETH" - | "decreasePositionRequestKeys" - | "decreasePositionRequestKeysStart" - | "decreasePositionRequests" - | "decreasePositionsIndex" - | "depositFee" - | "executeDecreasePosition" - | "executeDecreasePositions" - | "executeIncreasePosition" - | "executeIncreasePositions" - | "feeReserves" - | "getDecreasePositionRequestPath" - | "getIncreasePositionRequestPath" - | "getRequestKey" - | "getRequestQueueLengths" - | "gov" - | "increasePositionBufferBps" - | "increasePositionRequestKeys" - | "increasePositionRequestKeysStart" - | "increasePositionRequests" - | "increasePositionsIndex" - | "isLeverageEnabled" - | "isPositionKeeper" - | "maxGlobalLongSizes" - | "maxGlobalShortSizes" - | "maxTimeDelay" - | "minBlockDelayKeeper" - | "minExecutionFee" - | "minTimeDelayPublic" - | "referralStorage" - | "router" - | "sendValue" - | "setAdmin" - | "setCallbackGasLimit" - | "setDelayValues" - | "setDepositFee" - | "setGov" - | "setIncreasePositionBufferBps" - | "setIsLeverageEnabled" - | "setMaxGlobalSizes" - | "setMinExecutionFee" - | "setPositionKeeper" - | "setReferralStorage" - | "setRequestKeysStartValues" - | "shortsTracker" - | "vault" - | "weth" - | "withdrawFees" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: - | "Callback" - | "CancelDecreasePosition" - | "CancelIncreasePosition" - | "CreateDecreasePosition" - | "CreateIncreasePosition" - | "DecreasePositionReferral" - | "ExecuteDecreasePosition" - | "ExecuteIncreasePosition" - | "IncreasePositionReferral" - | "SetAdmin" - | "SetCallbackGasLimit" - | "SetDelayValues" - | "SetDepositFee" - | "SetIncreasePositionBufferBps" - | "SetIsLeverageEnabled" - | "SetMaxGlobalSizes" - | "SetMinExecutionFee" - | "SetPositionKeeper" - | "SetReferralStorage" - | "SetRequestKeysStartValues" - | "WithdrawFees" - ): EventFragment; - - encodeFunctionData(functionFragment: "BASIS_POINTS_DIVISOR", values?: undefined): string; - encodeFunctionData(functionFragment: "admin", values?: undefined): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "callbackGasLimit", values?: undefined): string; - encodeFunctionData(functionFragment: "cancelDecreasePosition", values: [BytesLike, AddressLike]): string; - encodeFunctionData(functionFragment: "cancelIncreasePosition", values: [BytesLike, AddressLike]): string; - encodeFunctionData( - functionFragment: "createDecreasePosition", - values: [ - AddressLike[], - AddressLike, - BigNumberish, - BigNumberish, - boolean, - AddressLike, - BigNumberish, - BigNumberish, - BigNumberish, - boolean, - AddressLike, - ] - ): string; - encodeFunctionData( - functionFragment: "createIncreasePosition", - values: [ - AddressLike[], - AddressLike, - BigNumberish, - BigNumberish, - BigNumberish, - boolean, - BigNumberish, - BigNumberish, - BytesLike, - AddressLike, - ] - ): string; - encodeFunctionData( - functionFragment: "createIncreasePositionETH", - values: [ - AddressLike[], - AddressLike, - BigNumberish, - BigNumberish, - boolean, - BigNumberish, - BigNumberish, - BytesLike, - AddressLike, - ] - ): string; - encodeFunctionData(functionFragment: "decreasePositionRequestKeys", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "decreasePositionRequestKeysStart", values?: undefined): string; - encodeFunctionData(functionFragment: "decreasePositionRequests", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "decreasePositionsIndex", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "depositFee", values?: undefined): string; - encodeFunctionData(functionFragment: "executeDecreasePosition", values: [BytesLike, AddressLike]): string; - encodeFunctionData(functionFragment: "executeDecreasePositions", values: [BigNumberish, AddressLike]): string; - encodeFunctionData(functionFragment: "executeIncreasePosition", values: [BytesLike, AddressLike]): string; - encodeFunctionData(functionFragment: "executeIncreasePositions", values: [BigNumberish, AddressLike]): string; - encodeFunctionData(functionFragment: "feeReserves", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getDecreasePositionRequestPath", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getIncreasePositionRequestPath", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getRequestKey", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "getRequestQueueLengths", values?: undefined): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "increasePositionBufferBps", values?: undefined): string; - encodeFunctionData(functionFragment: "increasePositionRequestKeys", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "increasePositionRequestKeysStart", values?: undefined): string; - encodeFunctionData(functionFragment: "increasePositionRequests", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "increasePositionsIndex", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isLeverageEnabled", values?: undefined): string; - encodeFunctionData(functionFragment: "isPositionKeeper", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "maxGlobalLongSizes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "maxGlobalShortSizes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "maxTimeDelay", values?: undefined): string; - encodeFunctionData(functionFragment: "minBlockDelayKeeper", values?: undefined): string; - encodeFunctionData(functionFragment: "minExecutionFee", values?: undefined): string; - encodeFunctionData(functionFragment: "minTimeDelayPublic", values?: undefined): string; - encodeFunctionData(functionFragment: "referralStorage", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendValue", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setAdmin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setCallbackGasLimit", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setDelayValues", values: [BigNumberish, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "setDepositFee", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setIncreasePositionBufferBps", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setIsLeverageEnabled", values: [boolean]): string; - encodeFunctionData( - functionFragment: "setMaxGlobalSizes", - values: [AddressLike[], BigNumberish[], BigNumberish[]] - ): string; - encodeFunctionData(functionFragment: "setMinExecutionFee", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setPositionKeeper", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setReferralStorage", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setRequestKeysStartValues", values: [BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "shortsTracker", values?: undefined): string; - encodeFunctionData(functionFragment: "vault", values?: undefined): string; - encodeFunctionData(functionFragment: "weth", values?: undefined): string; - encodeFunctionData(functionFragment: "withdrawFees", values: [AddressLike, AddressLike]): string; - - decodeFunctionResult(functionFragment: "BASIS_POINTS_DIVISOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "callbackGasLimit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelDecreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelIncreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createDecreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createIncreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createIncreasePositionETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePositionRequestKeys", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePositionRequestKeysStart", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePositionRequests", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePositionsIndex", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "depositFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeDecreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeDecreasePositions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeIncreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "executeIncreasePositions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "feeReserves", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getDecreasePositionRequestPath", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getIncreasePositionRequestPath", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getRequestKey", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getRequestQueueLengths", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePositionBufferBps", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePositionRequestKeys", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePositionRequestKeysStart", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePositionRequests", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePositionsIndex", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isLeverageEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isPositionKeeper", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxGlobalLongSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxGlobalShortSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxTimeDelay", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minBlockDelayKeeper", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minExecutionFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minTimeDelayPublic", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "referralStorage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendValue", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setCallbackGasLimit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setDelayValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setDepositFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIncreasePositionBufferBps", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIsLeverageEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxGlobalSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMinExecutionFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setPositionKeeper", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setReferralStorage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setRequestKeysStartValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "shortsTracker", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawFees", data: BytesLike): Result; -} - -export namespace CallbackEvent { - export type InputTuple = [callbackTarget: AddressLike, success: boolean]; - export type OutputTuple = [callbackTarget: string, success: boolean]; - export interface OutputObject { - callbackTarget: string; - success: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CancelDecreasePositionEvent { - export type InputTuple = [ - account: AddressLike, - path: AddressLike[], - indexToken: AddressLike, - collateralDelta: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - receiver: AddressLike, - acceptablePrice: BigNumberish, - minOut: BigNumberish, - executionFee: BigNumberish, - blockGap: BigNumberish, - timeGap: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - path: string[], - indexToken: string, - collateralDelta: bigint, - sizeDelta: bigint, - isLong: boolean, - receiver: string, - acceptablePrice: bigint, - minOut: bigint, - executionFee: bigint, - blockGap: bigint, - timeGap: bigint, - ]; - export interface OutputObject { - account: string; - path: string[]; - indexToken: string; - collateralDelta: bigint; - sizeDelta: bigint; - isLong: boolean; - receiver: string; - acceptablePrice: bigint; - minOut: bigint; - executionFee: bigint; - blockGap: bigint; - timeGap: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CancelIncreasePositionEvent { - export type InputTuple = [ - account: AddressLike, - path: AddressLike[], - indexToken: AddressLike, - amountIn: BigNumberish, - minOut: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - acceptablePrice: BigNumberish, - executionFee: BigNumberish, - blockGap: BigNumberish, - timeGap: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - path: string[], - indexToken: string, - amountIn: bigint, - minOut: bigint, - sizeDelta: bigint, - isLong: boolean, - acceptablePrice: bigint, - executionFee: bigint, - blockGap: bigint, - timeGap: bigint, - ]; - export interface OutputObject { - account: string; - path: string[]; - indexToken: string; - amountIn: bigint; - minOut: bigint; - sizeDelta: bigint; - isLong: boolean; - acceptablePrice: bigint; - executionFee: bigint; - blockGap: bigint; - timeGap: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CreateDecreasePositionEvent { - export type InputTuple = [ - account: AddressLike, - path: AddressLike[], - indexToken: AddressLike, - collateralDelta: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - receiver: AddressLike, - acceptablePrice: BigNumberish, - minOut: BigNumberish, - executionFee: BigNumberish, - index: BigNumberish, - queueIndex: BigNumberish, - blockNumber: BigNumberish, - blockTime: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - path: string[], - indexToken: string, - collateralDelta: bigint, - sizeDelta: bigint, - isLong: boolean, - receiver: string, - acceptablePrice: bigint, - minOut: bigint, - executionFee: bigint, - index: bigint, - queueIndex: bigint, - blockNumber: bigint, - blockTime: bigint, - ]; - export interface OutputObject { - account: string; - path: string[]; - indexToken: string; - collateralDelta: bigint; - sizeDelta: bigint; - isLong: boolean; - receiver: string; - acceptablePrice: bigint; - minOut: bigint; - executionFee: bigint; - index: bigint; - queueIndex: bigint; - blockNumber: bigint; - blockTime: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CreateIncreasePositionEvent { - export type InputTuple = [ - account: AddressLike, - path: AddressLike[], - indexToken: AddressLike, - amountIn: BigNumberish, - minOut: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - acceptablePrice: BigNumberish, - executionFee: BigNumberish, - index: BigNumberish, - queueIndex: BigNumberish, - blockNumber: BigNumberish, - blockTime: BigNumberish, - gasPrice: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - path: string[], - indexToken: string, - amountIn: bigint, - minOut: bigint, - sizeDelta: bigint, - isLong: boolean, - acceptablePrice: bigint, - executionFee: bigint, - index: bigint, - queueIndex: bigint, - blockNumber: bigint, - blockTime: bigint, - gasPrice: bigint, - ]; - export interface OutputObject { - account: string; - path: string[]; - indexToken: string; - amountIn: bigint; - minOut: bigint; - sizeDelta: bigint; - isLong: boolean; - acceptablePrice: bigint; - executionFee: bigint; - index: bigint; - queueIndex: bigint; - blockNumber: bigint; - blockTime: bigint; - gasPrice: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreasePositionReferralEvent { - export type InputTuple = [ - account: AddressLike, - sizeDelta: BigNumberish, - marginFeeBasisPoints: BigNumberish, - referralCode: BytesLike, - referrer: AddressLike, - ]; - export type OutputTuple = [ - account: string, - sizeDelta: bigint, - marginFeeBasisPoints: bigint, - referralCode: string, - referrer: string, - ]; - export interface OutputObject { - account: string; - sizeDelta: bigint; - marginFeeBasisPoints: bigint; - referralCode: string; - referrer: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace ExecuteDecreasePositionEvent { - export type InputTuple = [ - account: AddressLike, - path: AddressLike[], - indexToken: AddressLike, - collateralDelta: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - receiver: AddressLike, - acceptablePrice: BigNumberish, - minOut: BigNumberish, - executionFee: BigNumberish, - blockGap: BigNumberish, - timeGap: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - path: string[], - indexToken: string, - collateralDelta: bigint, - sizeDelta: bigint, - isLong: boolean, - receiver: string, - acceptablePrice: bigint, - minOut: bigint, - executionFee: bigint, - blockGap: bigint, - timeGap: bigint, - ]; - export interface OutputObject { - account: string; - path: string[]; - indexToken: string; - collateralDelta: bigint; - sizeDelta: bigint; - isLong: boolean; - receiver: string; - acceptablePrice: bigint; - minOut: bigint; - executionFee: bigint; - blockGap: bigint; - timeGap: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace ExecuteIncreasePositionEvent { - export type InputTuple = [ - account: AddressLike, - path: AddressLike[], - indexToken: AddressLike, - amountIn: BigNumberish, - minOut: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - acceptablePrice: BigNumberish, - executionFee: BigNumberish, - blockGap: BigNumberish, - timeGap: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - path: string[], - indexToken: string, - amountIn: bigint, - minOut: bigint, - sizeDelta: bigint, - isLong: boolean, - acceptablePrice: bigint, - executionFee: bigint, - blockGap: bigint, - timeGap: bigint, - ]; - export interface OutputObject { - account: string; - path: string[]; - indexToken: string; - amountIn: bigint; - minOut: bigint; - sizeDelta: bigint; - isLong: boolean; - acceptablePrice: bigint; - executionFee: bigint; - blockGap: bigint; - timeGap: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreasePositionReferralEvent { - export type InputTuple = [ - account: AddressLike, - sizeDelta: BigNumberish, - marginFeeBasisPoints: BigNumberish, - referralCode: BytesLike, - referrer: AddressLike, - ]; - export type OutputTuple = [ - account: string, - sizeDelta: bigint, - marginFeeBasisPoints: bigint, - referralCode: string, - referrer: string, - ]; - export interface OutputObject { - account: string; - sizeDelta: bigint; - marginFeeBasisPoints: bigint; - referralCode: string; - referrer: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetAdminEvent { - export type InputTuple = [admin: AddressLike]; - export type OutputTuple = [admin: string]; - export interface OutputObject { - admin: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetCallbackGasLimitEvent { - export type InputTuple = [callbackGasLimit: BigNumberish]; - export type OutputTuple = [callbackGasLimit: bigint]; - export interface OutputObject { - callbackGasLimit: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetDelayValuesEvent { - export type InputTuple = [ - minBlockDelayKeeper: BigNumberish, - minTimeDelayPublic: BigNumberish, - maxTimeDelay: BigNumberish, - ]; - export type OutputTuple = [minBlockDelayKeeper: bigint, minTimeDelayPublic: bigint, maxTimeDelay: bigint]; - export interface OutputObject { - minBlockDelayKeeper: bigint; - minTimeDelayPublic: bigint; - maxTimeDelay: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetDepositFeeEvent { - export type InputTuple = [depositFee: BigNumberish]; - export type OutputTuple = [depositFee: bigint]; - export interface OutputObject { - depositFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetIncreasePositionBufferBpsEvent { - export type InputTuple = [increasePositionBufferBps: BigNumberish]; - export type OutputTuple = [increasePositionBufferBps: bigint]; - export interface OutputObject { - increasePositionBufferBps: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetIsLeverageEnabledEvent { - export type InputTuple = [isLeverageEnabled: boolean]; - export type OutputTuple = [isLeverageEnabled: boolean]; - export interface OutputObject { - isLeverageEnabled: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetMaxGlobalSizesEvent { - export type InputTuple = [tokens: AddressLike[], longSizes: BigNumberish[], shortSizes: BigNumberish[]]; - export type OutputTuple = [tokens: string[], longSizes: bigint[], shortSizes: bigint[]]; - export interface OutputObject { - tokens: string[]; - longSizes: bigint[]; - shortSizes: bigint[]; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetMinExecutionFeeEvent { - export type InputTuple = [minExecutionFee: BigNumberish]; - export type OutputTuple = [minExecutionFee: bigint]; - export interface OutputObject { - minExecutionFee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetPositionKeeperEvent { - export type InputTuple = [account: AddressLike, isActive: boolean]; - export type OutputTuple = [account: string, isActive: boolean]; - export interface OutputObject { - account: string; - isActive: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetReferralStorageEvent { - export type InputTuple = [referralStorage: AddressLike]; - export type OutputTuple = [referralStorage: string]; - export interface OutputObject { - referralStorage: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetRequestKeysStartValuesEvent { - export type InputTuple = [ - increasePositionRequestKeysStart: BigNumberish, - decreasePositionRequestKeysStart: BigNumberish, - ]; - export type OutputTuple = [increasePositionRequestKeysStart: bigint, decreasePositionRequestKeysStart: bigint]; - export interface OutputObject { - increasePositionRequestKeysStart: bigint; - decreasePositionRequestKeysStart: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace WithdrawFeesEvent { - export type InputTuple = [token: AddressLike, receiver: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, receiver: string, amount: bigint]; - export interface OutputObject { - token: string; - receiver: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface PositionRouter extends BaseContract { - connect(runner?: ContractRunner | null): PositionRouter; - waitForDeployment(): Promise; - - interface: PositionRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - BASIS_POINTS_DIVISOR: TypedContractMethod<[], [bigint], "view">; - - admin: TypedContractMethod<[], [string], "view">; - - approve: TypedContractMethod< - [_token: AddressLike, _spender: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - callbackGasLimit: TypedContractMethod<[], [bigint], "view">; - - cancelDecreasePosition: TypedContractMethod< - [_key: BytesLike, _executionFeeReceiver: AddressLike], - [boolean], - "nonpayable" - >; - - cancelIncreasePosition: TypedContractMethod< - [_key: BytesLike, _executionFeeReceiver: AddressLike], - [boolean], - "nonpayable" - >; - - createDecreasePosition: TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _acceptablePrice: BigNumberish, - _minOut: BigNumberish, - _executionFee: BigNumberish, - _withdrawETH: boolean, - _callbackTarget: AddressLike, - ], - [string], - "payable" - >; - - createIncreasePosition: TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _amountIn: BigNumberish, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _acceptablePrice: BigNumberish, - _executionFee: BigNumberish, - _referralCode: BytesLike, - _callbackTarget: AddressLike, - ], - [string], - "payable" - >; - - createIncreasePositionETH: TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _acceptablePrice: BigNumberish, - _executionFee: BigNumberish, - _referralCode: BytesLike, - _callbackTarget: AddressLike, - ], - [string], - "payable" - >; - - decreasePositionRequestKeys: TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - decreasePositionRequestKeysStart: TypedContractMethod<[], [bigint], "view">; - - decreasePositionRequests: TypedContractMethod< - [arg0: BytesLike], - [ - [string, string, bigint, bigint, boolean, string, bigint, bigint, bigint, bigint, bigint, boolean, string] & { - account: string; - indexToken: string; - collateralDelta: bigint; - sizeDelta: bigint; - isLong: boolean; - receiver: string; - acceptablePrice: bigint; - minOut: bigint; - executionFee: bigint; - blockNumber: bigint; - blockTime: bigint; - withdrawETH: boolean; - callbackTarget: string; - }, - ], - "view" - >; - - decreasePositionsIndex: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - depositFee: TypedContractMethod<[], [bigint], "view">; - - executeDecreasePosition: TypedContractMethod< - [_key: BytesLike, _executionFeeReceiver: AddressLike], - [boolean], - "nonpayable" - >; - - executeDecreasePositions: TypedContractMethod< - [_endIndex: BigNumberish, _executionFeeReceiver: AddressLike], - [void], - "nonpayable" - >; - - executeIncreasePosition: TypedContractMethod< - [_key: BytesLike, _executionFeeReceiver: AddressLike], - [boolean], - "nonpayable" - >; - - executeIncreasePositions: TypedContractMethod< - [_endIndex: BigNumberish, _executionFeeReceiver: AddressLike], - [void], - "nonpayable" - >; - - feeReserves: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - getDecreasePositionRequestPath: TypedContractMethod<[_key: BytesLike], [string[]], "view">; - - getIncreasePositionRequestPath: TypedContractMethod<[_key: BytesLike], [string[]], "view">; - - getRequestKey: TypedContractMethod<[_account: AddressLike, _index: BigNumberish], [string], "view">; - - getRequestQueueLengths: TypedContractMethod<[], [[bigint, bigint, bigint, bigint]], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - increasePositionBufferBps: TypedContractMethod<[], [bigint], "view">; - - increasePositionRequestKeys: TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - increasePositionRequestKeysStart: TypedContractMethod<[], [bigint], "view">; - - increasePositionRequests: TypedContractMethod< - [arg0: BytesLike], - [ - [string, string, bigint, bigint, bigint, boolean, bigint, bigint, bigint, bigint, boolean, string] & { - account: string; - indexToken: string; - amountIn: bigint; - minOut: bigint; - sizeDelta: bigint; - isLong: boolean; - acceptablePrice: bigint; - executionFee: bigint; - blockNumber: bigint; - blockTime: bigint; - hasCollateralInETH: boolean; - callbackTarget: string; - }, - ], - "view" - >; - - increasePositionsIndex: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - isLeverageEnabled: TypedContractMethod<[], [boolean], "view">; - - isPositionKeeper: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - maxGlobalLongSizes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - maxGlobalShortSizes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - maxTimeDelay: TypedContractMethod<[], [bigint], "view">; - - minBlockDelayKeeper: TypedContractMethod<[], [bigint], "view">; - - minExecutionFee: TypedContractMethod<[], [bigint], "view">; - - minTimeDelayPublic: TypedContractMethod<[], [bigint], "view">; - - referralStorage: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendValue: TypedContractMethod<[_receiver: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - setAdmin: TypedContractMethod<[_admin: AddressLike], [void], "nonpayable">; - - setCallbackGasLimit: TypedContractMethod<[_callbackGasLimit: BigNumberish], [void], "nonpayable">; - - setDelayValues: TypedContractMethod< - [_minBlockDelayKeeper: BigNumberish, _minTimeDelayPublic: BigNumberish, _maxTimeDelay: BigNumberish], - [void], - "nonpayable" - >; - - setDepositFee: TypedContractMethod<[_depositFee: BigNumberish], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setIncreasePositionBufferBps: TypedContractMethod<[_increasePositionBufferBps: BigNumberish], [void], "nonpayable">; - - setIsLeverageEnabled: TypedContractMethod<[_isLeverageEnabled: boolean], [void], "nonpayable">; - - setMaxGlobalSizes: TypedContractMethod< - [_tokens: AddressLike[], _longSizes: BigNumberish[], _shortSizes: BigNumberish[]], - [void], - "nonpayable" - >; - - setMinExecutionFee: TypedContractMethod<[_minExecutionFee: BigNumberish], [void], "nonpayable">; - - setPositionKeeper: TypedContractMethod<[_account: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setReferralStorage: TypedContractMethod<[_referralStorage: AddressLike], [void], "nonpayable">; - - setRequestKeysStartValues: TypedContractMethod< - [_increasePositionRequestKeysStart: BigNumberish, _decreasePositionRequestKeysStart: BigNumberish], - [void], - "nonpayable" - >; - - shortsTracker: TypedContractMethod<[], [string], "view">; - - vault: TypedContractMethod<[], [string], "view">; - - weth: TypedContractMethod<[], [string], "view">; - - withdrawFees: TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "BASIS_POINTS_DIVISOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "admin"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[_token: AddressLike, _spender: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "callbackGasLimit"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "cancelDecreasePosition" - ): TypedContractMethod<[_key: BytesLike, _executionFeeReceiver: AddressLike], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "cancelIncreasePosition" - ): TypedContractMethod<[_key: BytesLike, _executionFeeReceiver: AddressLike], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "createDecreasePosition" - ): TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _acceptablePrice: BigNumberish, - _minOut: BigNumberish, - _executionFee: BigNumberish, - _withdrawETH: boolean, - _callbackTarget: AddressLike, - ], - [string], - "payable" - >; - getFunction( - nameOrSignature: "createIncreasePosition" - ): TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _amountIn: BigNumberish, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _acceptablePrice: BigNumberish, - _executionFee: BigNumberish, - _referralCode: BytesLike, - _callbackTarget: AddressLike, - ], - [string], - "payable" - >; - getFunction( - nameOrSignature: "createIncreasePositionETH" - ): TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _acceptablePrice: BigNumberish, - _executionFee: BigNumberish, - _referralCode: BytesLike, - _callbackTarget: AddressLike, - ], - [string], - "payable" - >; - getFunction( - nameOrSignature: "decreasePositionRequestKeys" - ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "decreasePositionRequestKeysStart"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "decreasePositionRequests"): TypedContractMethod< - [arg0: BytesLike], - [ - [string, string, bigint, bigint, boolean, string, bigint, bigint, bigint, bigint, bigint, boolean, string] & { - account: string; - indexToken: string; - collateralDelta: bigint; - sizeDelta: bigint; - isLong: boolean; - receiver: string; - acceptablePrice: bigint; - minOut: bigint; - executionFee: bigint; - blockNumber: bigint; - blockTime: bigint; - withdrawETH: boolean; - callbackTarget: string; - }, - ], - "view" - >; - getFunction(nameOrSignature: "decreasePositionsIndex"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "depositFee"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "executeDecreasePosition" - ): TypedContractMethod<[_key: BytesLike, _executionFeeReceiver: AddressLike], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "executeDecreasePositions" - ): TypedContractMethod<[_endIndex: BigNumberish, _executionFeeReceiver: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "executeIncreasePosition" - ): TypedContractMethod<[_key: BytesLike, _executionFeeReceiver: AddressLike], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "executeIncreasePositions" - ): TypedContractMethod<[_endIndex: BigNumberish, _executionFeeReceiver: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "feeReserves"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getDecreasePositionRequestPath" - ): TypedContractMethod<[_key: BytesLike], [string[]], "view">; - getFunction( - nameOrSignature: "getIncreasePositionRequestPath" - ): TypedContractMethod<[_key: BytesLike], [string[]], "view">; - getFunction( - nameOrSignature: "getRequestKey" - ): TypedContractMethod<[_account: AddressLike, _index: BigNumberish], [string], "view">; - getFunction( - nameOrSignature: "getRequestQueueLengths" - ): TypedContractMethod<[], [[bigint, bigint, bigint, bigint]], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "increasePositionBufferBps"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "increasePositionRequestKeys" - ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "increasePositionRequestKeysStart"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "increasePositionRequests"): TypedContractMethod< - [arg0: BytesLike], - [ - [string, string, bigint, bigint, bigint, boolean, bigint, bigint, bigint, bigint, boolean, string] & { - account: string; - indexToken: string; - amountIn: bigint; - minOut: bigint; - sizeDelta: bigint; - isLong: boolean; - acceptablePrice: bigint; - executionFee: bigint; - blockNumber: bigint; - blockTime: bigint; - hasCollateralInETH: boolean; - callbackTarget: string; - }, - ], - "view" - >; - getFunction(nameOrSignature: "increasePositionsIndex"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "isLeverageEnabled"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isPositionKeeper"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "maxGlobalLongSizes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "maxGlobalShortSizes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "maxTimeDelay"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "minBlockDelayKeeper"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "minExecutionFee"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "minTimeDelayPublic"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "referralStorage"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendValue" - ): TypedContractMethod<[_receiver: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "setAdmin"): TypedContractMethod<[_admin: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setCallbackGasLimit" - ): TypedContractMethod<[_callbackGasLimit: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setDelayValues" - ): TypedContractMethod< - [_minBlockDelayKeeper: BigNumberish, _minTimeDelayPublic: BigNumberish, _maxTimeDelay: BigNumberish], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "setDepositFee"): TypedContractMethod<[_depositFee: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setIncreasePositionBufferBps" - ): TypedContractMethod<[_increasePositionBufferBps: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setIsLeverageEnabled" - ): TypedContractMethod<[_isLeverageEnabled: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxGlobalSizes" - ): TypedContractMethod< - [_tokens: AddressLike[], _longSizes: BigNumberish[], _shortSizes: BigNumberish[]], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setMinExecutionFee" - ): TypedContractMethod<[_minExecutionFee: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setPositionKeeper" - ): TypedContractMethod<[_account: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setReferralStorage" - ): TypedContractMethod<[_referralStorage: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setRequestKeysStartValues" - ): TypedContractMethod< - [_increasePositionRequestKeysStart: BigNumberish, _decreasePositionRequestKeysStart: BigNumberish], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "shortsTracker"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "vault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "weth"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "withdrawFees" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - - getEvent( - key: "Callback" - ): TypedContractEvent; - getEvent( - key: "CancelDecreasePosition" - ): TypedContractEvent< - CancelDecreasePositionEvent.InputTuple, - CancelDecreasePositionEvent.OutputTuple, - CancelDecreasePositionEvent.OutputObject - >; - getEvent( - key: "CancelIncreasePosition" - ): TypedContractEvent< - CancelIncreasePositionEvent.InputTuple, - CancelIncreasePositionEvent.OutputTuple, - CancelIncreasePositionEvent.OutputObject - >; - getEvent( - key: "CreateDecreasePosition" - ): TypedContractEvent< - CreateDecreasePositionEvent.InputTuple, - CreateDecreasePositionEvent.OutputTuple, - CreateDecreasePositionEvent.OutputObject - >; - getEvent( - key: "CreateIncreasePosition" - ): TypedContractEvent< - CreateIncreasePositionEvent.InputTuple, - CreateIncreasePositionEvent.OutputTuple, - CreateIncreasePositionEvent.OutputObject - >; - getEvent( - key: "DecreasePositionReferral" - ): TypedContractEvent< - DecreasePositionReferralEvent.InputTuple, - DecreasePositionReferralEvent.OutputTuple, - DecreasePositionReferralEvent.OutputObject - >; - getEvent( - key: "ExecuteDecreasePosition" - ): TypedContractEvent< - ExecuteDecreasePositionEvent.InputTuple, - ExecuteDecreasePositionEvent.OutputTuple, - ExecuteDecreasePositionEvent.OutputObject - >; - getEvent( - key: "ExecuteIncreasePosition" - ): TypedContractEvent< - ExecuteIncreasePositionEvent.InputTuple, - ExecuteIncreasePositionEvent.OutputTuple, - ExecuteIncreasePositionEvent.OutputObject - >; - getEvent( - key: "IncreasePositionReferral" - ): TypedContractEvent< - IncreasePositionReferralEvent.InputTuple, - IncreasePositionReferralEvent.OutputTuple, - IncreasePositionReferralEvent.OutputObject - >; - getEvent( - key: "SetAdmin" - ): TypedContractEvent; - getEvent( - key: "SetCallbackGasLimit" - ): TypedContractEvent< - SetCallbackGasLimitEvent.InputTuple, - SetCallbackGasLimitEvent.OutputTuple, - SetCallbackGasLimitEvent.OutputObject - >; - getEvent( - key: "SetDelayValues" - ): TypedContractEvent< - SetDelayValuesEvent.InputTuple, - SetDelayValuesEvent.OutputTuple, - SetDelayValuesEvent.OutputObject - >; - getEvent( - key: "SetDepositFee" - ): TypedContractEvent; - getEvent( - key: "SetIncreasePositionBufferBps" - ): TypedContractEvent< - SetIncreasePositionBufferBpsEvent.InputTuple, - SetIncreasePositionBufferBpsEvent.OutputTuple, - SetIncreasePositionBufferBpsEvent.OutputObject - >; - getEvent( - key: "SetIsLeverageEnabled" - ): TypedContractEvent< - SetIsLeverageEnabledEvent.InputTuple, - SetIsLeverageEnabledEvent.OutputTuple, - SetIsLeverageEnabledEvent.OutputObject - >; - getEvent( - key: "SetMaxGlobalSizes" - ): TypedContractEvent< - SetMaxGlobalSizesEvent.InputTuple, - SetMaxGlobalSizesEvent.OutputTuple, - SetMaxGlobalSizesEvent.OutputObject - >; - getEvent( - key: "SetMinExecutionFee" - ): TypedContractEvent< - SetMinExecutionFeeEvent.InputTuple, - SetMinExecutionFeeEvent.OutputTuple, - SetMinExecutionFeeEvent.OutputObject - >; - getEvent( - key: "SetPositionKeeper" - ): TypedContractEvent< - SetPositionKeeperEvent.InputTuple, - SetPositionKeeperEvent.OutputTuple, - SetPositionKeeperEvent.OutputObject - >; - getEvent( - key: "SetReferralStorage" - ): TypedContractEvent< - SetReferralStorageEvent.InputTuple, - SetReferralStorageEvent.OutputTuple, - SetReferralStorageEvent.OutputObject - >; - getEvent( - key: "SetRequestKeysStartValues" - ): TypedContractEvent< - SetRequestKeysStartValuesEvent.InputTuple, - SetRequestKeysStartValuesEvent.OutputTuple, - SetRequestKeysStartValuesEvent.OutputObject - >; - getEvent( - key: "WithdrawFees" - ): TypedContractEvent; - - filters: { - "Callback(address,bool)": TypedContractEvent< - CallbackEvent.InputTuple, - CallbackEvent.OutputTuple, - CallbackEvent.OutputObject - >; - Callback: TypedContractEvent; - - "CancelDecreasePosition(address,address[],address,uint256,uint256,bool,address,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent< - CancelDecreasePositionEvent.InputTuple, - CancelDecreasePositionEvent.OutputTuple, - CancelDecreasePositionEvent.OutputObject - >; - CancelDecreasePosition: TypedContractEvent< - CancelDecreasePositionEvent.InputTuple, - CancelDecreasePositionEvent.OutputTuple, - CancelDecreasePositionEvent.OutputObject - >; - - "CancelIncreasePosition(address,address[],address,uint256,uint256,uint256,bool,uint256,uint256,uint256,uint256)": TypedContractEvent< - CancelIncreasePositionEvent.InputTuple, - CancelIncreasePositionEvent.OutputTuple, - CancelIncreasePositionEvent.OutputObject - >; - CancelIncreasePosition: TypedContractEvent< - CancelIncreasePositionEvent.InputTuple, - CancelIncreasePositionEvent.OutputTuple, - CancelIncreasePositionEvent.OutputObject - >; - - "CreateDecreasePosition(address,address[],address,uint256,uint256,bool,address,uint256,uint256,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent< - CreateDecreasePositionEvent.InputTuple, - CreateDecreasePositionEvent.OutputTuple, - CreateDecreasePositionEvent.OutputObject - >; - CreateDecreasePosition: TypedContractEvent< - CreateDecreasePositionEvent.InputTuple, - CreateDecreasePositionEvent.OutputTuple, - CreateDecreasePositionEvent.OutputObject - >; - - "CreateIncreasePosition(address,address[],address,uint256,uint256,uint256,bool,uint256,uint256,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent< - CreateIncreasePositionEvent.InputTuple, - CreateIncreasePositionEvent.OutputTuple, - CreateIncreasePositionEvent.OutputObject - >; - CreateIncreasePosition: TypedContractEvent< - CreateIncreasePositionEvent.InputTuple, - CreateIncreasePositionEvent.OutputTuple, - CreateIncreasePositionEvent.OutputObject - >; - - "DecreasePositionReferral(address,uint256,uint256,bytes32,address)": TypedContractEvent< - DecreasePositionReferralEvent.InputTuple, - DecreasePositionReferralEvent.OutputTuple, - DecreasePositionReferralEvent.OutputObject - >; - DecreasePositionReferral: TypedContractEvent< - DecreasePositionReferralEvent.InputTuple, - DecreasePositionReferralEvent.OutputTuple, - DecreasePositionReferralEvent.OutputObject - >; - - "ExecuteDecreasePosition(address,address[],address,uint256,uint256,bool,address,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent< - ExecuteDecreasePositionEvent.InputTuple, - ExecuteDecreasePositionEvent.OutputTuple, - ExecuteDecreasePositionEvent.OutputObject - >; - ExecuteDecreasePosition: TypedContractEvent< - ExecuteDecreasePositionEvent.InputTuple, - ExecuteDecreasePositionEvent.OutputTuple, - ExecuteDecreasePositionEvent.OutputObject - >; - - "ExecuteIncreasePosition(address,address[],address,uint256,uint256,uint256,bool,uint256,uint256,uint256,uint256)": TypedContractEvent< - ExecuteIncreasePositionEvent.InputTuple, - ExecuteIncreasePositionEvent.OutputTuple, - ExecuteIncreasePositionEvent.OutputObject - >; - ExecuteIncreasePosition: TypedContractEvent< - ExecuteIncreasePositionEvent.InputTuple, - ExecuteIncreasePositionEvent.OutputTuple, - ExecuteIncreasePositionEvent.OutputObject - >; - - "IncreasePositionReferral(address,uint256,uint256,bytes32,address)": TypedContractEvent< - IncreasePositionReferralEvent.InputTuple, - IncreasePositionReferralEvent.OutputTuple, - IncreasePositionReferralEvent.OutputObject - >; - IncreasePositionReferral: TypedContractEvent< - IncreasePositionReferralEvent.InputTuple, - IncreasePositionReferralEvent.OutputTuple, - IncreasePositionReferralEvent.OutputObject - >; - - "SetAdmin(address)": TypedContractEvent< - SetAdminEvent.InputTuple, - SetAdminEvent.OutputTuple, - SetAdminEvent.OutputObject - >; - SetAdmin: TypedContractEvent; - - "SetCallbackGasLimit(uint256)": TypedContractEvent< - SetCallbackGasLimitEvent.InputTuple, - SetCallbackGasLimitEvent.OutputTuple, - SetCallbackGasLimitEvent.OutputObject - >; - SetCallbackGasLimit: TypedContractEvent< - SetCallbackGasLimitEvent.InputTuple, - SetCallbackGasLimitEvent.OutputTuple, - SetCallbackGasLimitEvent.OutputObject - >; - - "SetDelayValues(uint256,uint256,uint256)": TypedContractEvent< - SetDelayValuesEvent.InputTuple, - SetDelayValuesEvent.OutputTuple, - SetDelayValuesEvent.OutputObject - >; - SetDelayValues: TypedContractEvent< - SetDelayValuesEvent.InputTuple, - SetDelayValuesEvent.OutputTuple, - SetDelayValuesEvent.OutputObject - >; - - "SetDepositFee(uint256)": TypedContractEvent< - SetDepositFeeEvent.InputTuple, - SetDepositFeeEvent.OutputTuple, - SetDepositFeeEvent.OutputObject - >; - SetDepositFee: TypedContractEvent< - SetDepositFeeEvent.InputTuple, - SetDepositFeeEvent.OutputTuple, - SetDepositFeeEvent.OutputObject - >; - - "SetIncreasePositionBufferBps(uint256)": TypedContractEvent< - SetIncreasePositionBufferBpsEvent.InputTuple, - SetIncreasePositionBufferBpsEvent.OutputTuple, - SetIncreasePositionBufferBpsEvent.OutputObject - >; - SetIncreasePositionBufferBps: TypedContractEvent< - SetIncreasePositionBufferBpsEvent.InputTuple, - SetIncreasePositionBufferBpsEvent.OutputTuple, - SetIncreasePositionBufferBpsEvent.OutputObject - >; - - "SetIsLeverageEnabled(bool)": TypedContractEvent< - SetIsLeverageEnabledEvent.InputTuple, - SetIsLeverageEnabledEvent.OutputTuple, - SetIsLeverageEnabledEvent.OutputObject - >; - SetIsLeverageEnabled: TypedContractEvent< - SetIsLeverageEnabledEvent.InputTuple, - SetIsLeverageEnabledEvent.OutputTuple, - SetIsLeverageEnabledEvent.OutputObject - >; - - "SetMaxGlobalSizes(address[],uint256[],uint256[])": TypedContractEvent< - SetMaxGlobalSizesEvent.InputTuple, - SetMaxGlobalSizesEvent.OutputTuple, - SetMaxGlobalSizesEvent.OutputObject - >; - SetMaxGlobalSizes: TypedContractEvent< - SetMaxGlobalSizesEvent.InputTuple, - SetMaxGlobalSizesEvent.OutputTuple, - SetMaxGlobalSizesEvent.OutputObject - >; - - "SetMinExecutionFee(uint256)": TypedContractEvent< - SetMinExecutionFeeEvent.InputTuple, - SetMinExecutionFeeEvent.OutputTuple, - SetMinExecutionFeeEvent.OutputObject - >; - SetMinExecutionFee: TypedContractEvent< - SetMinExecutionFeeEvent.InputTuple, - SetMinExecutionFeeEvent.OutputTuple, - SetMinExecutionFeeEvent.OutputObject - >; - - "SetPositionKeeper(address,bool)": TypedContractEvent< - SetPositionKeeperEvent.InputTuple, - SetPositionKeeperEvent.OutputTuple, - SetPositionKeeperEvent.OutputObject - >; - SetPositionKeeper: TypedContractEvent< - SetPositionKeeperEvent.InputTuple, - SetPositionKeeperEvent.OutputTuple, - SetPositionKeeperEvent.OutputObject - >; - - "SetReferralStorage(address)": TypedContractEvent< - SetReferralStorageEvent.InputTuple, - SetReferralStorageEvent.OutputTuple, - SetReferralStorageEvent.OutputObject - >; - SetReferralStorage: TypedContractEvent< - SetReferralStorageEvent.InputTuple, - SetReferralStorageEvent.OutputTuple, - SetReferralStorageEvent.OutputObject - >; - - "SetRequestKeysStartValues(uint256,uint256)": TypedContractEvent< - SetRequestKeysStartValuesEvent.InputTuple, - SetRequestKeysStartValuesEvent.OutputTuple, - SetRequestKeysStartValuesEvent.OutputObject - >; - SetRequestKeysStartValues: TypedContractEvent< - SetRequestKeysStartValuesEvent.InputTuple, - SetRequestKeysStartValuesEvent.OutputTuple, - SetRequestKeysStartValuesEvent.OutputObject - >; - - "WithdrawFees(address,address,uint256)": TypedContractEvent< - WithdrawFeesEvent.InputTuple, - WithdrawFeesEvent.OutputTuple, - WithdrawFeesEvent.OutputObject - >; - WithdrawFees: TypedContractEvent< - WithdrawFeesEvent.InputTuple, - WithdrawFeesEvent.OutputTuple, - WithdrawFeesEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/Reader.ts b/src/typechain-types/Reader.ts deleted file mode 100644 index 92cfdf62b5..0000000000 --- a/src/typechain-types/Reader.ts +++ /dev/null @@ -1,228 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface ReaderInterface extends Interface { - getFunction( - nameOrSignature: - | "BASIS_POINTS_DIVISOR" - | "getAmountOut" - | "getFees" - | "getFundingRates" - | "getMaxAmountIn" - | "getPairInfo" - | "getPositions" - | "getStakingInfo" - | "getTokenBalances" - | "getTokenBalancesWithSupplies" - | "getTokenSupply" - | "getTotalStaked" - | "getVaultTokenInfo" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "BASIS_POINTS_DIVISOR", values?: undefined): string; - encodeFunctionData( - functionFragment: "getAmountOut", - values: [AddressLike, AddressLike, AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getFees", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getFundingRates", values: [AddressLike, AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getMaxAmountIn", values: [AddressLike, AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "getPairInfo", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData( - functionFragment: "getPositions", - values: [AddressLike, AddressLike, AddressLike[], AddressLike[], boolean[]] - ): string; - encodeFunctionData(functionFragment: "getStakingInfo", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getTokenBalances", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getTokenBalancesWithSupplies", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getTokenSupply", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getTotalStaked", values: [AddressLike[]]): string; - encodeFunctionData( - functionFragment: "getVaultTokenInfo", - values: [AddressLike, AddressLike, BigNumberish, AddressLike[]] - ): string; - - decodeFunctionResult(functionFragment: "BASIS_POINTS_DIVISOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAmountOut", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFundingRates", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMaxAmountIn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPairInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getStakingInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTokenBalances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTokenBalancesWithSupplies", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTokenSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTotalStaked", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getVaultTokenInfo", data: BytesLike): Result; -} - -export interface Reader extends BaseContract { - connect(runner?: ContractRunner | null): Reader; - waitForDeployment(): Promise; - - interface: ReaderInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - BASIS_POINTS_DIVISOR: TypedContractMethod<[], [bigint], "view">; - - getAmountOut: TypedContractMethod< - [_vault: AddressLike, _tokenIn: AddressLike, _tokenOut: AddressLike, _amountIn: BigNumberish], - [[bigint, bigint]], - "view" - >; - - getFees: TypedContractMethod<[_vault: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - - getFundingRates: TypedContractMethod< - [_vault: AddressLike, _weth: AddressLike, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - - getMaxAmountIn: TypedContractMethod< - [_vault: AddressLike, _tokenIn: AddressLike, _tokenOut: AddressLike], - [bigint], - "view" - >; - - getPairInfo: TypedContractMethod<[_factory: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - - getPositions: TypedContractMethod< - [ - _vault: AddressLike, - _account: AddressLike, - _collateralTokens: AddressLike[], - _indexTokens: AddressLike[], - _isLong: boolean[], - ], - [bigint[]], - "view" - >; - - getStakingInfo: TypedContractMethod<[_account: AddressLike, _yieldTrackers: AddressLike[]], [bigint[]], "view">; - - getTokenBalances: TypedContractMethod<[_account: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - - getTokenBalancesWithSupplies: TypedContractMethod< - [_account: AddressLike, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - - getTokenSupply: TypedContractMethod<[_token: AddressLike, _excludedAccounts: AddressLike[]], [bigint], "view">; - - getTotalStaked: TypedContractMethod<[_yieldTokens: AddressLike[]], [bigint[]], "view">; - - getVaultTokenInfo: TypedContractMethod< - [_vault: AddressLike, _weth: AddressLike, _usdgAmount: BigNumberish, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "BASIS_POINTS_DIVISOR"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "getAmountOut" - ): TypedContractMethod< - [_vault: AddressLike, _tokenIn: AddressLike, _tokenOut: AddressLike, _amountIn: BigNumberish], - [[bigint, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getFees" - ): TypedContractMethod<[_vault: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getFundingRates" - ): TypedContractMethod<[_vault: AddressLike, _weth: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getMaxAmountIn" - ): TypedContractMethod<[_vault: AddressLike, _tokenIn: AddressLike, _tokenOut: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getPairInfo" - ): TypedContractMethod<[_factory: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getPositions" - ): TypedContractMethod< - [ - _vault: AddressLike, - _account: AddressLike, - _collateralTokens: AddressLike[], - _indexTokens: AddressLike[], - _isLong: boolean[], - ], - [bigint[]], - "view" - >; - getFunction( - nameOrSignature: "getStakingInfo" - ): TypedContractMethod<[_account: AddressLike, _yieldTrackers: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getTokenBalances" - ): TypedContractMethod<[_account: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getTokenBalancesWithSupplies" - ): TypedContractMethod<[_account: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getTokenSupply" - ): TypedContractMethod<[_token: AddressLike, _excludedAccounts: AddressLike[]], [bigint], "view">; - getFunction( - nameOrSignature: "getTotalStaked" - ): TypedContractMethod<[_yieldTokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getVaultTokenInfo" - ): TypedContractMethod< - [_vault: AddressLike, _weth: AddressLike, _usdgAmount: BigNumberish, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - - filters: {}; -} diff --git a/src/typechain-types/ReaderV2.ts b/src/typechain-types/ReaderV2.ts deleted file mode 100644 index c7b5a47167..0000000000 --- a/src/typechain-types/ReaderV2.ts +++ /dev/null @@ -1,353 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface ReaderV2Interface extends Interface { - getFunction( - nameOrSignature: - | "BASIS_POINTS_DIVISOR" - | "POSITION_PROPS_LENGTH" - | "PRICE_PRECISION" - | "USDG_DECIMALS" - | "getAmountOut" - | "getFeeBasisPoints" - | "getFees" - | "getFullVaultTokenInfo" - | "getFundingRates" - | "getMaxAmountIn" - | "getPairInfo" - | "getPositions" - | "getPrices" - | "getStakingInfo" - | "getTokenBalances" - | "getTokenBalancesWithSupplies" - | "getTokenSupply" - | "getTotalBalance" - | "getTotalStaked" - | "getVaultTokenInfo" - | "getVaultTokenInfoV2" - | "getVestingInfo" - | "gov" - | "hasMaxGlobalShortSizes" - | "setConfig" - | "setGov" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "BASIS_POINTS_DIVISOR", values?: undefined): string; - encodeFunctionData(functionFragment: "POSITION_PROPS_LENGTH", values?: undefined): string; - encodeFunctionData(functionFragment: "PRICE_PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "USDG_DECIMALS", values?: undefined): string; - encodeFunctionData( - functionFragment: "getAmountOut", - values: [AddressLike, AddressLike, AddressLike, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getFeeBasisPoints", - values: [AddressLike, AddressLike, AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getFees", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData( - functionFragment: "getFullVaultTokenInfo", - values: [AddressLike, AddressLike, BigNumberish, AddressLike[]] - ): string; - encodeFunctionData(functionFragment: "getFundingRates", values: [AddressLike, AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getMaxAmountIn", values: [AddressLike, AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "getPairInfo", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData( - functionFragment: "getPositions", - values: [AddressLike, AddressLike, AddressLike[], AddressLike[], boolean[]] - ): string; - encodeFunctionData(functionFragment: "getPrices", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getStakingInfo", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getTokenBalances", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getTokenBalancesWithSupplies", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getTokenSupply", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getTotalBalance", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getTotalStaked", values: [AddressLike[]]): string; - encodeFunctionData( - functionFragment: "getVaultTokenInfo", - values: [AddressLike, AddressLike, BigNumberish, AddressLike[]] - ): string; - encodeFunctionData( - functionFragment: "getVaultTokenInfoV2", - values: [AddressLike, AddressLike, BigNumberish, AddressLike[]] - ): string; - encodeFunctionData(functionFragment: "getVestingInfo", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "hasMaxGlobalShortSizes", values?: undefined): string; - encodeFunctionData(functionFragment: "setConfig", values: [boolean]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - - decodeFunctionResult(functionFragment: "BASIS_POINTS_DIVISOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "POSITION_PROPS_LENGTH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "PRICE_PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "USDG_DECIMALS", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAmountOut", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFullVaultTokenInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFundingRates", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMaxAmountIn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPairInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPrices", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getStakingInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTokenBalances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTokenBalancesWithSupplies", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTokenSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTotalBalance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTotalStaked", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getVaultTokenInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getVaultTokenInfoV2", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getVestingInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasMaxGlobalShortSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setConfig", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; -} - -export interface ReaderV2 extends BaseContract { - connect(runner?: ContractRunner | null): ReaderV2; - waitForDeployment(): Promise; - - interface: ReaderV2Interface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - BASIS_POINTS_DIVISOR: TypedContractMethod<[], [bigint], "view">; - - POSITION_PROPS_LENGTH: TypedContractMethod<[], [bigint], "view">; - - PRICE_PRECISION: TypedContractMethod<[], [bigint], "view">; - - USDG_DECIMALS: TypedContractMethod<[], [bigint], "view">; - - getAmountOut: TypedContractMethod< - [_vault: AddressLike, _tokenIn: AddressLike, _tokenOut: AddressLike, _amountIn: BigNumberish], - [[bigint, bigint]], - "view" - >; - - getFeeBasisPoints: TypedContractMethod< - [_vault: AddressLike, _tokenIn: AddressLike, _tokenOut: AddressLike, _amountIn: BigNumberish], - [[bigint, bigint, bigint]], - "view" - >; - - getFees: TypedContractMethod<[_vault: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - - getFullVaultTokenInfo: TypedContractMethod< - [_vault: AddressLike, _weth: AddressLike, _usdgAmount: BigNumberish, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - - getFundingRates: TypedContractMethod< - [_vault: AddressLike, _weth: AddressLike, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - - getMaxAmountIn: TypedContractMethod< - [_vault: AddressLike, _tokenIn: AddressLike, _tokenOut: AddressLike], - [bigint], - "view" - >; - - getPairInfo: TypedContractMethod<[_factory: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - - getPositions: TypedContractMethod< - [ - _vault: AddressLike, - _account: AddressLike, - _collateralTokens: AddressLike[], - _indexTokens: AddressLike[], - _isLong: boolean[], - ], - [bigint[]], - "view" - >; - - getPrices: TypedContractMethod<[_priceFeed: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - - getStakingInfo: TypedContractMethod<[_account: AddressLike, _yieldTrackers: AddressLike[]], [bigint[]], "view">; - - getTokenBalances: TypedContractMethod<[_account: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - - getTokenBalancesWithSupplies: TypedContractMethod< - [_account: AddressLike, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - - getTokenSupply: TypedContractMethod<[_token: AddressLike, _excludedAccounts: AddressLike[]], [bigint], "view">; - - getTotalBalance: TypedContractMethod<[_token: AddressLike, _accounts: AddressLike[]], [bigint], "view">; - - getTotalStaked: TypedContractMethod<[_yieldTokens: AddressLike[]], [bigint[]], "view">; - - getVaultTokenInfo: TypedContractMethod< - [_vault: AddressLike, _weth: AddressLike, _usdgAmount: BigNumberish, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - - getVaultTokenInfoV2: TypedContractMethod< - [_vault: AddressLike, _weth: AddressLike, _usdgAmount: BigNumberish, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - - getVestingInfo: TypedContractMethod<[_account: AddressLike, _vesters: AddressLike[]], [bigint[]], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - hasMaxGlobalShortSizes: TypedContractMethod<[], [boolean], "view">; - - setConfig: TypedContractMethod<[_hasMaxGlobalShortSizes: boolean], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "BASIS_POINTS_DIVISOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "POSITION_PROPS_LENGTH"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "PRICE_PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "USDG_DECIMALS"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "getAmountOut" - ): TypedContractMethod< - [_vault: AddressLike, _tokenIn: AddressLike, _tokenOut: AddressLike, _amountIn: BigNumberish], - [[bigint, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getFeeBasisPoints" - ): TypedContractMethod< - [_vault: AddressLike, _tokenIn: AddressLike, _tokenOut: AddressLike, _amountIn: BigNumberish], - [[bigint, bigint, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getFees" - ): TypedContractMethod<[_vault: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getFullVaultTokenInfo" - ): TypedContractMethod< - [_vault: AddressLike, _weth: AddressLike, _usdgAmount: BigNumberish, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - getFunction( - nameOrSignature: "getFundingRates" - ): TypedContractMethod<[_vault: AddressLike, _weth: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getMaxAmountIn" - ): TypedContractMethod<[_vault: AddressLike, _tokenIn: AddressLike, _tokenOut: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getPairInfo" - ): TypedContractMethod<[_factory: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getPositions" - ): TypedContractMethod< - [ - _vault: AddressLike, - _account: AddressLike, - _collateralTokens: AddressLike[], - _indexTokens: AddressLike[], - _isLong: boolean[], - ], - [bigint[]], - "view" - >; - getFunction( - nameOrSignature: "getPrices" - ): TypedContractMethod<[_priceFeed: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getStakingInfo" - ): TypedContractMethod<[_account: AddressLike, _yieldTrackers: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getTokenBalances" - ): TypedContractMethod<[_account: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getTokenBalancesWithSupplies" - ): TypedContractMethod<[_account: AddressLike, _tokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getTokenSupply" - ): TypedContractMethod<[_token: AddressLike, _excludedAccounts: AddressLike[]], [bigint], "view">; - getFunction( - nameOrSignature: "getTotalBalance" - ): TypedContractMethod<[_token: AddressLike, _accounts: AddressLike[]], [bigint], "view">; - getFunction( - nameOrSignature: "getTotalStaked" - ): TypedContractMethod<[_yieldTokens: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getVaultTokenInfo" - ): TypedContractMethod< - [_vault: AddressLike, _weth: AddressLike, _usdgAmount: BigNumberish, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - getFunction( - nameOrSignature: "getVaultTokenInfoV2" - ): TypedContractMethod< - [_vault: AddressLike, _weth: AddressLike, _usdgAmount: BigNumberish, _tokens: AddressLike[]], - [bigint[]], - "view" - >; - getFunction( - nameOrSignature: "getVestingInfo" - ): TypedContractMethod<[_account: AddressLike, _vesters: AddressLike[]], [bigint[]], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "hasMaxGlobalShortSizes"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "setConfig" - ): TypedContractMethod<[_hasMaxGlobalShortSizes: boolean], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - filters: {}; -} diff --git a/src/typechain-types/ReferralStorage.ts b/src/typechain-types/ReferralStorage.ts deleted file mode 100644 index e36984e909..0000000000 --- a/src/typechain-types/ReferralStorage.ts +++ /dev/null @@ -1,500 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface ReferralStorageInterface extends Interface { - getFunction( - nameOrSignature: - | "BASIS_POINTS" - | "acceptOwnership" - | "codeOwners" - | "getTraderReferralInfo" - | "gov" - | "govSetCodeOwner" - | "isHandler" - | "pendingGov" - | "referrerDiscountShares" - | "referrerTiers" - | "registerCode" - | "setCodeOwner" - | "setHandler" - | "setReferrerDiscountShare" - | "setReferrerTier" - | "setTier" - | "setTraderReferralCode" - | "setTraderReferralCodeByUser" - | "tiers" - | "traderReferralCodes" - | "transferOwnership" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: - | "GovSetCodeOwner" - | "RegisterCode" - | "SetCodeOwner" - | "SetGov" - | "SetHandler" - | "SetReferrerDiscountShare" - | "SetReferrerTier" - | "SetTier" - | "SetTraderReferralCode" - ): EventFragment; - - encodeFunctionData(functionFragment: "BASIS_POINTS", values?: undefined): string; - encodeFunctionData(functionFragment: "acceptOwnership", values?: undefined): string; - encodeFunctionData(functionFragment: "codeOwners", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "getTraderReferralInfo", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "govSetCodeOwner", values: [BytesLike, AddressLike]): string; - encodeFunctionData(functionFragment: "isHandler", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "pendingGov", values?: undefined): string; - encodeFunctionData(functionFragment: "referrerDiscountShares", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "referrerTiers", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "registerCode", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "setCodeOwner", values: [BytesLike, AddressLike]): string; - encodeFunctionData(functionFragment: "setHandler", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setReferrerDiscountShare", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setReferrerTier", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setTier", values: [BigNumberish, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "setTraderReferralCode", values: [AddressLike, BytesLike]): string; - encodeFunctionData(functionFragment: "setTraderReferralCodeByUser", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "tiers", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "traderReferralCodes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string; - - decodeFunctionResult(functionFragment: "BASIS_POINTS", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "acceptOwnership", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "codeOwners", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTraderReferralInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "govSetCodeOwner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pendingGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "referrerDiscountShares", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "referrerTiers", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "registerCode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setCodeOwner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setReferrerDiscountShare", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setReferrerTier", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTier", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTraderReferralCode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTraderReferralCodeByUser", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tiers", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "traderReferralCodes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result; -} - -export namespace GovSetCodeOwnerEvent { - export type InputTuple = [code: BytesLike, newAccount: AddressLike]; - export type OutputTuple = [code: string, newAccount: string]; - export interface OutputObject { - code: string; - newAccount: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace RegisterCodeEvent { - export type InputTuple = [account: AddressLike, code: BytesLike]; - export type OutputTuple = [account: string, code: string]; - export interface OutputObject { - account: string; - code: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetCodeOwnerEvent { - export type InputTuple = [account: AddressLike, newAccount: AddressLike, code: BytesLike]; - export type OutputTuple = [account: string, newAccount: string, code: string]; - export interface OutputObject { - account: string; - newAccount: string; - code: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetGovEvent { - export type InputTuple = [prevGov: AddressLike, nextGov: AddressLike]; - export type OutputTuple = [prevGov: string, nextGov: string]; - export interface OutputObject { - prevGov: string; - nextGov: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetHandlerEvent { - export type InputTuple = [handler: AddressLike, isActive: boolean]; - export type OutputTuple = [handler: string, isActive: boolean]; - export interface OutputObject { - handler: string; - isActive: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetReferrerDiscountShareEvent { - export type InputTuple = [referrer: AddressLike, discountShare: BigNumberish]; - export type OutputTuple = [referrer: string, discountShare: bigint]; - export interface OutputObject { - referrer: string; - discountShare: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetReferrerTierEvent { - export type InputTuple = [referrer: AddressLike, tierId: BigNumberish]; - export type OutputTuple = [referrer: string, tierId: bigint]; - export interface OutputObject { - referrer: string; - tierId: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetTierEvent { - export type InputTuple = [tierId: BigNumberish, totalRebate: BigNumberish, discountShare: BigNumberish]; - export type OutputTuple = [tierId: bigint, totalRebate: bigint, discountShare: bigint]; - export interface OutputObject { - tierId: bigint; - totalRebate: bigint; - discountShare: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SetTraderReferralCodeEvent { - export type InputTuple = [account: AddressLike, code: BytesLike]; - export type OutputTuple = [account: string, code: string]; - export interface OutputObject { - account: string; - code: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface ReferralStorage extends BaseContract { - connect(runner?: ContractRunner | null): ReferralStorage; - waitForDeployment(): Promise; - - interface: ReferralStorageInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - BASIS_POINTS: TypedContractMethod<[], [bigint], "view">; - - acceptOwnership: TypedContractMethod<[], [void], "nonpayable">; - - codeOwners: TypedContractMethod<[arg0: BytesLike], [string], "view">; - - getTraderReferralInfo: TypedContractMethod<[_account: AddressLike], [[string, string]], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - govSetCodeOwner: TypedContractMethod<[_code: BytesLike, _newAccount: AddressLike], [void], "nonpayable">; - - isHandler: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - pendingGov: TypedContractMethod<[], [string], "view">; - - referrerDiscountShares: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - referrerTiers: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - registerCode: TypedContractMethod<[_code: BytesLike], [void], "nonpayable">; - - setCodeOwner: TypedContractMethod<[_code: BytesLike, _newAccount: AddressLike], [void], "nonpayable">; - - setHandler: TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setReferrerDiscountShare: TypedContractMethod<[_discountShare: BigNumberish], [void], "nonpayable">; - - setReferrerTier: TypedContractMethod<[_referrer: AddressLike, _tierId: BigNumberish], [void], "nonpayable">; - - setTier: TypedContractMethod< - [_tierId: BigNumberish, _totalRebate: BigNumberish, _discountShare: BigNumberish], - [void], - "nonpayable" - >; - - setTraderReferralCode: TypedContractMethod<[_account: AddressLike, _code: BytesLike], [void], "nonpayable">; - - setTraderReferralCodeByUser: TypedContractMethod<[_code: BytesLike], [void], "nonpayable">; - - tiers: TypedContractMethod< - [arg0: BigNumberish], - [[bigint, bigint] & { totalRebate: bigint; discountShare: bigint }], - "view" - >; - - traderReferralCodes: TypedContractMethod<[arg0: AddressLike], [string], "view">; - - transferOwnership: TypedContractMethod<[_newGov: AddressLike], [void], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "BASIS_POINTS"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "acceptOwnership"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "codeOwners"): TypedContractMethod<[arg0: BytesLike], [string], "view">; - getFunction( - nameOrSignature: "getTraderReferralInfo" - ): TypedContractMethod<[_account: AddressLike], [[string, string]], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "govSetCodeOwner" - ): TypedContractMethod<[_code: BytesLike, _newAccount: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "isHandler"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "pendingGov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "referrerDiscountShares"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "referrerTiers"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "registerCode"): TypedContractMethod<[_code: BytesLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setCodeOwner" - ): TypedContractMethod<[_code: BytesLike, _newAccount: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setHandler" - ): TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setReferrerDiscountShare" - ): TypedContractMethod<[_discountShare: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setReferrerTier" - ): TypedContractMethod<[_referrer: AddressLike, _tierId: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setTier" - ): TypedContractMethod< - [_tierId: BigNumberish, _totalRebate: BigNumberish, _discountShare: BigNumberish], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setTraderReferralCode" - ): TypedContractMethod<[_account: AddressLike, _code: BytesLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setTraderReferralCodeByUser" - ): TypedContractMethod<[_code: BytesLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "tiers" - ): TypedContractMethod< - [arg0: BigNumberish], - [[bigint, bigint] & { totalRebate: bigint; discountShare: bigint }], - "view" - >; - getFunction(nameOrSignature: "traderReferralCodes"): TypedContractMethod<[arg0: AddressLike], [string], "view">; - getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[_newGov: AddressLike], [void], "nonpayable">; - - getEvent( - key: "GovSetCodeOwner" - ): TypedContractEvent< - GovSetCodeOwnerEvent.InputTuple, - GovSetCodeOwnerEvent.OutputTuple, - GovSetCodeOwnerEvent.OutputObject - >; - getEvent( - key: "RegisterCode" - ): TypedContractEvent; - getEvent( - key: "SetCodeOwner" - ): TypedContractEvent; - getEvent( - key: "SetGov" - ): TypedContractEvent; - getEvent( - key: "SetHandler" - ): TypedContractEvent; - getEvent( - key: "SetReferrerDiscountShare" - ): TypedContractEvent< - SetReferrerDiscountShareEvent.InputTuple, - SetReferrerDiscountShareEvent.OutputTuple, - SetReferrerDiscountShareEvent.OutputObject - >; - getEvent( - key: "SetReferrerTier" - ): TypedContractEvent< - SetReferrerTierEvent.InputTuple, - SetReferrerTierEvent.OutputTuple, - SetReferrerTierEvent.OutputObject - >; - getEvent( - key: "SetTier" - ): TypedContractEvent; - getEvent( - key: "SetTraderReferralCode" - ): TypedContractEvent< - SetTraderReferralCodeEvent.InputTuple, - SetTraderReferralCodeEvent.OutputTuple, - SetTraderReferralCodeEvent.OutputObject - >; - - filters: { - "GovSetCodeOwner(bytes32,address)": TypedContractEvent< - GovSetCodeOwnerEvent.InputTuple, - GovSetCodeOwnerEvent.OutputTuple, - GovSetCodeOwnerEvent.OutputObject - >; - GovSetCodeOwner: TypedContractEvent< - GovSetCodeOwnerEvent.InputTuple, - GovSetCodeOwnerEvent.OutputTuple, - GovSetCodeOwnerEvent.OutputObject - >; - - "RegisterCode(address,bytes32)": TypedContractEvent< - RegisterCodeEvent.InputTuple, - RegisterCodeEvent.OutputTuple, - RegisterCodeEvent.OutputObject - >; - RegisterCode: TypedContractEvent< - RegisterCodeEvent.InputTuple, - RegisterCodeEvent.OutputTuple, - RegisterCodeEvent.OutputObject - >; - - "SetCodeOwner(address,address,bytes32)": TypedContractEvent< - SetCodeOwnerEvent.InputTuple, - SetCodeOwnerEvent.OutputTuple, - SetCodeOwnerEvent.OutputObject - >; - SetCodeOwner: TypedContractEvent< - SetCodeOwnerEvent.InputTuple, - SetCodeOwnerEvent.OutputTuple, - SetCodeOwnerEvent.OutputObject - >; - - "SetGov(address,address)": TypedContractEvent< - SetGovEvent.InputTuple, - SetGovEvent.OutputTuple, - SetGovEvent.OutputObject - >; - SetGov: TypedContractEvent; - - "SetHandler(address,bool)": TypedContractEvent< - SetHandlerEvent.InputTuple, - SetHandlerEvent.OutputTuple, - SetHandlerEvent.OutputObject - >; - SetHandler: TypedContractEvent< - SetHandlerEvent.InputTuple, - SetHandlerEvent.OutputTuple, - SetHandlerEvent.OutputObject - >; - - "SetReferrerDiscountShare(address,uint256)": TypedContractEvent< - SetReferrerDiscountShareEvent.InputTuple, - SetReferrerDiscountShareEvent.OutputTuple, - SetReferrerDiscountShareEvent.OutputObject - >; - SetReferrerDiscountShare: TypedContractEvent< - SetReferrerDiscountShareEvent.InputTuple, - SetReferrerDiscountShareEvent.OutputTuple, - SetReferrerDiscountShareEvent.OutputObject - >; - - "SetReferrerTier(address,uint256)": TypedContractEvent< - SetReferrerTierEvent.InputTuple, - SetReferrerTierEvent.OutputTuple, - SetReferrerTierEvent.OutputObject - >; - SetReferrerTier: TypedContractEvent< - SetReferrerTierEvent.InputTuple, - SetReferrerTierEvent.OutputTuple, - SetReferrerTierEvent.OutputObject - >; - - "SetTier(uint256,uint256,uint256)": TypedContractEvent< - SetTierEvent.InputTuple, - SetTierEvent.OutputTuple, - SetTierEvent.OutputObject - >; - SetTier: TypedContractEvent; - - "SetTraderReferralCode(address,bytes32)": TypedContractEvent< - SetTraderReferralCodeEvent.InputTuple, - SetTraderReferralCodeEvent.OutputTuple, - SetTraderReferralCodeEvent.OutputObject - >; - SetTraderReferralCode: TypedContractEvent< - SetTraderReferralCodeEvent.InputTuple, - SetTraderReferralCodeEvent.OutputTuple, - SetTraderReferralCodeEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/RelayParams.ts b/src/typechain-types/RelayParams.ts deleted file mode 100644 index d386890551..0000000000 --- a/src/typechain-types/RelayParams.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, FunctionFragment, Interface, ContractRunner, ContractMethod, Listener } from "ethers"; -import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "./common"; - -export interface RelayParamsInterface extends Interface {} - -export interface RelayParams extends BaseContract { - connect(runner?: ContractRunner | null): RelayParams; - waitForDeployment(): Promise; - - interface: RelayParamsInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - getFunction(key: string | FunctionFragment): T; - - filters: {}; -} diff --git a/src/typechain-types/RewardReader.ts b/src/typechain-types/RewardReader.ts deleted file mode 100644 index 4d17735a99..0000000000 --- a/src/typechain-types/RewardReader.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface RewardReaderInterface extends Interface { - getFunction(nameOrSignature: "getDepositBalances" | "getStakingInfo" | "getVestingInfoV2"): FunctionFragment; - - encodeFunctionData( - functionFragment: "getDepositBalances", - values: [AddressLike, AddressLike[], AddressLike[]] - ): string; - encodeFunctionData(functionFragment: "getStakingInfo", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "getVestingInfoV2", values: [AddressLike, AddressLike[]]): string; - - decodeFunctionResult(functionFragment: "getDepositBalances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getStakingInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getVestingInfoV2", data: BytesLike): Result; -} - -export interface RewardReader extends BaseContract { - connect(runner?: ContractRunner | null): RewardReader; - waitForDeployment(): Promise; - - interface: RewardReaderInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - getDepositBalances: TypedContractMethod< - [_account: AddressLike, _depositTokens: AddressLike[], _rewardTrackers: AddressLike[]], - [bigint[]], - "view" - >; - - getStakingInfo: TypedContractMethod<[_account: AddressLike, _rewardTrackers: AddressLike[]], [bigint[]], "view">; - - getVestingInfoV2: TypedContractMethod<[_account: AddressLike, _vesters: AddressLike[]], [bigint[]], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "getDepositBalances" - ): TypedContractMethod< - [_account: AddressLike, _depositTokens: AddressLike[], _rewardTrackers: AddressLike[]], - [bigint[]], - "view" - >; - getFunction( - nameOrSignature: "getStakingInfo" - ): TypedContractMethod<[_account: AddressLike, _rewardTrackers: AddressLike[]], [bigint[]], "view">; - getFunction( - nameOrSignature: "getVestingInfoV2" - ): TypedContractMethod<[_account: AddressLike, _vesters: AddressLike[]], [bigint[]], "view">; - - filters: {}; -} diff --git a/src/typechain-types/RewardRouter.ts b/src/typechain-types/RewardRouter.ts deleted file mode 100644 index 75797f9f04..0000000000 --- a/src/typechain-types/RewardRouter.ts +++ /dev/null @@ -1,701 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace RewardRouterV2 { - export type InitializeParamsStruct = { - weth: AddressLike; - gmx: AddressLike; - esGmx: AddressLike; - bnGmx: AddressLike; - glp: AddressLike; - stakedGmxTracker: AddressLike; - bonusGmxTracker: AddressLike; - extendedGmxTracker: AddressLike; - feeGmxTracker: AddressLike; - feeGlpTracker: AddressLike; - stakedGlpTracker: AddressLike; - glpManager: AddressLike; - gmxVester: AddressLike; - glpVester: AddressLike; - externalHandler: AddressLike; - govToken: AddressLike; - }; - - export type InitializeParamsStructOutput = [ - weth: string, - gmx: string, - esGmx: string, - bnGmx: string, - glp: string, - stakedGmxTracker: string, - bonusGmxTracker: string, - extendedGmxTracker: string, - feeGmxTracker: string, - feeGlpTracker: string, - stakedGlpTracker: string, - glpManager: string, - gmxVester: string, - glpVester: string, - externalHandler: string, - govToken: string, - ] & { - weth: string; - gmx: string; - esGmx: string; - bnGmx: string; - glp: string; - stakedGmxTracker: string; - bonusGmxTracker: string; - extendedGmxTracker: string; - feeGmxTracker: string; - feeGlpTracker: string; - stakedGlpTracker: string; - glpManager: string; - gmxVester: string; - glpVester: string; - externalHandler: string; - govToken: string; - }; -} - -export interface RewardRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "BASIS_POINTS_DIVISOR" - | "acceptTransfer" - | "batchCompoundForAccounts" - | "batchRestakeForAccounts" - | "batchStakeGmxForAccounts" - | "bnGmx" - | "bonusGmxTracker" - | "claim" - | "claimEsGmx" - | "claimFees" - | "compound" - | "esGmx" - | "extendedGmxTracker" - | "externalHandler" - | "feeGlpTracker" - | "feeGmxTracker" - | "glp" - | "glpManager" - | "glpVester" - | "gmx" - | "gmxVester" - | "gov" - | "govToken" - | "handleRewards" - | "handleRewardsV2" - | "inRestakingMode" - | "inStrictTransferMode" - | "initialize" - | "isInitialized" - | "makeExternalCalls" - | "maxBoostBasisPoints" - | "mintAndStakeGlp" - | "mintAndStakeGlpETH" - | "multicall" - | "pendingReceivers" - | "setGov" - | "setGovToken" - | "setInRestakingMode" - | "setInStrictTransferMode" - | "setMaxBoostBasisPoints" - | "setVotingPowerType" - | "signalTransfer" - | "stakeEsGmx" - | "stakeGmx" - | "stakedGlpTracker" - | "stakedGmxTracker" - | "unstakeAndRedeemGlp" - | "unstakeAndRedeemGlpETH" - | "unstakeEsGmx" - | "unstakeGmx" - | "votingPowerType" - | "weth" - | "withdrawToken" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "StakeGlp" | "StakeGmx" | "UnstakeGlp" | "UnstakeGmx"): EventFragment; - - encodeFunctionData(functionFragment: "BASIS_POINTS_DIVISOR", values?: undefined): string; - encodeFunctionData(functionFragment: "acceptTransfer", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "batchCompoundForAccounts", values: [AddressLike[]]): string; - encodeFunctionData(functionFragment: "batchRestakeForAccounts", values: [AddressLike[]]): string; - encodeFunctionData(functionFragment: "batchStakeGmxForAccounts", values: [AddressLike[], BigNumberish[]]): string; - encodeFunctionData(functionFragment: "bnGmx", values?: undefined): string; - encodeFunctionData(functionFragment: "bonusGmxTracker", values?: undefined): string; - encodeFunctionData(functionFragment: "claim", values?: undefined): string; - encodeFunctionData(functionFragment: "claimEsGmx", values?: undefined): string; - encodeFunctionData(functionFragment: "claimFees", values?: undefined): string; - encodeFunctionData(functionFragment: "compound", values?: undefined): string; - encodeFunctionData(functionFragment: "esGmx", values?: undefined): string; - encodeFunctionData(functionFragment: "extendedGmxTracker", values?: undefined): string; - encodeFunctionData(functionFragment: "externalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "feeGlpTracker", values?: undefined): string; - encodeFunctionData(functionFragment: "feeGmxTracker", values?: undefined): string; - encodeFunctionData(functionFragment: "glp", values?: undefined): string; - encodeFunctionData(functionFragment: "glpManager", values?: undefined): string; - encodeFunctionData(functionFragment: "glpVester", values?: undefined): string; - encodeFunctionData(functionFragment: "gmx", values?: undefined): string; - encodeFunctionData(functionFragment: "gmxVester", values?: undefined): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "govToken", values?: undefined): string; - encodeFunctionData( - functionFragment: "handleRewards", - values: [boolean, boolean, boolean, boolean, boolean, boolean, boolean] - ): string; - encodeFunctionData( - functionFragment: "handleRewardsV2", - values: [AddressLike, boolean, boolean, boolean, boolean, boolean, boolean, boolean] - ): string; - encodeFunctionData(functionFragment: "inRestakingMode", values?: undefined): string; - encodeFunctionData(functionFragment: "inStrictTransferMode", values?: undefined): string; - encodeFunctionData(functionFragment: "initialize", values: [RewardRouterV2.InitializeParamsStruct]): string; - encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; - encodeFunctionData( - functionFragment: "makeExternalCalls", - values: [AddressLike[], BytesLike[], AddressLike[], AddressLike[]] - ): string; - encodeFunctionData(functionFragment: "maxBoostBasisPoints", values?: undefined): string; - encodeFunctionData( - functionFragment: "mintAndStakeGlp", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "mintAndStakeGlpETH", values: [BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "pendingReceivers", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setGovToken", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setInRestakingMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setInStrictTransferMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setMaxBoostBasisPoints", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setVotingPowerType", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "signalTransfer", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "stakeEsGmx", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "stakeGmx", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "stakedGlpTracker", values?: undefined): string; - encodeFunctionData(functionFragment: "stakedGmxTracker", values?: undefined): string; - encodeFunctionData( - functionFragment: "unstakeAndRedeemGlp", - values: [AddressLike, BigNumberish, BigNumberish, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "unstakeAndRedeemGlpETH", - values: [BigNumberish, BigNumberish, AddressLike] - ): string; - encodeFunctionData(functionFragment: "unstakeEsGmx", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "unstakeGmx", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "votingPowerType", values?: undefined): string; - encodeFunctionData(functionFragment: "weth", values?: undefined): string; - encodeFunctionData(functionFragment: "withdrawToken", values: [AddressLike, AddressLike, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "BASIS_POINTS_DIVISOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "acceptTransfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "batchCompoundForAccounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "batchRestakeForAccounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "batchStakeGmxForAccounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "bnGmx", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "bonusGmxTracker", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimEsGmx", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "compound", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "esGmx", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "extendedGmxTracker", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "externalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "feeGlpTracker", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "feeGmxTracker", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "glp", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "glpManager", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "glpVester", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gmx", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gmxVester", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "govToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "handleRewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "handleRewardsV2", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inRestakingMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inStrictTransferMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "makeExternalCalls", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxBoostBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mintAndStakeGlp", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mintAndStakeGlpETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pendingReceivers", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGovToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInRestakingMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInStrictTransferMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxBoostBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setVotingPowerType", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signalTransfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stakeEsGmx", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stakeGmx", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stakedGlpTracker", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stakedGmxTracker", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "unstakeAndRedeemGlp", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "unstakeAndRedeemGlpETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "unstakeEsGmx", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "unstakeGmx", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "votingPowerType", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawToken", data: BytesLike): Result; -} - -export namespace StakeGlpEvent { - export type InputTuple = [account: AddressLike, amount: BigNumberish]; - export type OutputTuple = [account: string, amount: bigint]; - export interface OutputObject { - account: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace StakeGmxEvent { - export type InputTuple = [account: AddressLike, token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [account: string, token: string, amount: bigint]; - export interface OutputObject { - account: string; - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UnstakeGlpEvent { - export type InputTuple = [account: AddressLike, amount: BigNumberish]; - export type OutputTuple = [account: string, amount: bigint]; - export interface OutputObject { - account: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UnstakeGmxEvent { - export type InputTuple = [account: AddressLike, token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [account: string, token: string, amount: bigint]; - export interface OutputObject { - account: string; - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface RewardRouter extends BaseContract { - connect(runner?: ContractRunner | null): RewardRouter; - waitForDeployment(): Promise; - - interface: RewardRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - BASIS_POINTS_DIVISOR: TypedContractMethod<[], [bigint], "view">; - - acceptTransfer: TypedContractMethod<[_sender: AddressLike], [void], "nonpayable">; - - batchCompoundForAccounts: TypedContractMethod<[_accounts: AddressLike[]], [void], "nonpayable">; - - batchRestakeForAccounts: TypedContractMethod<[_accounts: AddressLike[]], [void], "nonpayable">; - - batchStakeGmxForAccounts: TypedContractMethod< - [_accounts: AddressLike[], _amounts: BigNumberish[]], - [void], - "nonpayable" - >; - - bnGmx: TypedContractMethod<[], [string], "view">; - - bonusGmxTracker: TypedContractMethod<[], [string], "view">; - - claim: TypedContractMethod<[], [void], "nonpayable">; - - claimEsGmx: TypedContractMethod<[], [void], "nonpayable">; - - claimFees: TypedContractMethod<[], [void], "nonpayable">; - - compound: TypedContractMethod<[], [void], "nonpayable">; - - esGmx: TypedContractMethod<[], [string], "view">; - - extendedGmxTracker: TypedContractMethod<[], [string], "view">; - - externalHandler: TypedContractMethod<[], [string], "view">; - - feeGlpTracker: TypedContractMethod<[], [string], "view">; - - feeGmxTracker: TypedContractMethod<[], [string], "view">; - - glp: TypedContractMethod<[], [string], "view">; - - glpManager: TypedContractMethod<[], [string], "view">; - - glpVester: TypedContractMethod<[], [string], "view">; - - gmx: TypedContractMethod<[], [string], "view">; - - gmxVester: TypedContractMethod<[], [string], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - govToken: TypedContractMethod<[], [string], "view">; - - handleRewards: TypedContractMethod< - [ - _shouldClaimGmx: boolean, - _shouldStakeGmx: boolean, - _shouldClaimEsGmx: boolean, - _shouldStakeEsGmx: boolean, - _shouldStakeMultiplierPoints: boolean, - _shouldClaimWeth: boolean, - _shouldConvertWethToEth: boolean, - ], - [void], - "nonpayable" - >; - - handleRewardsV2: TypedContractMethod< - [ - _gmxReceiver: AddressLike, - _shouldClaimGmx: boolean, - _shouldStakeGmx: boolean, - _shouldClaimEsGmx: boolean, - _shouldStakeEsGmx: boolean, - _shouldStakeMultiplierPoints: boolean, - _shouldClaimWeth: boolean, - _shouldConvertWethToEth: boolean, - ], - [void], - "nonpayable" - >; - - inRestakingMode: TypedContractMethod<[], [boolean], "view">; - - inStrictTransferMode: TypedContractMethod<[], [boolean], "view">; - - initialize: TypedContractMethod<[_initializeParams: RewardRouterV2.InitializeParamsStruct], [void], "nonpayable">; - - isInitialized: TypedContractMethod<[], [boolean], "view">; - - makeExternalCalls: TypedContractMethod< - [ - externalCallTargets: AddressLike[], - externalCallDataList: BytesLike[], - refundTokens: AddressLike[], - refundReceivers: AddressLike[], - ], - [void], - "nonpayable" - >; - - maxBoostBasisPoints: TypedContractMethod<[], [bigint], "view">; - - mintAndStakeGlp: TypedContractMethod< - [_token: AddressLike, _amount: BigNumberish, _minUsdg: BigNumberish, _minGlp: BigNumberish], - [bigint], - "nonpayable" - >; - - mintAndStakeGlpETH: TypedContractMethod<[_minUsdg: BigNumberish, _minGlp: BigNumberish], [bigint], "payable">; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "nonpayable">; - - pendingReceivers: TypedContractMethod<[arg0: AddressLike], [string], "view">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setGovToken: TypedContractMethod<[_govToken: AddressLike], [void], "nonpayable">; - - setInRestakingMode: TypedContractMethod<[_inRestakingMode: boolean], [void], "nonpayable">; - - setInStrictTransferMode: TypedContractMethod<[_inStrictTransferMode: boolean], [void], "nonpayable">; - - setMaxBoostBasisPoints: TypedContractMethod<[_maxBoostBasisPoints: BigNumberish], [void], "nonpayable">; - - setVotingPowerType: TypedContractMethod<[_votingPowerType: BigNumberish], [void], "nonpayable">; - - signalTransfer: TypedContractMethod<[_receiver: AddressLike], [void], "nonpayable">; - - stakeEsGmx: TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - - stakeGmx: TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - - stakedGlpTracker: TypedContractMethod<[], [string], "view">; - - stakedGmxTracker: TypedContractMethod<[], [string], "view">; - - unstakeAndRedeemGlp: TypedContractMethod< - [_tokenOut: AddressLike, _glpAmount: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - - unstakeAndRedeemGlpETH: TypedContractMethod< - [_glpAmount: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - - unstakeEsGmx: TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - - unstakeGmx: TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - - votingPowerType: TypedContractMethod<[], [bigint], "view">; - - weth: TypedContractMethod<[], [string], "view">; - - withdrawToken: TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "BASIS_POINTS_DIVISOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "acceptTransfer"): TypedContractMethod<[_sender: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "batchCompoundForAccounts" - ): TypedContractMethod<[_accounts: AddressLike[]], [void], "nonpayable">; - getFunction( - nameOrSignature: "batchRestakeForAccounts" - ): TypedContractMethod<[_accounts: AddressLike[]], [void], "nonpayable">; - getFunction( - nameOrSignature: "batchStakeGmxForAccounts" - ): TypedContractMethod<[_accounts: AddressLike[], _amounts: BigNumberish[]], [void], "nonpayable">; - getFunction(nameOrSignature: "bnGmx"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "bonusGmxTracker"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "claim"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "claimEsGmx"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "claimFees"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "compound"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "esGmx"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "extendedGmxTracker"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "externalHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "feeGlpTracker"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "feeGmxTracker"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "glp"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "glpManager"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "glpVester"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "gmx"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "gmxVester"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "govToken"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "handleRewards" - ): TypedContractMethod< - [ - _shouldClaimGmx: boolean, - _shouldStakeGmx: boolean, - _shouldClaimEsGmx: boolean, - _shouldStakeEsGmx: boolean, - _shouldStakeMultiplierPoints: boolean, - _shouldClaimWeth: boolean, - _shouldConvertWethToEth: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "handleRewardsV2" - ): TypedContractMethod< - [ - _gmxReceiver: AddressLike, - _shouldClaimGmx: boolean, - _shouldStakeGmx: boolean, - _shouldClaimEsGmx: boolean, - _shouldStakeEsGmx: boolean, - _shouldStakeMultiplierPoints: boolean, - _shouldClaimWeth: boolean, - _shouldConvertWethToEth: boolean, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "inRestakingMode"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "inStrictTransferMode"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "initialize" - ): TypedContractMethod<[_initializeParams: RewardRouterV2.InitializeParamsStruct], [void], "nonpayable">; - getFunction(nameOrSignature: "isInitialized"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "makeExternalCalls" - ): TypedContractMethod< - [ - externalCallTargets: AddressLike[], - externalCallDataList: BytesLike[], - refundTokens: AddressLike[], - refundReceivers: AddressLike[], - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "maxBoostBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "mintAndStakeGlp" - ): TypedContractMethod< - [_token: AddressLike, _amount: BigNumberish, _minUsdg: BigNumberish, _minGlp: BigNumberish], - [bigint], - "nonpayable" - >; - getFunction( - nameOrSignature: "mintAndStakeGlpETH" - ): TypedContractMethod<[_minUsdg: BigNumberish, _minGlp: BigNumberish], [bigint], "payable">; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "nonpayable">; - getFunction(nameOrSignature: "pendingReceivers"): TypedContractMethod<[arg0: AddressLike], [string], "view">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setGovToken"): TypedContractMethod<[_govToken: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInRestakingMode" - ): TypedContractMethod<[_inRestakingMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInStrictTransferMode" - ): TypedContractMethod<[_inStrictTransferMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxBoostBasisPoints" - ): TypedContractMethod<[_maxBoostBasisPoints: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setVotingPowerType" - ): TypedContractMethod<[_votingPowerType: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "signalTransfer"): TypedContractMethod<[_receiver: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "stakeEsGmx"): TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "stakeGmx"): TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "stakedGlpTracker"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "stakedGmxTracker"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "unstakeAndRedeemGlp" - ): TypedContractMethod< - [_tokenOut: AddressLike, _glpAmount: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - getFunction( - nameOrSignature: "unstakeAndRedeemGlpETH" - ): TypedContractMethod< - [_glpAmount: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - getFunction(nameOrSignature: "unstakeEsGmx"): TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "unstakeGmx"): TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "votingPowerType"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "weth"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "withdrawToken" - ): TypedContractMethod<[_token: AddressLike, _account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - getEvent( - key: "StakeGlp" - ): TypedContractEvent; - getEvent( - key: "StakeGmx" - ): TypedContractEvent; - getEvent( - key: "UnstakeGlp" - ): TypedContractEvent; - getEvent( - key: "UnstakeGmx" - ): TypedContractEvent; - - filters: { - "StakeGlp(address,uint256)": TypedContractEvent< - StakeGlpEvent.InputTuple, - StakeGlpEvent.OutputTuple, - StakeGlpEvent.OutputObject - >; - StakeGlp: TypedContractEvent; - - "StakeGmx(address,address,uint256)": TypedContractEvent< - StakeGmxEvent.InputTuple, - StakeGmxEvent.OutputTuple, - StakeGmxEvent.OutputObject - >; - StakeGmx: TypedContractEvent; - - "UnstakeGlp(address,uint256)": TypedContractEvent< - UnstakeGlpEvent.InputTuple, - UnstakeGlpEvent.OutputTuple, - UnstakeGlpEvent.OutputObject - >; - UnstakeGlp: TypedContractEvent< - UnstakeGlpEvent.InputTuple, - UnstakeGlpEvent.OutputTuple, - UnstakeGlpEvent.OutputObject - >; - - "UnstakeGmx(address,address,uint256)": TypedContractEvent< - UnstakeGmxEvent.InputTuple, - UnstakeGmxEvent.OutputTuple, - UnstakeGmxEvent.OutputObject - >; - UnstakeGmx: TypedContractEvent< - UnstakeGmxEvent.InputTuple, - UnstakeGmxEvent.OutputTuple, - UnstakeGmxEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/RewardTracker.ts b/src/typechain-types/RewardTracker.ts deleted file mode 100644 index bf2757d16d..0000000000 --- a/src/typechain-types/RewardTracker.ts +++ /dev/null @@ -1,497 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface RewardTrackerInterface extends Interface { - getFunction( - nameOrSignature: - | "BASIS_POINTS_DIVISOR" - | "PRECISION" - | "allowance" - | "allowances" - | "approve" - | "averageStakedAmounts" - | "balanceOf" - | "balances" - | "claim" - | "claimForAccount" - | "claimable" - | "claimableReward" - | "cumulativeRewardPerToken" - | "cumulativeRewards" - | "decimals" - | "depositBalances" - | "distributor" - | "gov" - | "inPrivateClaimingMode" - | "inPrivateStakingMode" - | "inPrivateTransferMode" - | "initialize" - | "isDepositToken" - | "isHandler" - | "isInitialized" - | "name" - | "previousCumulatedRewardPerToken" - | "rewardToken" - | "setDepositToken" - | "setGov" - | "setHandler" - | "setInPrivateClaimingMode" - | "setInPrivateStakingMode" - | "setInPrivateTransferMode" - | "stake" - | "stakeForAccount" - | "stakedAmounts" - | "symbol" - | "tokensPerInterval" - | "totalDepositSupply" - | "totalSupply" - | "transfer" - | "transferFrom" - | "unstake" - | "unstakeForAccount" - | "updateRewards" - | "withdrawToken" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Approval" | "Claim" | "Transfer"): EventFragment; - - encodeFunctionData(functionFragment: "BASIS_POINTS_DIVISOR", values?: undefined): string; - encodeFunctionData(functionFragment: "PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "allowances", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "averageStakedAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "balances", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "claim", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "claimForAccount", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "claimable", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "claimableReward", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "cumulativeRewardPerToken", values?: undefined): string; - encodeFunctionData(functionFragment: "cumulativeRewards", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "depositBalances", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "distributor", values?: undefined): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "inPrivateClaimingMode", values?: undefined): string; - encodeFunctionData(functionFragment: "inPrivateStakingMode", values?: undefined): string; - encodeFunctionData(functionFragment: "inPrivateTransferMode", values?: undefined): string; - encodeFunctionData(functionFragment: "initialize", values: [AddressLike[], AddressLike]): string; - encodeFunctionData(functionFragment: "isDepositToken", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isHandler", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "previousCumulatedRewardPerToken", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "rewardToken", values?: undefined): string; - encodeFunctionData(functionFragment: "setDepositToken", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setHandler", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setInPrivateClaimingMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setInPrivateStakingMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setInPrivateTransferMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "stake", values: [AddressLike, BigNumberish]): string; - encodeFunctionData( - functionFragment: "stakeForAccount", - values: [AddressLike, AddressLike, AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "stakedAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "tokensPerInterval", values?: undefined): string; - encodeFunctionData(functionFragment: "totalDepositSupply", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "unstake", values: [AddressLike, BigNumberish]): string; - encodeFunctionData( - functionFragment: "unstakeForAccount", - values: [AddressLike, AddressLike, BigNumberish, AddressLike] - ): string; - encodeFunctionData(functionFragment: "updateRewards", values?: undefined): string; - encodeFunctionData(functionFragment: "withdrawToken", values: [AddressLike, AddressLike, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "BASIS_POINTS_DIVISOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "averageStakedAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimForAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimable", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimableReward", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cumulativeRewardPerToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cumulativeRewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "depositBalances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "distributor", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inPrivateClaimingMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inPrivateStakingMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inPrivateTransferMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isDepositToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "previousCumulatedRewardPerToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "rewardToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setDepositToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInPrivateClaimingMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInPrivateStakingMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInPrivateTransferMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stake", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stakeForAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stakedAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokensPerInterval", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalDepositSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "unstake", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "unstakeForAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateRewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawToken", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; - export interface OutputObject { - owner: string; - spender: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace ClaimEvent { - export type InputTuple = [receiver: AddressLike, amount: BigNumberish]; - export type OutputTuple = [receiver: string, amount: bigint]; - export interface OutputObject { - receiver: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface RewardTracker extends BaseContract { - connect(runner?: ContractRunner | null): RewardTracker; - waitForDeployment(): Promise; - - interface: RewardTrackerInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - BASIS_POINTS_DIVISOR: TypedContractMethod<[], [bigint], "view">; - - PRECISION: TypedContractMethod<[], [bigint], "view">; - - allowance: TypedContractMethod<[_owner: AddressLike, _spender: AddressLike], [bigint], "view">; - - allowances: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - - approve: TypedContractMethod<[_spender: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - - averageStakedAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - balanceOf: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - balances: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - claim: TypedContractMethod<[_receiver: AddressLike], [bigint], "nonpayable">; - - claimForAccount: TypedContractMethod<[_account: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - claimable: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - claimableReward: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - cumulativeRewardPerToken: TypedContractMethod<[], [bigint], "view">; - - cumulativeRewards: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - decimals: TypedContractMethod<[], [bigint], "view">; - - depositBalances: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - - distributor: TypedContractMethod<[], [string], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - inPrivateClaimingMode: TypedContractMethod<[], [boolean], "view">; - - inPrivateStakingMode: TypedContractMethod<[], [boolean], "view">; - - inPrivateTransferMode: TypedContractMethod<[], [boolean], "view">; - - initialize: TypedContractMethod<[_depositTokens: AddressLike[], _distributor: AddressLike], [void], "nonpayable">; - - isDepositToken: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isHandler: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isInitialized: TypedContractMethod<[], [boolean], "view">; - - name: TypedContractMethod<[], [string], "view">; - - previousCumulatedRewardPerToken: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - rewardToken: TypedContractMethod<[], [string], "view">; - - setDepositToken: TypedContractMethod<[_depositToken: AddressLike, _isDepositToken: boolean], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setHandler: TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setInPrivateClaimingMode: TypedContractMethod<[_inPrivateClaimingMode: boolean], [void], "nonpayable">; - - setInPrivateStakingMode: TypedContractMethod<[_inPrivateStakingMode: boolean], [void], "nonpayable">; - - setInPrivateTransferMode: TypedContractMethod<[_inPrivateTransferMode: boolean], [void], "nonpayable">; - - stake: TypedContractMethod<[_depositToken: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - stakeForAccount: TypedContractMethod< - [_fundingAccount: AddressLike, _account: AddressLike, _depositToken: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - stakedAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - symbol: TypedContractMethod<[], [string], "view">; - - tokensPerInterval: TypedContractMethod<[], [bigint], "view">; - - totalDepositSupply: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transfer: TypedContractMethod<[_recipient: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - - transferFrom: TypedContractMethod< - [_sender: AddressLike, _recipient: AddressLike, _amount: BigNumberish], - [boolean], - "nonpayable" - >; - - unstake: TypedContractMethod<[_depositToken: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - unstakeForAccount: TypedContractMethod< - [_account: AddressLike, _depositToken: AddressLike, _amount: BigNumberish, _receiver: AddressLike], - [void], - "nonpayable" - >; - - updateRewards: TypedContractMethod<[], [void], "nonpayable">; - - withdrawToken: TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "BASIS_POINTS_DIVISOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "allowance" - ): TypedContractMethod<[_owner: AddressLike, _spender: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "allowances" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[_spender: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "averageStakedAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "balances"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "claim"): TypedContractMethod<[_receiver: AddressLike], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "claimForAccount" - ): TypedContractMethod<[_account: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - getFunction(nameOrSignature: "claimable"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "claimableReward"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "cumulativeRewardPerToken"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "cumulativeRewards"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "depositBalances" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "distributor"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "inPrivateClaimingMode"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "inPrivateStakingMode"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "inPrivateTransferMode"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "initialize" - ): TypedContractMethod<[_depositTokens: AddressLike[], _distributor: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "isDepositToken"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isHandler"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isInitialized"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "previousCumulatedRewardPerToken" - ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "rewardToken"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "setDepositToken" - ): TypedContractMethod<[_depositToken: AddressLike, _isDepositToken: boolean], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setHandler" - ): TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInPrivateClaimingMode" - ): TypedContractMethod<[_inPrivateClaimingMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInPrivateStakingMode" - ): TypedContractMethod<[_inPrivateStakingMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInPrivateTransferMode" - ): TypedContractMethod<[_inPrivateTransferMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "stake" - ): TypedContractMethod<[_depositToken: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "stakeForAccount" - ): TypedContractMethod< - [_fundingAccount: AddressLike, _account: AddressLike, _depositToken: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "stakedAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "tokensPerInterval"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "totalDepositSupply"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transfer" - ): TypedContractMethod<[_recipient: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod< - [_sender: AddressLike, _recipient: AddressLike, _amount: BigNumberish], - [boolean], - "nonpayable" - >; - getFunction( - nameOrSignature: "unstake" - ): TypedContractMethod<[_depositToken: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "unstakeForAccount" - ): TypedContractMethod< - [_account: AddressLike, _depositToken: AddressLike, _amount: BigNumberish, _receiver: AddressLike], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "updateRewards"): TypedContractMethod<[], [void], "nonpayable">; - getFunction( - nameOrSignature: "withdrawToken" - ): TypedContractMethod<[_token: AddressLike, _account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent(key: "Claim"): TypedContractEvent; - getEvent( - key: "Transfer" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "Claim(address,uint256)": TypedContractEvent< - ClaimEvent.InputTuple, - ClaimEvent.OutputTuple, - ClaimEvent.OutputObject - >; - Claim: TypedContractEvent; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - }; -} diff --git a/src/typechain-types/Router.ts b/src/typechain-types/Router.ts deleted file mode 100644 index 1a788a1a55..0000000000 --- a/src/typechain-types/Router.ts +++ /dev/null @@ -1,453 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface RouterInterface extends Interface { - getFunction( - nameOrSignature: - | "addPlugin" - | "approvePlugin" - | "approvedPlugins" - | "decreasePosition" - | "decreasePositionETH" - | "denyPlugin" - | "directPoolDeposit" - | "gov" - | "increasePosition" - | "increasePositionETH" - | "pluginDecreasePosition" - | "pluginIncreasePosition" - | "pluginTransfer" - | "plugins" - | "removePlugin" - | "setGov" - | "swap" - | "swapETHToTokens" - | "swapTokensToETH" - | "usdg" - | "vault" - | "weth" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; - - encodeFunctionData(functionFragment: "addPlugin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "approvePlugin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "approvedPlugins", values: [AddressLike, AddressLike]): string; - encodeFunctionData( - functionFragment: "decreasePosition", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, boolean, AddressLike, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "decreasePositionETH", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, boolean, AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "denyPlugin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "directPoolDeposit", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData( - functionFragment: "increasePosition", - values: [AddressLike[], AddressLike, BigNumberish, BigNumberish, BigNumberish, boolean, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "increasePositionETH", - values: [AddressLike[], AddressLike, BigNumberish, BigNumberish, boolean, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "pluginDecreasePosition", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, BigNumberish, boolean, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "pluginIncreasePosition", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, boolean] - ): string; - encodeFunctionData( - functionFragment: "pluginTransfer", - values: [AddressLike, AddressLike, AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "plugins", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "removePlugin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "swap", - values: [AddressLike[], BigNumberish, BigNumberish, AddressLike] - ): string; - encodeFunctionData(functionFragment: "swapETHToTokens", values: [AddressLike[], BigNumberish, AddressLike]): string; - encodeFunctionData( - functionFragment: "swapTokensToETH", - values: [AddressLike[], BigNumberish, BigNumberish, AddressLike] - ): string; - encodeFunctionData(functionFragment: "usdg", values?: undefined): string; - encodeFunctionData(functionFragment: "vault", values?: undefined): string; - encodeFunctionData(functionFragment: "weth", values?: undefined): string; - - decodeFunctionResult(functionFragment: "addPlugin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approvePlugin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approvedPlugins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePositionETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "denyPlugin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "directPoolDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePositionETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pluginDecreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pluginIncreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pluginTransfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "plugins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removePlugin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapETHToTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapTokensToETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdg", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; -} - -export namespace SwapEvent { - export type InputTuple = [ - account: AddressLike, - tokenIn: AddressLike, - tokenOut: AddressLike, - amountIn: BigNumberish, - amountOut: BigNumberish, - ]; - export type OutputTuple = [account: string, tokenIn: string, tokenOut: string, amountIn: bigint, amountOut: bigint]; - export interface OutputObject { - account: string; - tokenIn: string; - tokenOut: string; - amountIn: bigint; - amountOut: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface Router extends BaseContract { - connect(runner?: ContractRunner | null): Router; - waitForDeployment(): Promise; - - interface: RouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - addPlugin: TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - - approvePlugin: TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - - approvedPlugins: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [boolean], "view">; - - decreasePosition: TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - - decreasePositionETH: TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - - denyPlugin: TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - - directPoolDeposit: TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - gov: TypedContractMethod<[], [string], "view">; - - increasePosition: TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _amountIn: BigNumberish, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - - increasePositionETH: TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "payable" - >; - - pluginDecreasePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - - pluginIncreasePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _isLong: boolean, - ], - [void], - "nonpayable" - >; - - pluginTransfer: TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _receiver: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - plugins: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - removePlugin: TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - swap: TypedContractMethod< - [_path: AddressLike[], _amountIn: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [void], - "nonpayable" - >; - - swapETHToTokens: TypedContractMethod< - [_path: AddressLike[], _minOut: BigNumberish, _receiver: AddressLike], - [void], - "payable" - >; - - swapTokensToETH: TypedContractMethod< - [_path: AddressLike[], _amountIn: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [void], - "nonpayable" - >; - - usdg: TypedContractMethod<[], [string], "view">; - - vault: TypedContractMethod<[], [string], "view">; - - weth: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "addPlugin"): TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "approvePlugin"): TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "approvedPlugins" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "decreasePosition" - ): TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "decreasePositionETH" - ): TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "denyPlugin"): TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "directPoolDeposit" - ): TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "increasePosition" - ): TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _amountIn: BigNumberish, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "increasePositionETH" - ): TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "payable" - >; - getFunction( - nameOrSignature: "pluginDecreasePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - getFunction( - nameOrSignature: "pluginIncreasePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _isLong: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "pluginTransfer" - ): TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _receiver: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "plugins"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "removePlugin"): TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "swap" - ): TypedContractMethod< - [_path: AddressLike[], _amountIn: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "swapETHToTokens" - ): TypedContractMethod<[_path: AddressLike[], _minOut: BigNumberish, _receiver: AddressLike], [void], "payable">; - getFunction( - nameOrSignature: "swapTokensToETH" - ): TypedContractMethod< - [_path: AddressLike[], _amountIn: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "usdg"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "vault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "weth"): TypedContractMethod<[], [string], "view">; - - getEvent(key: "Swap"): TypedContractEvent; - - filters: { - "Swap(address,address,address,uint256,uint256)": TypedContractEvent< - SwapEvent.InputTuple, - SwapEvent.OutputTuple, - SwapEvent.OutputObject - >; - Swap: TypedContractEvent; - }; -} diff --git a/src/typechain-types/RouterV2.ts b/src/typechain-types/RouterV2.ts deleted file mode 100644 index 0d44f3b897..0000000000 --- a/src/typechain-types/RouterV2.ts +++ /dev/null @@ -1,453 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface RouterV2Interface extends Interface { - getFunction( - nameOrSignature: - | "addPlugin" - | "approvePlugin" - | "approvedPlugins" - | "decreasePosition" - | "decreasePositionETH" - | "denyPlugin" - | "directPoolDeposit" - | "gov" - | "increasePosition" - | "increasePositionETH" - | "pluginDecreasePosition" - | "pluginIncreasePosition" - | "pluginTransfer" - | "plugins" - | "removePlugin" - | "setGov" - | "swap" - | "swapETHToTokens" - | "swapTokensToETH" - | "usdg" - | "vault" - | "weth" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; - - encodeFunctionData(functionFragment: "addPlugin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "approvePlugin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "approvedPlugins", values: [AddressLike, AddressLike]): string; - encodeFunctionData( - functionFragment: "decreasePosition", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, boolean, AddressLike, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "decreasePositionETH", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, boolean, AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "denyPlugin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "directPoolDeposit", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData( - functionFragment: "increasePosition", - values: [AddressLike[], AddressLike, BigNumberish, BigNumberish, BigNumberish, boolean, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "increasePositionETH", - values: [AddressLike[], AddressLike, BigNumberish, BigNumberish, boolean, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "pluginDecreasePosition", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, BigNumberish, boolean, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "pluginIncreasePosition", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, boolean] - ): string; - encodeFunctionData( - functionFragment: "pluginTransfer", - values: [AddressLike, AddressLike, AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "plugins", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "removePlugin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "swap", - values: [AddressLike[], BigNumberish, BigNumberish, AddressLike] - ): string; - encodeFunctionData(functionFragment: "swapETHToTokens", values: [AddressLike[], BigNumberish, AddressLike]): string; - encodeFunctionData( - functionFragment: "swapTokensToETH", - values: [AddressLike[], BigNumberish, BigNumberish, AddressLike] - ): string; - encodeFunctionData(functionFragment: "usdg", values?: undefined): string; - encodeFunctionData(functionFragment: "vault", values?: undefined): string; - encodeFunctionData(functionFragment: "weth", values?: undefined): string; - - decodeFunctionResult(functionFragment: "addPlugin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approvePlugin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approvedPlugins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePositionETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "denyPlugin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "directPoolDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePositionETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pluginDecreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pluginIncreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pluginTransfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "plugins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removePlugin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapETHToTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapTokensToETH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdg", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; -} - -export namespace SwapEvent { - export type InputTuple = [ - account: AddressLike, - tokenIn: AddressLike, - tokenOut: AddressLike, - amountIn: BigNumberish, - amountOut: BigNumberish, - ]; - export type OutputTuple = [account: string, tokenIn: string, tokenOut: string, amountIn: bigint, amountOut: bigint]; - export interface OutputObject { - account: string; - tokenIn: string; - tokenOut: string; - amountIn: bigint; - amountOut: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface RouterV2 extends BaseContract { - connect(runner?: ContractRunner | null): RouterV2; - waitForDeployment(): Promise; - - interface: RouterV2Interface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - addPlugin: TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - - approvePlugin: TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - - approvedPlugins: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [boolean], "view">; - - decreasePosition: TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - - decreasePositionETH: TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - - denyPlugin: TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - - directPoolDeposit: TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - gov: TypedContractMethod<[], [string], "view">; - - increasePosition: TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _amountIn: BigNumberish, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - - increasePositionETH: TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "payable" - >; - - pluginDecreasePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - - pluginIncreasePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _isLong: boolean, - ], - [void], - "nonpayable" - >; - - pluginTransfer: TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _receiver: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - plugins: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - removePlugin: TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - swap: TypedContractMethod< - [_path: AddressLike[], _amountIn: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [void], - "nonpayable" - >; - - swapETHToTokens: TypedContractMethod< - [_path: AddressLike[], _minOut: BigNumberish, _receiver: AddressLike], - [void], - "payable" - >; - - swapTokensToETH: TypedContractMethod< - [_path: AddressLike[], _amountIn: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [void], - "nonpayable" - >; - - usdg: TypedContractMethod<[], [string], "view">; - - vault: TypedContractMethod<[], [string], "view">; - - weth: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "addPlugin"): TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "approvePlugin"): TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "approvedPlugins" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "decreasePosition" - ): TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "decreasePositionETH" - ): TypedContractMethod< - [ - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "denyPlugin"): TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "directPoolDeposit" - ): TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "increasePosition" - ): TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _amountIn: BigNumberish, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "increasePositionETH" - ): TypedContractMethod< - [ - _path: AddressLike[], - _indexToken: AddressLike, - _minOut: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _price: BigNumberish, - ], - [void], - "payable" - >; - getFunction( - nameOrSignature: "pluginDecreasePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - getFunction( - nameOrSignature: "pluginIncreasePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _isLong: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "pluginTransfer" - ): TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _receiver: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "plugins"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "removePlugin"): TypedContractMethod<[_plugin: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "swap" - ): TypedContractMethod< - [_path: AddressLike[], _amountIn: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "swapETHToTokens" - ): TypedContractMethod<[_path: AddressLike[], _minOut: BigNumberish, _receiver: AddressLike], [void], "payable">; - getFunction( - nameOrSignature: "swapTokensToETH" - ): TypedContractMethod< - [_path: AddressLike[], _amountIn: BigNumberish, _minOut: BigNumberish, _receiver: AddressLike], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "usdg"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "vault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "weth"): TypedContractMethod<[], [string], "view">; - - getEvent(key: "Swap"): TypedContractEvent; - - filters: { - "Swap(address,address,address,uint256,uint256)": TypedContractEvent< - SwapEvent.InputTuple, - SwapEvent.OutputTuple, - SwapEvent.OutputObject - >; - Swap: TypedContractEvent; - }; -} diff --git a/src/typechain-types/SmartAccount.ts b/src/typechain-types/SmartAccount.ts deleted file mode 100644 index e5a4f16a65..0000000000 --- a/src/typechain-types/SmartAccount.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BytesLike, - FunctionFragment, - Result, - Interface, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface SmartAccountInterface extends Interface { - getFunction(nameOrSignature: "isValidSignature"): FunctionFragment; - - encodeFunctionData(functionFragment: "isValidSignature", values: [BytesLike, BytesLike]): string; - - decodeFunctionResult(functionFragment: "isValidSignature", data: BytesLike): Result; -} - -export interface SmartAccount extends BaseContract { - connect(runner?: ContractRunner | null): SmartAccount; - waitForDeployment(): Promise; - - interface: SmartAccountInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - isValidSignature: TypedContractMethod<[_hash: BytesLike, _signature: BytesLike], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "isValidSignature" - ): TypedContractMethod<[_hash: BytesLike, _signature: BytesLike], [string], "view">; - - filters: {}; -} diff --git a/src/typechain-types/StBTC.ts b/src/typechain-types/StBTC.ts deleted file mode 100644 index 2d8915fc2c..0000000000 --- a/src/typechain-types/StBTC.ts +++ /dev/null @@ -1,639 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface StBTCInterface extends Interface { - getFunction( - nameOrSignature: - | "acceptOwnership" - | "allowance" - | "approve" - | "asset" - | "assetsPerShare" - | "balanceOf" - | "convertToAssets" - | "convertToShares" - | "decimals" - | "deposit" - | "directDeposit" - | "earned" - | "feeReceiver" - | "harvest" - | "initialize" - | "lastTimeRewardApplicable" - | "lastUpdateTime" - | "maxDeposit" - | "maxMint" - | "maxRedeem" - | "maxWithdraw" - | "mint" - | "name" - | "notifyRewardAmount" - | "owner" - | "pendingOwner" - | "periodFinish" - | "previewDeposit" - | "previewMint" - | "previewRedeem" - | "previewWithdraw" - | "redeem" - | "renounceOwnership" - | "rewardPerToken" - | "rewardPerTokenPaid" - | "rewardPerTokenStored" - | "rewardRate" - | "rewards" - | "setFeeReceiver" - | "symbol" - | "totalAssets" - | "totalStaked" - | "totalSupply" - | "transfer" - | "transferFrom" - | "transferOwnership" - | "withdraw" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: - | "Approval" - | "Deposit" - | "Harvest" - | "Initialized" - | "OwnershipTransferStarted" - | "OwnershipTransferred" - | "RewardAdded" - | "Transfer" - | "Withdraw" - ): EventFragment; - - encodeFunctionData(functionFragment: "acceptOwnership", values?: undefined): string; - encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "asset", values?: undefined): string; - encodeFunctionData(functionFragment: "assetsPerShare", values?: undefined): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "convertToAssets", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "convertToShares", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "deposit", values: [BigNumberish, AddressLike]): string; - encodeFunctionData(functionFragment: "directDeposit", values: [BigNumberish, AddressLike]): string; - encodeFunctionData(functionFragment: "earned", values?: undefined): string; - encodeFunctionData(functionFragment: "feeReceiver", values?: undefined): string; - encodeFunctionData(functionFragment: "harvest", values?: undefined): string; - encodeFunctionData(functionFragment: "initialize", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "lastTimeRewardApplicable", values?: undefined): string; - encodeFunctionData(functionFragment: "lastUpdateTime", values?: undefined): string; - encodeFunctionData(functionFragment: "maxDeposit", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "maxMint", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "maxRedeem", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "maxWithdraw", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "mint", values: [BigNumberish, AddressLike]): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "notifyRewardAmount", values?: undefined): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData(functionFragment: "pendingOwner", values?: undefined): string; - encodeFunctionData(functionFragment: "periodFinish", values?: undefined): string; - encodeFunctionData(functionFragment: "previewDeposit", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "previewMint", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "previewRedeem", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "previewWithdraw", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "redeem", values: [BigNumberish, AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string; - encodeFunctionData(functionFragment: "rewardPerToken", values?: undefined): string; - encodeFunctionData(functionFragment: "rewardPerTokenPaid", values?: undefined): string; - encodeFunctionData(functionFragment: "rewardPerTokenStored", values?: undefined): string; - encodeFunctionData(functionFragment: "rewardRate", values?: undefined): string; - encodeFunctionData(functionFragment: "rewards", values?: undefined): string; - encodeFunctionData(functionFragment: "setFeeReceiver", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "totalAssets", values?: undefined): string; - encodeFunctionData(functionFragment: "totalStaked", values?: undefined): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "withdraw", values: [BigNumberish, AddressLike, AddressLike]): string; - - decodeFunctionResult(functionFragment: "acceptOwnership", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "asset", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "assetsPerShare", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "convertToAssets", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "convertToShares", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "directDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "earned", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "feeReceiver", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "harvest", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lastTimeRewardApplicable", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lastUpdateTime", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxMint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxRedeem", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxWithdraw", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "notifyRewardAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pendingOwner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "periodFinish", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "previewDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "previewMint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "previewRedeem", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "previewWithdraw", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "redeem", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "rewardPerToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "rewardPerTokenPaid", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "rewardPerTokenStored", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "rewardRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "rewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFeeReceiver", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalAssets", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalStaked", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; - export interface OutputObject { - owner: string; - spender: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DepositEvent { - export type InputTuple = [sender: AddressLike, owner: AddressLike, assets: BigNumberish, shares: BigNumberish]; - export type OutputTuple = [sender: string, owner: string, assets: bigint, shares: bigint]; - export interface OutputObject { - sender: string; - owner: string; - assets: bigint; - shares: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace HarvestEvent { - export type InputTuple = [caller: AddressLike, value: BigNumberish]; - export type OutputTuple = [caller: string, value: bigint]; - export interface OutputObject { - caller: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace InitializedEvent { - export type InputTuple = [version: BigNumberish]; - export type OutputTuple = [version: bigint]; - export interface OutputObject { - version: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace OwnershipTransferStartedEvent { - export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; - export type OutputTuple = [previousOwner: string, newOwner: string]; - export interface OutputObject { - previousOwner: string; - newOwner: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace OwnershipTransferredEvent { - export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; - export type OutputTuple = [previousOwner: string, newOwner: string]; - export interface OutputObject { - previousOwner: string; - newOwner: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace RewardAddedEvent { - export type InputTuple = [reward: BigNumberish]; - export type OutputTuple = [reward: bigint]; - export interface OutputObject { - reward: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace WithdrawEvent { - export type InputTuple = [ - sender: AddressLike, - receiver: AddressLike, - owner: AddressLike, - assets: BigNumberish, - shares: BigNumberish, - ]; - export type OutputTuple = [sender: string, receiver: string, owner: string, assets: bigint, shares: bigint]; - export interface OutputObject { - sender: string; - receiver: string; - owner: string; - assets: bigint; - shares: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface StBTC extends BaseContract { - connect(runner?: ContractRunner | null): StBTC; - waitForDeployment(): Promise; - - interface: StBTCInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - acceptOwnership: TypedContractMethod<[], [void], "nonpayable">; - - allowance: TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; - - approve: TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - - asset: TypedContractMethod<[], [string], "view">; - - assetsPerShare: TypedContractMethod<[], [bigint], "view">; - - balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; - - convertToAssets: TypedContractMethod<[shares: BigNumberish], [bigint], "view">; - - convertToShares: TypedContractMethod<[assets: BigNumberish], [bigint], "view">; - - decimals: TypedContractMethod<[], [bigint], "view">; - - deposit: TypedContractMethod<[assets: BigNumberish, receiver: AddressLike], [bigint], "nonpayable">; - - directDeposit: TypedContractMethod<[assets: BigNumberish, receiver: AddressLike], [bigint], "payable">; - - earned: TypedContractMethod<[], [bigint], "view">; - - feeReceiver: TypedContractMethod<[], [string], "view">; - - harvest: TypedContractMethod<[], [void], "nonpayable">; - - initialize: TypedContractMethod<[_asset: AddressLike, _initialOwner: AddressLike], [void], "nonpayable">; - - lastTimeRewardApplicable: TypedContractMethod<[], [bigint], "view">; - - lastUpdateTime: TypedContractMethod<[], [bigint], "view">; - - maxDeposit: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - maxMint: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - maxRedeem: TypedContractMethod<[owner: AddressLike], [bigint], "view">; - - maxWithdraw: TypedContractMethod<[owner: AddressLike], [bigint], "view">; - - mint: TypedContractMethod<[shares: BigNumberish, receiver: AddressLike], [bigint], "nonpayable">; - - name: TypedContractMethod<[], [string], "view">; - - notifyRewardAmount: TypedContractMethod<[], [void], "nonpayable">; - - owner: TypedContractMethod<[], [string], "view">; - - pendingOwner: TypedContractMethod<[], [string], "view">; - - periodFinish: TypedContractMethod<[], [bigint], "view">; - - previewDeposit: TypedContractMethod<[assets: BigNumberish], [bigint], "view">; - - previewMint: TypedContractMethod<[shares: BigNumberish], [bigint], "view">; - - previewRedeem: TypedContractMethod<[shares: BigNumberish], [bigint], "view">; - - previewWithdraw: TypedContractMethod<[assets: BigNumberish], [bigint], "view">; - - redeem: TypedContractMethod< - [shares: BigNumberish, receiver: AddressLike, owner: AddressLike], - [bigint], - "nonpayable" - >; - - renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; - - rewardPerToken: TypedContractMethod<[], [bigint], "view">; - - rewardPerTokenPaid: TypedContractMethod<[], [bigint], "view">; - - rewardPerTokenStored: TypedContractMethod<[], [bigint], "view">; - - rewardRate: TypedContractMethod<[], [bigint], "view">; - - rewards: TypedContractMethod<[], [bigint], "view">; - - setFeeReceiver: TypedContractMethod<[_newFeeReceiver: AddressLike], [void], "nonpayable">; - - symbol: TypedContractMethod<[], [string], "view">; - - totalAssets: TypedContractMethod<[], [bigint], "view">; - - totalStaked: TypedContractMethod<[], [bigint], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transfer: TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - - transferFrom: TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - - transferOwnership: TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; - - withdraw: TypedContractMethod< - [assets: BigNumberish, receiver: AddressLike, owner: AddressLike], - [bigint], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "acceptOwnership"): TypedContractMethod<[], [void], "nonpayable">; - getFunction( - nameOrSignature: "allowance" - ): TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "asset"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "assetsPerShare"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "convertToAssets"): TypedContractMethod<[shares: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "convertToShares"): TypedContractMethod<[assets: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "deposit" - ): TypedContractMethod<[assets: BigNumberish, receiver: AddressLike], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "directDeposit" - ): TypedContractMethod<[assets: BigNumberish, receiver: AddressLike], [bigint], "payable">; - getFunction(nameOrSignature: "earned"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "feeReceiver"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "harvest"): TypedContractMethod<[], [void], "nonpayable">; - getFunction( - nameOrSignature: "initialize" - ): TypedContractMethod<[_asset: AddressLike, _initialOwner: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "lastTimeRewardApplicable"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "lastUpdateTime"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxDeposit"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "maxMint"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "maxRedeem"): TypedContractMethod<[owner: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "maxWithdraw"): TypedContractMethod<[owner: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "mint" - ): TypedContractMethod<[shares: BigNumberish, receiver: AddressLike], [bigint], "nonpayable">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "notifyRewardAmount"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "pendingOwner"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "periodFinish"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "previewDeposit"): TypedContractMethod<[assets: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "previewMint"): TypedContractMethod<[shares: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "previewRedeem"): TypedContractMethod<[shares: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "previewWithdraw"): TypedContractMethod<[assets: BigNumberish], [bigint], "view">; - getFunction( - nameOrSignature: "redeem" - ): TypedContractMethod<[shares: BigNumberish, receiver: AddressLike, owner: AddressLike], [bigint], "nonpayable">; - getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "rewardPerToken"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "rewardPerTokenPaid"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "rewardPerTokenStored"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "rewardRate"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "rewards"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "setFeeReceiver" - ): TypedContractMethod<[_newFeeReceiver: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "totalAssets"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "totalStaked"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transfer" - ): TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "withdraw" - ): TypedContractMethod<[assets: BigNumberish, receiver: AddressLike, owner: AddressLike], [bigint], "nonpayable">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent( - key: "Deposit" - ): TypedContractEvent; - getEvent( - key: "Harvest" - ): TypedContractEvent; - getEvent( - key: "Initialized" - ): TypedContractEvent; - getEvent( - key: "OwnershipTransferStarted" - ): TypedContractEvent< - OwnershipTransferStartedEvent.InputTuple, - OwnershipTransferStartedEvent.OutputTuple, - OwnershipTransferStartedEvent.OutputObject - >; - getEvent( - key: "OwnershipTransferred" - ): TypedContractEvent< - OwnershipTransferredEvent.InputTuple, - OwnershipTransferredEvent.OutputTuple, - OwnershipTransferredEvent.OutputObject - >; - getEvent( - key: "RewardAdded" - ): TypedContractEvent; - getEvent( - key: "Transfer" - ): TypedContractEvent; - getEvent( - key: "Withdraw" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "Deposit(address,address,uint256,uint256)": TypedContractEvent< - DepositEvent.InputTuple, - DepositEvent.OutputTuple, - DepositEvent.OutputObject - >; - Deposit: TypedContractEvent; - - "Harvest(address,uint256)": TypedContractEvent< - HarvestEvent.InputTuple, - HarvestEvent.OutputTuple, - HarvestEvent.OutputObject - >; - Harvest: TypedContractEvent; - - "Initialized(uint64)": TypedContractEvent< - InitializedEvent.InputTuple, - InitializedEvent.OutputTuple, - InitializedEvent.OutputObject - >; - Initialized: TypedContractEvent< - InitializedEvent.InputTuple, - InitializedEvent.OutputTuple, - InitializedEvent.OutputObject - >; - - "OwnershipTransferStarted(address,address)": TypedContractEvent< - OwnershipTransferStartedEvent.InputTuple, - OwnershipTransferStartedEvent.OutputTuple, - OwnershipTransferStartedEvent.OutputObject - >; - OwnershipTransferStarted: TypedContractEvent< - OwnershipTransferStartedEvent.InputTuple, - OwnershipTransferStartedEvent.OutputTuple, - OwnershipTransferStartedEvent.OutputObject - >; - - "OwnershipTransferred(address,address)": TypedContractEvent< - OwnershipTransferredEvent.InputTuple, - OwnershipTransferredEvent.OutputTuple, - OwnershipTransferredEvent.OutputObject - >; - OwnershipTransferred: TypedContractEvent< - OwnershipTransferredEvent.InputTuple, - OwnershipTransferredEvent.OutputTuple, - OwnershipTransferredEvent.OutputObject - >; - - "RewardAdded(uint256)": TypedContractEvent< - RewardAddedEvent.InputTuple, - RewardAddedEvent.OutputTuple, - RewardAddedEvent.OutputObject - >; - RewardAdded: TypedContractEvent< - RewardAddedEvent.InputTuple, - RewardAddedEvent.OutputTuple, - RewardAddedEvent.OutputObject - >; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - - "Withdraw(address,address,address,uint256,uint256)": TypedContractEvent< - WithdrawEvent.InputTuple, - WithdrawEvent.OutputTuple, - WithdrawEvent.OutputObject - >; - Withdraw: TypedContractEvent; - }; -} diff --git a/src/typechain-types/SubaccountApproval.ts b/src/typechain-types/SubaccountApproval.ts deleted file mode 100644 index 3af012c3f8..0000000000 --- a/src/typechain-types/SubaccountApproval.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, FunctionFragment, Interface, ContractRunner, ContractMethod, Listener } from "ethers"; -import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "./common"; - -export interface SubaccountApprovalInterface extends Interface {} - -export interface SubaccountApproval extends BaseContract { - connect(runner?: ContractRunner | null): SubaccountApproval; - waitForDeployment(): Promise; - - interface: SubaccountApprovalInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - getFunction(key: string | FunctionFragment): T; - - filters: {}; -} diff --git a/src/typechain-types/SubaccountGelatoRelayRouter.ts b/src/typechain-types/SubaccountGelatoRelayRouter.ts deleted file mode 100644 index 0db76eca4f..0000000000 --- a/src/typechain-types/SubaccountGelatoRelayRouter.ts +++ /dev/null @@ -1,656 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export type SubaccountApprovalStruct = { - subaccount: AddressLike; - shouldAdd: boolean; - expiresAt: BigNumberish; - maxAllowedCount: BigNumberish; - actionType: BytesLike; - nonce: BigNumberish; - desChainId: BigNumberish; - deadline: BigNumberish; - integrationId: BytesLike; - signature: BytesLike; -}; - -export type SubaccountApprovalStructOutput = [ - subaccount: string, - shouldAdd: boolean, - expiresAt: bigint, - maxAllowedCount: bigint, - actionType: string, - nonce: bigint, - desChainId: bigint, - deadline: bigint, - integrationId: string, - signature: string, -] & { - subaccount: string; - shouldAdd: boolean; - expiresAt: bigint; - maxAllowedCount: bigint; - actionType: string; - nonce: bigint; - desChainId: bigint; - deadline: bigint; - integrationId: string; - signature: string; -}; - -export declare namespace OracleUtils { - export type SetPricesParamsStruct = { - tokens: AddressLike[]; - providers: AddressLike[]; - data: BytesLike[]; - }; - - export type SetPricesParamsStructOutput = [tokens: string[], providers: string[], data: string[]] & { - tokens: string[]; - providers: string[]; - data: string[]; - }; -} - -export declare namespace IRelayUtils { - export type ExternalCallsStruct = { - sendTokens: AddressLike[]; - sendAmounts: BigNumberish[]; - externalCallTargets: AddressLike[]; - externalCallDataList: BytesLike[]; - refundTokens: AddressLike[]; - refundReceivers: AddressLike[]; - }; - - export type ExternalCallsStructOutput = [ - sendTokens: string[], - sendAmounts: bigint[], - externalCallTargets: string[], - externalCallDataList: string[], - refundTokens: string[], - refundReceivers: string[], - ] & { - sendTokens: string[]; - sendAmounts: bigint[]; - externalCallTargets: string[]; - externalCallDataList: string[]; - refundTokens: string[]; - refundReceivers: string[]; - }; - - export type TokenPermitStruct = { - owner: AddressLike; - spender: AddressLike; - value: BigNumberish; - deadline: BigNumberish; - v: BigNumberish; - r: BytesLike; - s: BytesLike; - token: AddressLike; - }; - - export type TokenPermitStructOutput = [ - owner: string, - spender: string, - value: bigint, - deadline: bigint, - v: bigint, - r: string, - s: string, - token: string, - ] & { - owner: string; - spender: string; - value: bigint; - deadline: bigint; - v: bigint; - r: string; - s: string; - token: string; - }; - - export type FeeParamsStruct = { - feeToken: AddressLike; - feeAmount: BigNumberish; - feeSwapPath: AddressLike[]; - }; - - export type FeeParamsStructOutput = [feeToken: string, feeAmount: bigint, feeSwapPath: string[]] & { - feeToken: string; - feeAmount: bigint; - feeSwapPath: string[]; - }; - - export type RelayParamsStruct = { - oracleParams: OracleUtils.SetPricesParamsStruct; - externalCalls: IRelayUtils.ExternalCallsStruct; - tokenPermits: IRelayUtils.TokenPermitStruct[]; - fee: IRelayUtils.FeeParamsStruct; - userNonce: BigNumberish; - deadline: BigNumberish; - signature: BytesLike; - desChainId: BigNumberish; - }; - - export type RelayParamsStructOutput = [ - oracleParams: OracleUtils.SetPricesParamsStructOutput, - externalCalls: IRelayUtils.ExternalCallsStructOutput, - tokenPermits: IRelayUtils.TokenPermitStructOutput[], - fee: IRelayUtils.FeeParamsStructOutput, - userNonce: bigint, - deadline: bigint, - signature: string, - desChainId: bigint, - ] & { - oracleParams: OracleUtils.SetPricesParamsStructOutput; - externalCalls: IRelayUtils.ExternalCallsStructOutput; - tokenPermits: IRelayUtils.TokenPermitStructOutput[]; - fee: IRelayUtils.FeeParamsStructOutput; - userNonce: bigint; - deadline: bigint; - signature: string; - desChainId: bigint; - }; - - export type UpdateOrderParamsStruct = { - key: BytesLike; - sizeDeltaUsd: BigNumberish; - acceptablePrice: BigNumberish; - triggerPrice: BigNumberish; - minOutputAmount: BigNumberish; - validFromTime: BigNumberish; - autoCancel: boolean; - executionFeeIncrease: BigNumberish; - }; - - export type UpdateOrderParamsStructOutput = [ - key: string, - sizeDeltaUsd: bigint, - acceptablePrice: bigint, - triggerPrice: bigint, - minOutputAmount: bigint, - validFromTime: bigint, - autoCancel: boolean, - executionFeeIncrease: bigint, - ] & { - key: string; - sizeDeltaUsd: bigint; - acceptablePrice: bigint; - triggerPrice: bigint; - minOutputAmount: bigint; - validFromTime: bigint; - autoCancel: boolean; - executionFeeIncrease: bigint; - }; - - export type BatchParamsStruct = { - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStruct[]; - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStruct[]; - cancelOrderKeys: BytesLike[]; - }; - - export type BatchParamsStructOutput = [ - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStructOutput[], - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStructOutput[], - cancelOrderKeys: string[], - ] & { - createOrderParamsList: IBaseOrderUtils.CreateOrderParamsStructOutput[]; - updateOrderParamsList: IRelayUtils.UpdateOrderParamsStructOutput[]; - cancelOrderKeys: string[]; - }; -} - -export declare namespace IBaseOrderUtils { - export type CreateOrderParamsAddressesStruct = { - receiver: AddressLike; - cancellationReceiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - initialCollateralToken: AddressLike; - swapPath: AddressLike[]; - }; - - export type CreateOrderParamsAddressesStructOutput = [ - receiver: string, - cancellationReceiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - initialCollateralToken: string, - swapPath: string[], - ] & { - receiver: string; - cancellationReceiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - initialCollateralToken: string; - swapPath: string[]; - }; - - export type CreateOrderParamsNumbersStruct = { - sizeDeltaUsd: BigNumberish; - initialCollateralDeltaAmount: BigNumberish; - triggerPrice: BigNumberish; - acceptablePrice: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - minOutputAmount: BigNumberish; - validFromTime: BigNumberish; - }; - - export type CreateOrderParamsNumbersStructOutput = [ - sizeDeltaUsd: bigint, - initialCollateralDeltaAmount: bigint, - triggerPrice: bigint, - acceptablePrice: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - minOutputAmount: bigint, - validFromTime: bigint, - ] & { - sizeDeltaUsd: bigint; - initialCollateralDeltaAmount: bigint; - triggerPrice: bigint; - acceptablePrice: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - minOutputAmount: bigint; - validFromTime: bigint; - }; - - export type CreateOrderParamsStruct = { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStruct; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStruct; - orderType: BigNumberish; - decreasePositionSwapType: BigNumberish; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: BytesLike; - dataList: BytesLike[]; - }; - - export type CreateOrderParamsStructOutput = [ - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput, - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput, - orderType: bigint, - decreasePositionSwapType: bigint, - isLong: boolean, - shouldUnwrapNativeToken: boolean, - autoCancel: boolean, - referralCode: string, - dataList: string[], - ] & { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput; - orderType: bigint; - decreasePositionSwapType: bigint; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: string; - dataList: string[]; - }; -} - -export interface SubaccountGelatoRelayRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "batch" - | "cancelOrder" - | "createOrder" - | "dataStore" - | "digests" - | "eventEmitter" - | "externalHandler" - | "multicall" - | "oracle" - | "orderHandler" - | "orderVault" - | "removeSubaccount" - | "roleStore" - | "router" - | "sendNativeToken" - | "sendTokens" - | "sendWnt" - | "subaccountApprovalNonces" - | "swapHandler" - | "updateOrder" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData( - functionFragment: "batch", - values: [ - IRelayUtils.RelayParamsStruct, - SubaccountApprovalStruct, - AddressLike, - AddressLike, - IRelayUtils.BatchParamsStruct, - ] - ): string; - encodeFunctionData( - functionFragment: "cancelOrder", - values: [IRelayUtils.RelayParamsStruct, SubaccountApprovalStruct, AddressLike, AddressLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "createOrder", - values: [ - IRelayUtils.RelayParamsStruct, - SubaccountApprovalStruct, - AddressLike, - AddressLike, - IBaseOrderUtils.CreateOrderParamsStruct, - ] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "digests", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData(functionFragment: "externalHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "oracle", values?: undefined): string; - encodeFunctionData(functionFragment: "orderHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "orderVault", values?: undefined): string; - encodeFunctionData( - functionFragment: "removeSubaccount", - values: [IRelayUtils.RelayParamsStruct, AddressLike, AddressLike] - ): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendNativeToken", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendWnt", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "subaccountApprovalNonces", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "swapHandler", values?: undefined): string; - encodeFunctionData( - functionFragment: "updateOrder", - values: [ - IRelayUtils.RelayParamsStruct, - SubaccountApprovalStruct, - AddressLike, - AddressLike, - IRelayUtils.UpdateOrderParamsStruct, - ] - ): string; - - decodeFunctionResult(functionFragment: "batch", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "digests", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "externalHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeSubaccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendNativeToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendWnt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "subaccountApprovalNonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateOrder", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface SubaccountGelatoRelayRouter extends BaseContract { - connect(runner?: ContractRunner | null): SubaccountGelatoRelayRouter; - waitForDeployment(): Promise; - - interface: SubaccountGelatoRelayRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - batch: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - subaccount: AddressLike, - params: IRelayUtils.BatchParamsStruct, - ], - [string[]], - "nonpayable" - >; - - cancelOrder: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - subaccount: AddressLike, - key: BytesLike, - ], - [void], - "nonpayable" - >; - - createOrder: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - subaccount: AddressLike, - params: IBaseOrderUtils.CreateOrderParamsStruct, - ], - [string], - "nonpayable" - >; - - dataStore: TypedContractMethod<[], [string], "view">; - - digests: TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - externalHandler: TypedContractMethod<[], [string], "view">; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - - oracle: TypedContractMethod<[], [string], "view">; - - orderHandler: TypedContractMethod<[], [string], "view">; - - orderVault: TypedContractMethod<[], [string], "view">; - - removeSubaccount: TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, subaccount: AddressLike], - [void], - "nonpayable" - >; - - roleStore: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendTokens: TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendWnt: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - subaccountApprovalNonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - swapHandler: TypedContractMethod<[], [string], "view">; - - updateOrder: TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - subaccount: AddressLike, - params: IRelayUtils.UpdateOrderParamsStruct, - ], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "batch" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - subaccount: AddressLike, - params: IRelayUtils.BatchParamsStruct, - ], - [string[]], - "nonpayable" - >; - getFunction( - nameOrSignature: "cancelOrder" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - subaccount: AddressLike, - key: BytesLike, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "createOrder" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - subaccount: AddressLike, - params: IBaseOrderUtils.CreateOrderParamsStruct, - ], - [string], - "nonpayable" - >; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "digests"): TypedContractMethod<[arg0: BytesLike], [boolean], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "externalHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - getFunction(nameOrSignature: "oracle"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderVault"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "removeSubaccount" - ): TypedContractMethod< - [relayParams: IRelayUtils.RelayParamsStruct, account: AddressLike, subaccount: AddressLike], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendWnt" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction(nameOrSignature: "subaccountApprovalNonces"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "swapHandler"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "updateOrder" - ): TypedContractMethod< - [ - relayParams: IRelayUtils.RelayParamsStruct, - subaccountApproval: SubaccountApprovalStruct, - account: AddressLike, - subaccount: AddressLike, - params: IRelayUtils.UpdateOrderParamsStruct, - ], - [void], - "nonpayable" - >; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/SubaccountRouter.ts b/src/typechain-types/SubaccountRouter.ts deleted file mode 100644 index e46d98d4ef..0000000000 --- a/src/typechain-types/SubaccountRouter.ts +++ /dev/null @@ -1,384 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace IBaseOrderUtils { - export type CreateOrderParamsAddressesStruct = { - receiver: AddressLike; - cancellationReceiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - initialCollateralToken: AddressLike; - swapPath: AddressLike[]; - }; - - export type CreateOrderParamsAddressesStructOutput = [ - receiver: string, - cancellationReceiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - initialCollateralToken: string, - swapPath: string[], - ] & { - receiver: string; - cancellationReceiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - initialCollateralToken: string; - swapPath: string[]; - }; - - export type CreateOrderParamsNumbersStruct = { - sizeDeltaUsd: BigNumberish; - initialCollateralDeltaAmount: BigNumberish; - triggerPrice: BigNumberish; - acceptablePrice: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - minOutputAmount: BigNumberish; - validFromTime: BigNumberish; - }; - - export type CreateOrderParamsNumbersStructOutput = [ - sizeDeltaUsd: bigint, - initialCollateralDeltaAmount: bigint, - triggerPrice: bigint, - acceptablePrice: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - minOutputAmount: bigint, - validFromTime: bigint, - ] & { - sizeDeltaUsd: bigint; - initialCollateralDeltaAmount: bigint; - triggerPrice: bigint; - acceptablePrice: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - minOutputAmount: bigint; - validFromTime: bigint; - }; - - export type CreateOrderParamsStruct = { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStruct; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStruct; - orderType: BigNumberish; - decreasePositionSwapType: BigNumberish; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: BytesLike; - dataList: BytesLike[]; - }; - - export type CreateOrderParamsStructOutput = [ - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput, - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput, - orderType: bigint, - decreasePositionSwapType: bigint, - isLong: boolean, - shouldUnwrapNativeToken: boolean, - autoCancel: boolean, - referralCode: string, - dataList: string[], - ] & { - addresses: IBaseOrderUtils.CreateOrderParamsAddressesStructOutput; - numbers: IBaseOrderUtils.CreateOrderParamsNumbersStructOutput; - orderType: bigint; - decreasePositionSwapType: bigint; - isLong: boolean; - shouldUnwrapNativeToken: boolean; - autoCancel: boolean; - referralCode: string; - dataList: string[]; - }; -} - -export interface SubaccountRouterInterface extends Interface { - getFunction( - nameOrSignature: - | "addSubaccount" - | "cancelOrder" - | "createOrder" - | "dataStore" - | "eventEmitter" - | "multicall" - | "orderHandler" - | "orderVault" - | "removeSubaccount" - | "roleStore" - | "router" - | "sendNativeToken" - | "sendTokens" - | "sendWnt" - | "setIntegrationId" - | "setMaxAllowedSubaccountActionCount" - | "setSubaccountAutoTopUpAmount" - | "setSubaccountExpiresAt" - | "updateOrder" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "TokenTransferReverted"): EventFragment; - - encodeFunctionData(functionFragment: "addSubaccount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "cancelOrder", values: [BytesLike]): string; - encodeFunctionData( - functionFragment: "createOrder", - values: [AddressLike, IBaseOrderUtils.CreateOrderParamsStruct] - ): string; - encodeFunctionData(functionFragment: "dataStore", values?: undefined): string; - encodeFunctionData(functionFragment: "eventEmitter", values?: undefined): string; - encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; - encodeFunctionData(functionFragment: "orderHandler", values?: undefined): string; - encodeFunctionData(functionFragment: "orderVault", values?: undefined): string; - encodeFunctionData(functionFragment: "removeSubaccount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sendNativeToken", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendTokens", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "sendWnt", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setIntegrationId", values: [AddressLike, BytesLike]): string; - encodeFunctionData( - functionFragment: "setMaxAllowedSubaccountActionCount", - values: [AddressLike, BytesLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "setSubaccountAutoTopUpAmount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData( - functionFragment: "setSubaccountExpiresAt", - values: [AddressLike, BytesLike, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "updateOrder", - values: [BytesLike, BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish, boolean] - ): string; - - decodeFunctionResult(functionFragment: "addSubaccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "createOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "dataStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eventEmitter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "orderVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeSubaccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendNativeToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sendWnt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIntegrationId", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxAllowedSubaccountActionCount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setSubaccountAutoTopUpAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setSubaccountExpiresAt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateOrder", data: BytesLike): Result; -} - -export namespace TokenTransferRevertedEvent { - export type InputTuple = [reason: string, returndata: BytesLike]; - export type OutputTuple = [reason: string, returndata: string]; - export interface OutputObject { - reason: string; - returndata: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface SubaccountRouter extends BaseContract { - connect(runner?: ContractRunner | null): SubaccountRouter; - waitForDeployment(): Promise; - - interface: SubaccountRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - addSubaccount: TypedContractMethod<[subaccount: AddressLike], [void], "payable">; - - cancelOrder: TypedContractMethod<[key: BytesLike], [void], "payable">; - - createOrder: TypedContractMethod< - [account: AddressLike, params: IBaseOrderUtils.CreateOrderParamsStruct], - [string], - "payable" - >; - - dataStore: TypedContractMethod<[], [string], "view">; - - eventEmitter: TypedContractMethod<[], [string], "view">; - - multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - - orderHandler: TypedContractMethod<[], [string], "view">; - - orderVault: TypedContractMethod<[], [string], "view">; - - removeSubaccount: TypedContractMethod<[subaccount: AddressLike], [void], "payable">; - - roleStore: TypedContractMethod<[], [string], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sendNativeToken: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendTokens: TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - sendWnt: TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - - setIntegrationId: TypedContractMethod<[subaccount: AddressLike, integrationId: BytesLike], [void], "payable">; - - setMaxAllowedSubaccountActionCount: TypedContractMethod< - [subaccount: AddressLike, actionType: BytesLike, maxAllowedCount: BigNumberish], - [void], - "payable" - >; - - setSubaccountAutoTopUpAmount: TypedContractMethod<[subaccount: AddressLike, amount: BigNumberish], [void], "payable">; - - setSubaccountExpiresAt: TypedContractMethod< - [subaccount: AddressLike, actionType: BytesLike, expiresAt: BigNumberish], - [void], - "payable" - >; - - updateOrder: TypedContractMethod< - [ - key: BytesLike, - sizeDeltaUsd: BigNumberish, - acceptablePrice: BigNumberish, - triggerPrice: BigNumberish, - minOutputAmount: BigNumberish, - validFromTime: BigNumberish, - autoCancel: boolean, - ], - [void], - "payable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "addSubaccount"): TypedContractMethod<[subaccount: AddressLike], [void], "payable">; - getFunction(nameOrSignature: "cancelOrder"): TypedContractMethod<[key: BytesLike], [void], "payable">; - getFunction( - nameOrSignature: "createOrder" - ): TypedContractMethod<[account: AddressLike, params: IBaseOrderUtils.CreateOrderParamsStruct], [string], "payable">; - getFunction(nameOrSignature: "dataStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "eventEmitter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - getFunction(nameOrSignature: "orderHandler"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "orderVault"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "removeSubaccount"): TypedContractMethod<[subaccount: AddressLike], [void], "payable">; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sendNativeToken" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendTokens" - ): TypedContractMethod<[token: AddressLike, receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "sendWnt" - ): TypedContractMethod<[receiver: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "setIntegrationId" - ): TypedContractMethod<[subaccount: AddressLike, integrationId: BytesLike], [void], "payable">; - getFunction( - nameOrSignature: "setMaxAllowedSubaccountActionCount" - ): TypedContractMethod< - [subaccount: AddressLike, actionType: BytesLike, maxAllowedCount: BigNumberish], - [void], - "payable" - >; - getFunction( - nameOrSignature: "setSubaccountAutoTopUpAmount" - ): TypedContractMethod<[subaccount: AddressLike, amount: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "setSubaccountExpiresAt" - ): TypedContractMethod<[subaccount: AddressLike, actionType: BytesLike, expiresAt: BigNumberish], [void], "payable">; - getFunction( - nameOrSignature: "updateOrder" - ): TypedContractMethod< - [ - key: BytesLike, - sizeDeltaUsd: BigNumberish, - acceptablePrice: BigNumberish, - triggerPrice: BigNumberish, - minOutputAmount: BigNumberish, - validFromTime: BigNumberish, - autoCancel: boolean, - ], - [void], - "payable" - >; - - getEvent( - key: "TokenTransferReverted" - ): TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - - filters: { - "TokenTransferReverted(string,bytes)": TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - TokenTransferReverted: TypedContractEvent< - TokenTransferRevertedEvent.InputTuple, - TokenTransferRevertedEvent.OutputTuple, - TokenTransferRevertedEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/SyntheticsReader.ts b/src/typechain-types/SyntheticsReader.ts deleted file mode 100644 index 31b0016df8..0000000000 --- a/src/typechain-types/SyntheticsReader.ts +++ /dev/null @@ -1,1710 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export declare namespace Order { - export type AddressesStruct = { - account: AddressLike; - receiver: AddressLike; - cancellationReceiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - initialCollateralToken: AddressLike; - swapPath: AddressLike[]; - }; - - export type AddressesStructOutput = [ - account: string, - receiver: string, - cancellationReceiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - initialCollateralToken: string, - swapPath: string[], - ] & { - account: string; - receiver: string; - cancellationReceiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - initialCollateralToken: string; - swapPath: string[]; - }; - - export type NumbersStruct = { - orderType: BigNumberish; - decreasePositionSwapType: BigNumberish; - sizeDeltaUsd: BigNumberish; - initialCollateralDeltaAmount: BigNumberish; - triggerPrice: BigNumberish; - acceptablePrice: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - minOutputAmount: BigNumberish; - updatedAtTime: BigNumberish; - validFromTime: BigNumberish; - srcChainId: BigNumberish; - }; - - export type NumbersStructOutput = [ - orderType: bigint, - decreasePositionSwapType: bigint, - sizeDeltaUsd: bigint, - initialCollateralDeltaAmount: bigint, - triggerPrice: bigint, - acceptablePrice: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - minOutputAmount: bigint, - updatedAtTime: bigint, - validFromTime: bigint, - srcChainId: bigint, - ] & { - orderType: bigint; - decreasePositionSwapType: bigint; - sizeDeltaUsd: bigint; - initialCollateralDeltaAmount: bigint; - triggerPrice: bigint; - acceptablePrice: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - minOutputAmount: bigint; - updatedAtTime: bigint; - validFromTime: bigint; - srcChainId: bigint; - }; - - export type FlagsStruct = { - isLong: boolean; - shouldUnwrapNativeToken: boolean; - isFrozen: boolean; - autoCancel: boolean; - }; - - export type FlagsStructOutput = [ - isLong: boolean, - shouldUnwrapNativeToken: boolean, - isFrozen: boolean, - autoCancel: boolean, - ] & { - isLong: boolean; - shouldUnwrapNativeToken: boolean; - isFrozen: boolean; - autoCancel: boolean; - }; - - export type PropsStruct = { - addresses: Order.AddressesStruct; - numbers: Order.NumbersStruct; - flags: Order.FlagsStruct; - _dataList: BytesLike[]; - }; - - export type PropsStructOutput = [ - addresses: Order.AddressesStructOutput, - numbers: Order.NumbersStructOutput, - flags: Order.FlagsStructOutput, - _dataList: string[], - ] & { - addresses: Order.AddressesStructOutput; - numbers: Order.NumbersStructOutput; - flags: Order.FlagsStructOutput; - _dataList: string[]; - }; -} - -export declare namespace ReaderUtils { - export type OrderInfoStruct = { - orderKey: BytesLike; - order: Order.PropsStruct; - }; - - export type OrderInfoStructOutput = [orderKey: string, order: Order.PropsStructOutput] & { - orderKey: string; - order: Order.PropsStructOutput; - }; - - export type BaseFundingValuesStruct = { - fundingFeeAmountPerSize: MarketUtils.PositionTypeStruct; - claimableFundingAmountPerSize: MarketUtils.PositionTypeStruct; - }; - - export type BaseFundingValuesStructOutput = [ - fundingFeeAmountPerSize: MarketUtils.PositionTypeStructOutput, - claimableFundingAmountPerSize: MarketUtils.PositionTypeStructOutput, - ] & { - fundingFeeAmountPerSize: MarketUtils.PositionTypeStructOutput; - claimableFundingAmountPerSize: MarketUtils.PositionTypeStructOutput; - }; - - export type VirtualInventoryStruct = { - virtualPoolAmountForLongToken: BigNumberish; - virtualPoolAmountForShortToken: BigNumberish; - virtualInventoryForPositions: BigNumberish; - }; - - export type VirtualInventoryStructOutput = [ - virtualPoolAmountForLongToken: bigint, - virtualPoolAmountForShortToken: bigint, - virtualInventoryForPositions: bigint, - ] & { - virtualPoolAmountForLongToken: bigint; - virtualPoolAmountForShortToken: bigint; - virtualInventoryForPositions: bigint; - }; - - export type MarketInfoStruct = { - market: Market.PropsStruct; - borrowingFactorPerSecondForLongs: BigNumberish; - borrowingFactorPerSecondForShorts: BigNumberish; - baseFunding: ReaderUtils.BaseFundingValuesStruct; - nextFunding: MarketUtils.GetNextFundingAmountPerSizeResultStruct; - virtualInventory: ReaderUtils.VirtualInventoryStruct; - isDisabled: boolean; - }; - - export type MarketInfoStructOutput = [ - market: Market.PropsStructOutput, - borrowingFactorPerSecondForLongs: bigint, - borrowingFactorPerSecondForShorts: bigint, - baseFunding: ReaderUtils.BaseFundingValuesStructOutput, - nextFunding: MarketUtils.GetNextFundingAmountPerSizeResultStructOutput, - virtualInventory: ReaderUtils.VirtualInventoryStructOutput, - isDisabled: boolean, - ] & { - market: Market.PropsStructOutput; - borrowingFactorPerSecondForLongs: bigint; - borrowingFactorPerSecondForShorts: bigint; - baseFunding: ReaderUtils.BaseFundingValuesStructOutput; - nextFunding: MarketUtils.GetNextFundingAmountPerSizeResultStructOutput; - virtualInventory: ReaderUtils.VirtualInventoryStructOutput; - isDisabled: boolean; - }; -} - -export declare namespace Price { - export type PropsStruct = { min: BigNumberish; max: BigNumberish }; - - export type PropsStructOutput = [min: bigint, max: bigint] & { - min: bigint; - max: bigint; - }; -} - -export declare namespace MarketUtils { - export type MarketPricesStruct = { - indexTokenPrice: Price.PropsStruct; - longTokenPrice: Price.PropsStruct; - shortTokenPrice: Price.PropsStruct; - }; - - export type MarketPricesStructOutput = [ - indexTokenPrice: Price.PropsStructOutput, - longTokenPrice: Price.PropsStructOutput, - shortTokenPrice: Price.PropsStructOutput, - ] & { - indexTokenPrice: Price.PropsStructOutput; - longTokenPrice: Price.PropsStructOutput; - shortTokenPrice: Price.PropsStructOutput; - }; - - export type CollateralTypeStruct = { - longToken: BigNumberish; - shortToken: BigNumberish; - }; - - export type CollateralTypeStructOutput = [longToken: bigint, shortToken: bigint] & { - longToken: bigint; - shortToken: bigint; - }; - - export type PositionTypeStruct = { - long: MarketUtils.CollateralTypeStruct; - short: MarketUtils.CollateralTypeStruct; - }; - - export type PositionTypeStructOutput = [ - long: MarketUtils.CollateralTypeStructOutput, - short: MarketUtils.CollateralTypeStructOutput, - ] & { - long: MarketUtils.CollateralTypeStructOutput; - short: MarketUtils.CollateralTypeStructOutput; - }; - - export type GetNextFundingAmountPerSizeResultStruct = { - longsPayShorts: boolean; - fundingFactorPerSecond: BigNumberish; - nextSavedFundingFactorPerSecond: BigNumberish; - fundingFeeAmountPerSizeDelta: MarketUtils.PositionTypeStruct; - claimableFundingAmountPerSizeDelta: MarketUtils.PositionTypeStruct; - }; - - export type GetNextFundingAmountPerSizeResultStructOutput = [ - longsPayShorts: boolean, - fundingFactorPerSecond: bigint, - nextSavedFundingFactorPerSecond: bigint, - fundingFeeAmountPerSizeDelta: MarketUtils.PositionTypeStructOutput, - claimableFundingAmountPerSizeDelta: MarketUtils.PositionTypeStructOutput, - ] & { - longsPayShorts: boolean; - fundingFactorPerSecond: bigint; - nextSavedFundingFactorPerSecond: bigint; - fundingFeeAmountPerSizeDelta: MarketUtils.PositionTypeStructOutput; - claimableFundingAmountPerSizeDelta: MarketUtils.PositionTypeStructOutput; - }; -} - -export declare namespace Position { - export type AddressesStruct = { - account: AddressLike; - market: AddressLike; - collateralToken: AddressLike; - }; - - export type AddressesStructOutput = [account: string, market: string, collateralToken: string] & { - account: string; - market: string; - collateralToken: string; - }; - - export type NumbersStruct = { - sizeInUsd: BigNumberish; - sizeInTokens: BigNumberish; - collateralAmount: BigNumberish; - pendingImpactAmount: BigNumberish; - borrowingFactor: BigNumberish; - fundingFeeAmountPerSize: BigNumberish; - longTokenClaimableFundingAmountPerSize: BigNumberish; - shortTokenClaimableFundingAmountPerSize: BigNumberish; - increasedAtTime: BigNumberish; - decreasedAtTime: BigNumberish; - }; - - export type NumbersStructOutput = [ - sizeInUsd: bigint, - sizeInTokens: bigint, - collateralAmount: bigint, - pendingImpactAmount: bigint, - borrowingFactor: bigint, - fundingFeeAmountPerSize: bigint, - longTokenClaimableFundingAmountPerSize: bigint, - shortTokenClaimableFundingAmountPerSize: bigint, - increasedAtTime: bigint, - decreasedAtTime: bigint, - ] & { - sizeInUsd: bigint; - sizeInTokens: bigint; - collateralAmount: bigint; - pendingImpactAmount: bigint; - borrowingFactor: bigint; - fundingFeeAmountPerSize: bigint; - longTokenClaimableFundingAmountPerSize: bigint; - shortTokenClaimableFundingAmountPerSize: bigint; - increasedAtTime: bigint; - decreasedAtTime: bigint; - }; - - export type FlagsStruct = { isLong: boolean }; - - export type FlagsStructOutput = [isLong: boolean] & { isLong: boolean }; - - export type PropsStruct = { - addresses: Position.AddressesStruct; - numbers: Position.NumbersStruct; - flags: Position.FlagsStruct; - }; - - export type PropsStructOutput = [ - addresses: Position.AddressesStructOutput, - numbers: Position.NumbersStructOutput, - flags: Position.FlagsStructOutput, - ] & { - addresses: Position.AddressesStructOutput; - numbers: Position.NumbersStructOutput; - flags: Position.FlagsStructOutput; - }; -} - -export declare namespace PositionPricingUtils { - export type PositionReferralFeesStruct = { - referralCode: BytesLike; - affiliate: AddressLike; - trader: AddressLike; - totalRebateFactor: BigNumberish; - affiliateRewardFactor: BigNumberish; - adjustedAffiliateRewardFactor: BigNumberish; - traderDiscountFactor: BigNumberish; - totalRebateAmount: BigNumberish; - traderDiscountAmount: BigNumberish; - affiliateRewardAmount: BigNumberish; - }; - - export type PositionReferralFeesStructOutput = [ - referralCode: string, - affiliate: string, - trader: string, - totalRebateFactor: bigint, - affiliateRewardFactor: bigint, - adjustedAffiliateRewardFactor: bigint, - traderDiscountFactor: bigint, - totalRebateAmount: bigint, - traderDiscountAmount: bigint, - affiliateRewardAmount: bigint, - ] & { - referralCode: string; - affiliate: string; - trader: string; - totalRebateFactor: bigint; - affiliateRewardFactor: bigint; - adjustedAffiliateRewardFactor: bigint; - traderDiscountFactor: bigint; - totalRebateAmount: bigint; - traderDiscountAmount: bigint; - affiliateRewardAmount: bigint; - }; - - export type PositionProFeesStruct = { - traderTier: BigNumberish; - traderDiscountFactor: BigNumberish; - traderDiscountAmount: BigNumberish; - }; - - export type PositionProFeesStructOutput = [ - traderTier: bigint, - traderDiscountFactor: bigint, - traderDiscountAmount: bigint, - ] & { - traderTier: bigint; - traderDiscountFactor: bigint; - traderDiscountAmount: bigint; - }; - - export type PositionFundingFeesStruct = { - fundingFeeAmount: BigNumberish; - claimableLongTokenAmount: BigNumberish; - claimableShortTokenAmount: BigNumberish; - latestFundingFeeAmountPerSize: BigNumberish; - latestLongTokenClaimableFundingAmountPerSize: BigNumberish; - latestShortTokenClaimableFundingAmountPerSize: BigNumberish; - }; - - export type PositionFundingFeesStructOutput = [ - fundingFeeAmount: bigint, - claimableLongTokenAmount: bigint, - claimableShortTokenAmount: bigint, - latestFundingFeeAmountPerSize: bigint, - latestLongTokenClaimableFundingAmountPerSize: bigint, - latestShortTokenClaimableFundingAmountPerSize: bigint, - ] & { - fundingFeeAmount: bigint; - claimableLongTokenAmount: bigint; - claimableShortTokenAmount: bigint; - latestFundingFeeAmountPerSize: bigint; - latestLongTokenClaimableFundingAmountPerSize: bigint; - latestShortTokenClaimableFundingAmountPerSize: bigint; - }; - - export type PositionBorrowingFeesStruct = { - borrowingFeeUsd: BigNumberish; - borrowingFeeAmount: BigNumberish; - borrowingFeeReceiverFactor: BigNumberish; - borrowingFeeAmountForFeeReceiver: BigNumberish; - }; - - export type PositionBorrowingFeesStructOutput = [ - borrowingFeeUsd: bigint, - borrowingFeeAmount: bigint, - borrowingFeeReceiverFactor: bigint, - borrowingFeeAmountForFeeReceiver: bigint, - ] & { - borrowingFeeUsd: bigint; - borrowingFeeAmount: bigint; - borrowingFeeReceiverFactor: bigint; - borrowingFeeAmountForFeeReceiver: bigint; - }; - - export type PositionUiFeesStruct = { - uiFeeReceiver: AddressLike; - uiFeeReceiverFactor: BigNumberish; - uiFeeAmount: BigNumberish; - }; - - export type PositionUiFeesStructOutput = [uiFeeReceiver: string, uiFeeReceiverFactor: bigint, uiFeeAmount: bigint] & { - uiFeeReceiver: string; - uiFeeReceiverFactor: bigint; - uiFeeAmount: bigint; - }; - - export type PositionLiquidationFeesStruct = { - liquidationFeeUsd: BigNumberish; - liquidationFeeAmount: BigNumberish; - liquidationFeeReceiverFactor: BigNumberish; - liquidationFeeAmountForFeeReceiver: BigNumberish; - }; - - export type PositionLiquidationFeesStructOutput = [ - liquidationFeeUsd: bigint, - liquidationFeeAmount: bigint, - liquidationFeeReceiverFactor: bigint, - liquidationFeeAmountForFeeReceiver: bigint, - ] & { - liquidationFeeUsd: bigint; - liquidationFeeAmount: bigint; - liquidationFeeReceiverFactor: bigint; - liquidationFeeAmountForFeeReceiver: bigint; - }; - - export type PositionFeesStruct = { - referral: PositionPricingUtils.PositionReferralFeesStruct; - pro: PositionPricingUtils.PositionProFeesStruct; - funding: PositionPricingUtils.PositionFundingFeesStruct; - borrowing: PositionPricingUtils.PositionBorrowingFeesStruct; - ui: PositionPricingUtils.PositionUiFeesStruct; - liquidation: PositionPricingUtils.PositionLiquidationFeesStruct; - collateralTokenPrice: Price.PropsStruct; - positionFeeFactor: BigNumberish; - protocolFeeAmount: BigNumberish; - positionFeeReceiverFactor: BigNumberish; - feeReceiverAmount: BigNumberish; - feeAmountForPool: BigNumberish; - positionFeeAmountForPool: BigNumberish; - positionFeeAmount: BigNumberish; - totalCostAmountExcludingFunding: BigNumberish; - totalCostAmount: BigNumberish; - totalDiscountAmount: BigNumberish; - }; - - export type PositionFeesStructOutput = [ - referral: PositionPricingUtils.PositionReferralFeesStructOutput, - pro: PositionPricingUtils.PositionProFeesStructOutput, - funding: PositionPricingUtils.PositionFundingFeesStructOutput, - borrowing: PositionPricingUtils.PositionBorrowingFeesStructOutput, - ui: PositionPricingUtils.PositionUiFeesStructOutput, - liquidation: PositionPricingUtils.PositionLiquidationFeesStructOutput, - collateralTokenPrice: Price.PropsStructOutput, - positionFeeFactor: bigint, - protocolFeeAmount: bigint, - positionFeeReceiverFactor: bigint, - feeReceiverAmount: bigint, - feeAmountForPool: bigint, - positionFeeAmountForPool: bigint, - positionFeeAmount: bigint, - totalCostAmountExcludingFunding: bigint, - totalCostAmount: bigint, - totalDiscountAmount: bigint, - ] & { - referral: PositionPricingUtils.PositionReferralFeesStructOutput; - pro: PositionPricingUtils.PositionProFeesStructOutput; - funding: PositionPricingUtils.PositionFundingFeesStructOutput; - borrowing: PositionPricingUtils.PositionBorrowingFeesStructOutput; - ui: PositionPricingUtils.PositionUiFeesStructOutput; - liquidation: PositionPricingUtils.PositionLiquidationFeesStructOutput; - collateralTokenPrice: Price.PropsStructOutput; - positionFeeFactor: bigint; - protocolFeeAmount: bigint; - positionFeeReceiverFactor: bigint; - feeReceiverAmount: bigint; - feeAmountForPool: bigint; - positionFeeAmountForPool: bigint; - positionFeeAmount: bigint; - totalCostAmountExcludingFunding: bigint; - totalCostAmount: bigint; - totalDiscountAmount: bigint; - }; -} - -export declare namespace ReaderPricingUtils { - export type ExecutionPriceResultStruct = { - priceImpactUsd: BigNumberish; - executionPrice: BigNumberish; - balanceWasImproved: boolean; - proportionalPendingImpactUsd: BigNumberish; - totalImpactUsd: BigNumberish; - priceImpactDiffUsd: BigNumberish; - }; - - export type ExecutionPriceResultStructOutput = [ - priceImpactUsd: bigint, - executionPrice: bigint, - balanceWasImproved: boolean, - proportionalPendingImpactUsd: bigint, - totalImpactUsd: bigint, - priceImpactDiffUsd: bigint, - ] & { - priceImpactUsd: bigint; - executionPrice: bigint; - balanceWasImproved: boolean; - proportionalPendingImpactUsd: bigint; - totalImpactUsd: bigint; - priceImpactDiffUsd: bigint; - }; -} - -export declare namespace ReaderPositionUtils { - export type PositionInfoStruct = { - positionKey: BytesLike; - position: Position.PropsStruct; - fees: PositionPricingUtils.PositionFeesStruct; - executionPriceResult: ReaderPricingUtils.ExecutionPriceResultStruct; - basePnlUsd: BigNumberish; - uncappedBasePnlUsd: BigNumberish; - pnlAfterPriceImpactUsd: BigNumberish; - }; - - export type PositionInfoStructOutput = [ - positionKey: string, - position: Position.PropsStructOutput, - fees: PositionPricingUtils.PositionFeesStructOutput, - executionPriceResult: ReaderPricingUtils.ExecutionPriceResultStructOutput, - basePnlUsd: bigint, - uncappedBasePnlUsd: bigint, - pnlAfterPriceImpactUsd: bigint, - ] & { - positionKey: string; - position: Position.PropsStructOutput; - fees: PositionPricingUtils.PositionFeesStructOutput; - executionPriceResult: ReaderPricingUtils.ExecutionPriceResultStructOutput; - basePnlUsd: bigint; - uncappedBasePnlUsd: bigint; - pnlAfterPriceImpactUsd: bigint; - }; -} - -export declare namespace Deposit { - export type AddressesStruct = { - account: AddressLike; - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - initialLongToken: AddressLike; - initialShortToken: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type AddressesStructOutput = [ - account: string, - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - initialLongToken: string, - initialShortToken: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - account: string; - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - initialLongToken: string; - initialShortToken: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type NumbersStruct = { - initialLongTokenAmount: BigNumberish; - initialShortTokenAmount: BigNumberish; - minMarketTokens: BigNumberish; - updatedAtTime: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - srcChainId: BigNumberish; - }; - - export type NumbersStructOutput = [ - initialLongTokenAmount: bigint, - initialShortTokenAmount: bigint, - minMarketTokens: bigint, - updatedAtTime: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - srcChainId: bigint, - ] & { - initialLongTokenAmount: bigint; - initialShortTokenAmount: bigint; - minMarketTokens: bigint; - updatedAtTime: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - srcChainId: bigint; - }; - - export type FlagsStruct = { shouldUnwrapNativeToken: boolean }; - - export type FlagsStructOutput = [shouldUnwrapNativeToken: boolean] & { - shouldUnwrapNativeToken: boolean; - }; - - export type PropsStruct = { - addresses: Deposit.AddressesStruct; - numbers: Deposit.NumbersStruct; - flags: Deposit.FlagsStruct; - _dataList: BytesLike[]; - }; - - export type PropsStructOutput = [ - addresses: Deposit.AddressesStructOutput, - numbers: Deposit.NumbersStructOutput, - flags: Deposit.FlagsStructOutput, - _dataList: string[], - ] & { - addresses: Deposit.AddressesStructOutput; - numbers: Deposit.NumbersStructOutput; - flags: Deposit.FlagsStructOutput; - _dataList: string[]; - }; -} - -export declare namespace Market { - export type PropsStruct = { - marketToken: AddressLike; - indexToken: AddressLike; - longToken: AddressLike; - shortToken: AddressLike; - }; - - export type PropsStructOutput = [marketToken: string, indexToken: string, longToken: string, shortToken: string] & { - marketToken: string; - indexToken: string; - longToken: string; - shortToken: string; - }; -} - -export declare namespace MarketPoolValueInfo { - export type PropsStruct = { - poolValue: BigNumberish; - longPnl: BigNumberish; - shortPnl: BigNumberish; - netPnl: BigNumberish; - longTokenAmount: BigNumberish; - shortTokenAmount: BigNumberish; - longTokenUsd: BigNumberish; - shortTokenUsd: BigNumberish; - totalBorrowingFees: BigNumberish; - borrowingFeePoolFactor: BigNumberish; - impactPoolAmount: BigNumberish; - lentImpactPoolAmount: BigNumberish; - }; - - export type PropsStructOutput = [ - poolValue: bigint, - longPnl: bigint, - shortPnl: bigint, - netPnl: bigint, - longTokenAmount: bigint, - shortTokenAmount: bigint, - longTokenUsd: bigint, - shortTokenUsd: bigint, - totalBorrowingFees: bigint, - borrowingFeePoolFactor: bigint, - impactPoolAmount: bigint, - lentImpactPoolAmount: bigint, - ] & { - poolValue: bigint; - longPnl: bigint; - shortPnl: bigint; - netPnl: bigint; - longTokenAmount: bigint; - shortTokenAmount: bigint; - longTokenUsd: bigint; - shortTokenUsd: bigint; - totalBorrowingFees: bigint; - borrowingFeePoolFactor: bigint; - impactPoolAmount: bigint; - lentImpactPoolAmount: bigint; - }; -} - -export declare namespace Shift { - export type AddressesStruct = { - account: AddressLike; - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - fromMarket: AddressLike; - toMarket: AddressLike; - }; - - export type AddressesStructOutput = [ - account: string, - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - fromMarket: string, - toMarket: string, - ] & { - account: string; - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - fromMarket: string; - toMarket: string; - }; - - export type NumbersStruct = { - marketTokenAmount: BigNumberish; - minMarketTokens: BigNumberish; - updatedAtTime: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - srcChainId: BigNumberish; - }; - - export type NumbersStructOutput = [ - marketTokenAmount: bigint, - minMarketTokens: bigint, - updatedAtTime: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - srcChainId: bigint, - ] & { - marketTokenAmount: bigint; - minMarketTokens: bigint; - updatedAtTime: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - srcChainId: bigint; - }; - - export type PropsStruct = { - addresses: Shift.AddressesStruct; - numbers: Shift.NumbersStruct; - _dataList: BytesLike[]; - }; - - export type PropsStructOutput = [ - addresses: Shift.AddressesStructOutput, - numbers: Shift.NumbersStructOutput, - _dataList: string[], - ] & { - addresses: Shift.AddressesStructOutput; - numbers: Shift.NumbersStructOutput; - _dataList: string[]; - }; -} - -export declare namespace SwapPricingUtils { - export type SwapFeesStruct = { - feeReceiverAmount: BigNumberish; - feeAmountForPool: BigNumberish; - amountAfterFees: BigNumberish; - uiFeeReceiver: AddressLike; - uiFeeReceiverFactor: BigNumberish; - uiFeeAmount: BigNumberish; - }; - - export type SwapFeesStructOutput = [ - feeReceiverAmount: bigint, - feeAmountForPool: bigint, - amountAfterFees: bigint, - uiFeeReceiver: string, - uiFeeReceiverFactor: bigint, - uiFeeAmount: bigint, - ] & { - feeReceiverAmount: bigint; - feeAmountForPool: bigint; - amountAfterFees: bigint; - uiFeeReceiver: string; - uiFeeReceiverFactor: bigint; - uiFeeAmount: bigint; - }; -} - -export declare namespace Withdrawal { - export type AddressesStruct = { - account: AddressLike; - receiver: AddressLike; - callbackContract: AddressLike; - uiFeeReceiver: AddressLike; - market: AddressLike; - longTokenSwapPath: AddressLike[]; - shortTokenSwapPath: AddressLike[]; - }; - - export type AddressesStructOutput = [ - account: string, - receiver: string, - callbackContract: string, - uiFeeReceiver: string, - market: string, - longTokenSwapPath: string[], - shortTokenSwapPath: string[], - ] & { - account: string; - receiver: string; - callbackContract: string; - uiFeeReceiver: string; - market: string; - longTokenSwapPath: string[]; - shortTokenSwapPath: string[]; - }; - - export type NumbersStruct = { - marketTokenAmount: BigNumberish; - minLongTokenAmount: BigNumberish; - minShortTokenAmount: BigNumberish; - updatedAtTime: BigNumberish; - executionFee: BigNumberish; - callbackGasLimit: BigNumberish; - srcChainId: BigNumberish; - }; - - export type NumbersStructOutput = [ - marketTokenAmount: bigint, - minLongTokenAmount: bigint, - minShortTokenAmount: bigint, - updatedAtTime: bigint, - executionFee: bigint, - callbackGasLimit: bigint, - srcChainId: bigint, - ] & { - marketTokenAmount: bigint; - minLongTokenAmount: bigint; - minShortTokenAmount: bigint; - updatedAtTime: bigint; - executionFee: bigint; - callbackGasLimit: bigint; - srcChainId: bigint; - }; - - export type FlagsStruct = { shouldUnwrapNativeToken: boolean }; - - export type FlagsStructOutput = [shouldUnwrapNativeToken: boolean] & { - shouldUnwrapNativeToken: boolean; - }; - - export type PropsStruct = { - addresses: Withdrawal.AddressesStruct; - numbers: Withdrawal.NumbersStruct; - flags: Withdrawal.FlagsStruct; - _dataList: BytesLike[]; - }; - - export type PropsStructOutput = [ - addresses: Withdrawal.AddressesStructOutput, - numbers: Withdrawal.NumbersStructOutput, - flags: Withdrawal.FlagsStructOutput, - _dataList: string[], - ] & { - addresses: Withdrawal.AddressesStructOutput; - numbers: Withdrawal.NumbersStructOutput; - flags: Withdrawal.FlagsStructOutput; - _dataList: string[]; - }; -} - -export declare namespace PositionUtils { - export type IsPositionLiquidatableInfoStruct = { - remainingCollateralUsd: BigNumberish; - minCollateralUsd: BigNumberish; - minCollateralUsdForLeverage: BigNumberish; - }; - - export type IsPositionLiquidatableInfoStructOutput = [ - remainingCollateralUsd: bigint, - minCollateralUsd: bigint, - minCollateralUsdForLeverage: bigint, - ] & { - remainingCollateralUsd: bigint; - minCollateralUsd: bigint; - minCollateralUsdForLeverage: bigint; - }; -} - -export interface SyntheticsReaderInterface extends Interface { - getFunction( - nameOrSignature: - | "getAccountOrders" - | "getAccountPositionInfoList" - | "getAccountPositions" - | "getAdlState" - | "getDeposit" - | "getDepositAmountOut" - | "getExecutionPrice" - | "getMarket" - | "getMarketBySalt" - | "getMarketInfo" - | "getMarketInfoList" - | "getMarketTokenPrice" - | "getMarkets" - | "getNetPnl" - | "getOpenInterestWithPnl" - | "getOrder" - | "getPendingPositionImpactPoolDistributionAmount" - | "getPnl" - | "getPnlToPoolFactor" - | "getPosition" - | "getPositionInfo" - | "getPositionInfoList" - | "getPositionPnlUsd" - | "getShift" - | "getSwapAmountOut" - | "getSwapPriceImpact" - | "getWithdrawal" - | "getWithdrawalAmountOut" - | "isPositionLiquidatable" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "getAccountOrders", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getAccountPositionInfoList", - values: [ - AddressLike, - AddressLike, - AddressLike, - AddressLike[], - MarketUtils.MarketPricesStruct[], - AddressLike, - BigNumberish, - BigNumberish, - ] - ): string; - encodeFunctionData( - functionFragment: "getAccountPositions", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getAdlState", - values: [AddressLike, AddressLike, boolean, MarketUtils.MarketPricesStruct] - ): string; - encodeFunctionData(functionFragment: "getDeposit", values: [AddressLike, BytesLike]): string; - encodeFunctionData( - functionFragment: "getDepositAmountOut", - values: [ - AddressLike, - Market.PropsStruct, - MarketUtils.MarketPricesStruct, - BigNumberish, - BigNumberish, - AddressLike, - BigNumberish, - boolean, - ] - ): string; - encodeFunctionData( - functionFragment: "getExecutionPrice", - values: [ - AddressLike, - AddressLike, - MarketUtils.MarketPricesStruct, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - boolean, - ] - ): string; - encodeFunctionData(functionFragment: "getMarket", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "getMarketBySalt", values: [AddressLike, BytesLike]): string; - encodeFunctionData( - functionFragment: "getMarketInfo", - values: [AddressLike, MarketUtils.MarketPricesStruct, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "getMarketInfoList", - values: [AddressLike, MarketUtils.MarketPricesStruct[], BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getMarketTokenPrice", - values: [ - AddressLike, - Market.PropsStruct, - Price.PropsStruct, - Price.PropsStruct, - Price.PropsStruct, - BytesLike, - boolean, - ] - ): string; - encodeFunctionData(functionFragment: "getMarkets", values: [AddressLike, BigNumberish, BigNumberish]): string; - encodeFunctionData( - functionFragment: "getNetPnl", - values: [AddressLike, Market.PropsStruct, Price.PropsStruct, boolean] - ): string; - encodeFunctionData( - functionFragment: "getOpenInterestWithPnl", - values: [AddressLike, Market.PropsStruct, Price.PropsStruct, boolean, boolean] - ): string; - encodeFunctionData(functionFragment: "getOrder", values: [AddressLike, BytesLike]): string; - encodeFunctionData( - functionFragment: "getPendingPositionImpactPoolDistributionAmount", - values: [AddressLike, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "getPnl", - values: [AddressLike, Market.PropsStruct, Price.PropsStruct, boolean, boolean] - ): string; - encodeFunctionData( - functionFragment: "getPnlToPoolFactor", - values: [AddressLike, AddressLike, MarketUtils.MarketPricesStruct, boolean, boolean] - ): string; - encodeFunctionData(functionFragment: "getPosition", values: [AddressLike, BytesLike]): string; - encodeFunctionData( - functionFragment: "getPositionInfo", - values: [AddressLike, AddressLike, BytesLike, MarketUtils.MarketPricesStruct, BigNumberish, AddressLike, boolean] - ): string; - encodeFunctionData( - functionFragment: "getPositionInfoList", - values: [AddressLike, AddressLike, BytesLike[], MarketUtils.MarketPricesStruct[], AddressLike] - ): string; - encodeFunctionData( - functionFragment: "getPositionPnlUsd", - values: [AddressLike, Market.PropsStruct, MarketUtils.MarketPricesStruct, BytesLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getShift", values: [AddressLike, BytesLike]): string; - encodeFunctionData( - functionFragment: "getSwapAmountOut", - values: [AddressLike, Market.PropsStruct, MarketUtils.MarketPricesStruct, AddressLike, BigNumberish, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "getSwapPriceImpact", - values: [AddressLike, AddressLike, AddressLike, AddressLike, BigNumberish, Price.PropsStruct, Price.PropsStruct] - ): string; - encodeFunctionData(functionFragment: "getWithdrawal", values: [AddressLike, BytesLike]): string; - encodeFunctionData( - functionFragment: "getWithdrawalAmountOut", - values: [AddressLike, Market.PropsStruct, MarketUtils.MarketPricesStruct, BigNumberish, AddressLike, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "isPositionLiquidatable", - values: [AddressLike, AddressLike, BytesLike, Market.PropsStruct, MarketUtils.MarketPricesStruct, boolean, boolean] - ): string; - - decodeFunctionResult(functionFragment: "getAccountOrders", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAccountPositionInfoList", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAccountPositions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getAdlState", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getDepositAmountOut", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getExecutionPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMarket", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMarketBySalt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMarketInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMarketInfoList", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMarketTokenPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMarkets", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getNetPnl", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getOpenInterestWithPnl", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getOrder", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPendingPositionImpactPoolDistributionAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPnl", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPnlToPoolFactor", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionInfoList", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionPnlUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getShift", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getSwapAmountOut", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getSwapPriceImpact", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getWithdrawal", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getWithdrawalAmountOut", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isPositionLiquidatable", data: BytesLike): Result; -} - -export interface SyntheticsReader extends BaseContract { - connect(runner?: ContractRunner | null): SyntheticsReader; - waitForDeployment(): Promise; - - interface: SyntheticsReaderInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - getAccountOrders: TypedContractMethod< - [dataStore: AddressLike, account: AddressLike, start: BigNumberish, end: BigNumberish], - [ReaderUtils.OrderInfoStructOutput[]], - "view" - >; - - getAccountPositionInfoList: TypedContractMethod< - [ - dataStore: AddressLike, - referralStorage: AddressLike, - account: AddressLike, - markets: AddressLike[], - marketPrices: MarketUtils.MarketPricesStruct[], - uiFeeReceiver: AddressLike, - start: BigNumberish, - end: BigNumberish, - ], - [ReaderPositionUtils.PositionInfoStructOutput[]], - "view" - >; - - getAccountPositions: TypedContractMethod< - [dataStore: AddressLike, account: AddressLike, start: BigNumberish, end: BigNumberish], - [Position.PropsStructOutput[]], - "view" - >; - - getAdlState: TypedContractMethod< - [dataStore: AddressLike, market: AddressLike, isLong: boolean, prices: MarketUtils.MarketPricesStruct], - [[bigint, boolean, bigint, bigint]], - "view" - >; - - getDeposit: TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Deposit.PropsStructOutput], "view">; - - getDepositAmountOut: TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - prices: MarketUtils.MarketPricesStruct, - longTokenAmount: BigNumberish, - shortTokenAmount: BigNumberish, - uiFeeReceiver: AddressLike, - swapPricingType: BigNumberish, - includeVirtualInventoryImpact: boolean, - ], - [bigint], - "view" - >; - - getExecutionPrice: TypedContractMethod< - [ - dataStore: AddressLike, - marketKey: AddressLike, - prices: MarketUtils.MarketPricesStruct, - positionSizeInUsd: BigNumberish, - positionSizeInTokens: BigNumberish, - sizeDeltaUsd: BigNumberish, - pendingImpactAmount: BigNumberish, - isLong: boolean, - ], - [ReaderPricingUtils.ExecutionPriceResultStructOutput], - "view" - >; - - getMarket: TypedContractMethod<[dataStore: AddressLike, key: AddressLike], [Market.PropsStructOutput], "view">; - - getMarketBySalt: TypedContractMethod<[dataStore: AddressLike, salt: BytesLike], [Market.PropsStructOutput], "view">; - - getMarketInfo: TypedContractMethod< - [dataStore: AddressLike, prices: MarketUtils.MarketPricesStruct, marketKey: AddressLike], - [ReaderUtils.MarketInfoStructOutput], - "view" - >; - - getMarketInfoList: TypedContractMethod< - [ - dataStore: AddressLike, - marketPricesList: MarketUtils.MarketPricesStruct[], - start: BigNumberish, - end: BigNumberish, - ], - [ReaderUtils.MarketInfoStructOutput[]], - "view" - >; - - getMarketTokenPrice: TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - indexTokenPrice: Price.PropsStruct, - longTokenPrice: Price.PropsStruct, - shortTokenPrice: Price.PropsStruct, - pnlFactorType: BytesLike, - maximize: boolean, - ], - [[bigint, MarketPoolValueInfo.PropsStructOutput]], - "view" - >; - - getMarkets: TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [Market.PropsStructOutput[]], - "view" - >; - - getNetPnl: TypedContractMethod< - [dataStore: AddressLike, market: Market.PropsStruct, indexTokenPrice: Price.PropsStruct, maximize: boolean], - [bigint], - "view" - >; - - getOpenInterestWithPnl: TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - indexTokenPrice: Price.PropsStruct, - isLong: boolean, - maximize: boolean, - ], - [bigint], - "view" - >; - - getOrder: TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Order.PropsStructOutput], "view">; - - getPendingPositionImpactPoolDistributionAmount: TypedContractMethod< - [dataStore: AddressLike, market: AddressLike], - [[bigint, bigint]], - "view" - >; - - getPnl: TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - indexTokenPrice: Price.PropsStruct, - isLong: boolean, - maximize: boolean, - ], - [bigint], - "view" - >; - - getPnlToPoolFactor: TypedContractMethod< - [ - dataStore: AddressLike, - marketAddress: AddressLike, - prices: MarketUtils.MarketPricesStruct, - isLong: boolean, - maximize: boolean, - ], - [bigint], - "view" - >; - - getPosition: TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Position.PropsStructOutput], "view">; - - getPositionInfo: TypedContractMethod< - [ - dataStore: AddressLike, - referralStorage: AddressLike, - positionKey: BytesLike, - prices: MarketUtils.MarketPricesStruct, - sizeDeltaUsd: BigNumberish, - uiFeeReceiver: AddressLike, - usePositionSizeAsSizeDeltaUsd: boolean, - ], - [ReaderPositionUtils.PositionInfoStructOutput], - "view" - >; - - getPositionInfoList: TypedContractMethod< - [ - dataStore: AddressLike, - referralStorage: AddressLike, - positionKeys: BytesLike[], - prices: MarketUtils.MarketPricesStruct[], - uiFeeReceiver: AddressLike, - ], - [ReaderPositionUtils.PositionInfoStructOutput[]], - "view" - >; - - getPositionPnlUsd: TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - prices: MarketUtils.MarketPricesStruct, - positionKey: BytesLike, - sizeDeltaUsd: BigNumberish, - ], - [[bigint, bigint, bigint]], - "view" - >; - - getShift: TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Shift.PropsStructOutput], "view">; - - getSwapAmountOut: TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - prices: MarketUtils.MarketPricesStruct, - tokenIn: AddressLike, - amountIn: BigNumberish, - uiFeeReceiver: AddressLike, - ], - [ - [bigint, bigint, SwapPricingUtils.SwapFeesStructOutput] & { - fees: SwapPricingUtils.SwapFeesStructOutput; - }, - ], - "view" - >; - - getSwapPriceImpact: TypedContractMethod< - [ - dataStore: AddressLike, - marketKey: AddressLike, - tokenIn: AddressLike, - tokenOut: AddressLike, - amountIn: BigNumberish, - tokenInPrice: Price.PropsStruct, - tokenOutPrice: Price.PropsStruct, - ], - [[bigint, bigint, bigint]], - "view" - >; - - getWithdrawal: TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Withdrawal.PropsStructOutput], "view">; - - getWithdrawalAmountOut: TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - prices: MarketUtils.MarketPricesStruct, - marketTokenAmount: BigNumberish, - uiFeeReceiver: AddressLike, - swapPricingType: BigNumberish, - ], - [[bigint, bigint]], - "view" - >; - - isPositionLiquidatable: TypedContractMethod< - [ - dataStore: AddressLike, - referralStorage: AddressLike, - positionKey: BytesLike, - market: Market.PropsStruct, - prices: MarketUtils.MarketPricesStruct, - shouldValidateMinCollateralUsd: boolean, - forLiquidation: boolean, - ], - [[boolean, string, PositionUtils.IsPositionLiquidatableInfoStructOutput]], - "view" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "getAccountOrders" - ): TypedContractMethod< - [dataStore: AddressLike, account: AddressLike, start: BigNumberish, end: BigNumberish], - [ReaderUtils.OrderInfoStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getAccountPositionInfoList" - ): TypedContractMethod< - [ - dataStore: AddressLike, - referralStorage: AddressLike, - account: AddressLike, - markets: AddressLike[], - marketPrices: MarketUtils.MarketPricesStruct[], - uiFeeReceiver: AddressLike, - start: BigNumberish, - end: BigNumberish, - ], - [ReaderPositionUtils.PositionInfoStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getAccountPositions" - ): TypedContractMethod< - [dataStore: AddressLike, account: AddressLike, start: BigNumberish, end: BigNumberish], - [Position.PropsStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getAdlState" - ): TypedContractMethod< - [dataStore: AddressLike, market: AddressLike, isLong: boolean, prices: MarketUtils.MarketPricesStruct], - [[bigint, boolean, bigint, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getDeposit" - ): TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Deposit.PropsStructOutput], "view">; - getFunction( - nameOrSignature: "getDepositAmountOut" - ): TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - prices: MarketUtils.MarketPricesStruct, - longTokenAmount: BigNumberish, - shortTokenAmount: BigNumberish, - uiFeeReceiver: AddressLike, - swapPricingType: BigNumberish, - includeVirtualInventoryImpact: boolean, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getExecutionPrice" - ): TypedContractMethod< - [ - dataStore: AddressLike, - marketKey: AddressLike, - prices: MarketUtils.MarketPricesStruct, - positionSizeInUsd: BigNumberish, - positionSizeInTokens: BigNumberish, - sizeDeltaUsd: BigNumberish, - pendingImpactAmount: BigNumberish, - isLong: boolean, - ], - [ReaderPricingUtils.ExecutionPriceResultStructOutput], - "view" - >; - getFunction( - nameOrSignature: "getMarket" - ): TypedContractMethod<[dataStore: AddressLike, key: AddressLike], [Market.PropsStructOutput], "view">; - getFunction( - nameOrSignature: "getMarketBySalt" - ): TypedContractMethod<[dataStore: AddressLike, salt: BytesLike], [Market.PropsStructOutput], "view">; - getFunction( - nameOrSignature: "getMarketInfo" - ): TypedContractMethod< - [dataStore: AddressLike, prices: MarketUtils.MarketPricesStruct, marketKey: AddressLike], - [ReaderUtils.MarketInfoStructOutput], - "view" - >; - getFunction( - nameOrSignature: "getMarketInfoList" - ): TypedContractMethod< - [ - dataStore: AddressLike, - marketPricesList: MarketUtils.MarketPricesStruct[], - start: BigNumberish, - end: BigNumberish, - ], - [ReaderUtils.MarketInfoStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getMarketTokenPrice" - ): TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - indexTokenPrice: Price.PropsStruct, - longTokenPrice: Price.PropsStruct, - shortTokenPrice: Price.PropsStruct, - pnlFactorType: BytesLike, - maximize: boolean, - ], - [[bigint, MarketPoolValueInfo.PropsStructOutput]], - "view" - >; - getFunction( - nameOrSignature: "getMarkets" - ): TypedContractMethod< - [dataStore: AddressLike, start: BigNumberish, end: BigNumberish], - [Market.PropsStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getNetPnl" - ): TypedContractMethod< - [dataStore: AddressLike, market: Market.PropsStruct, indexTokenPrice: Price.PropsStruct, maximize: boolean], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getOpenInterestWithPnl" - ): TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - indexTokenPrice: Price.PropsStruct, - isLong: boolean, - maximize: boolean, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getOrder" - ): TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Order.PropsStructOutput], "view">; - getFunction( - nameOrSignature: "getPendingPositionImpactPoolDistributionAmount" - ): TypedContractMethod<[dataStore: AddressLike, market: AddressLike], [[bigint, bigint]], "view">; - getFunction( - nameOrSignature: "getPnl" - ): TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - indexTokenPrice: Price.PropsStruct, - isLong: boolean, - maximize: boolean, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getPnlToPoolFactor" - ): TypedContractMethod< - [ - dataStore: AddressLike, - marketAddress: AddressLike, - prices: MarketUtils.MarketPricesStruct, - isLong: boolean, - maximize: boolean, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getPosition" - ): TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Position.PropsStructOutput], "view">; - getFunction( - nameOrSignature: "getPositionInfo" - ): TypedContractMethod< - [ - dataStore: AddressLike, - referralStorage: AddressLike, - positionKey: BytesLike, - prices: MarketUtils.MarketPricesStruct, - sizeDeltaUsd: BigNumberish, - uiFeeReceiver: AddressLike, - usePositionSizeAsSizeDeltaUsd: boolean, - ], - [ReaderPositionUtils.PositionInfoStructOutput], - "view" - >; - getFunction( - nameOrSignature: "getPositionInfoList" - ): TypedContractMethod< - [ - dataStore: AddressLike, - referralStorage: AddressLike, - positionKeys: BytesLike[], - prices: MarketUtils.MarketPricesStruct[], - uiFeeReceiver: AddressLike, - ], - [ReaderPositionUtils.PositionInfoStructOutput[]], - "view" - >; - getFunction( - nameOrSignature: "getPositionPnlUsd" - ): TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - prices: MarketUtils.MarketPricesStruct, - positionKey: BytesLike, - sizeDeltaUsd: BigNumberish, - ], - [[bigint, bigint, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getShift" - ): TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Shift.PropsStructOutput], "view">; - getFunction(nameOrSignature: "getSwapAmountOut"): TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - prices: MarketUtils.MarketPricesStruct, - tokenIn: AddressLike, - amountIn: BigNumberish, - uiFeeReceiver: AddressLike, - ], - [ - [bigint, bigint, SwapPricingUtils.SwapFeesStructOutput] & { - fees: SwapPricingUtils.SwapFeesStructOutput; - }, - ], - "view" - >; - getFunction( - nameOrSignature: "getSwapPriceImpact" - ): TypedContractMethod< - [ - dataStore: AddressLike, - marketKey: AddressLike, - tokenIn: AddressLike, - tokenOut: AddressLike, - amountIn: BigNumberish, - tokenInPrice: Price.PropsStruct, - tokenOutPrice: Price.PropsStruct, - ], - [[bigint, bigint, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getWithdrawal" - ): TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Withdrawal.PropsStructOutput], "view">; - getFunction( - nameOrSignature: "getWithdrawalAmountOut" - ): TypedContractMethod< - [ - dataStore: AddressLike, - market: Market.PropsStruct, - prices: MarketUtils.MarketPricesStruct, - marketTokenAmount: BigNumberish, - uiFeeReceiver: AddressLike, - swapPricingType: BigNumberish, - ], - [[bigint, bigint]], - "view" - >; - getFunction( - nameOrSignature: "isPositionLiquidatable" - ): TypedContractMethod< - [ - dataStore: AddressLike, - referralStorage: AddressLike, - positionKey: BytesLike, - market: Market.PropsStruct, - prices: MarketUtils.MarketPricesStruct, - shouldValidateMinCollateralUsd: boolean, - forLiquidation: boolean, - ], - [[boolean, string, PositionUtils.IsPositionLiquidatableInfoStructOutput]], - "view" - >; - - filters: {}; -} diff --git a/src/typechain-types/SyntheticsRouter.ts b/src/typechain-types/SyntheticsRouter.ts deleted file mode 100644 index c3f9a4db72..0000000000 --- a/src/typechain-types/SyntheticsRouter.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface SyntheticsRouterInterface extends Interface { - getFunction(nameOrSignature: "pluginTransfer" | "roleStore"): FunctionFragment; - - encodeFunctionData( - functionFragment: "pluginTransfer", - values: [AddressLike, AddressLike, AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "roleStore", values?: undefined): string; - - decodeFunctionResult(functionFragment: "pluginTransfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "roleStore", data: BytesLike): Result; -} - -export interface SyntheticsRouter extends BaseContract { - connect(runner?: ContractRunner | null): SyntheticsRouter; - waitForDeployment(): Promise; - - interface: SyntheticsRouterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - pluginTransfer: TypedContractMethod< - [token: AddressLike, account: AddressLike, receiver: AddressLike, amount: BigNumberish], - [void], - "nonpayable" - >; - - roleStore: TypedContractMethod<[], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "pluginTransfer" - ): TypedContractMethod< - [token: AddressLike, account: AddressLike, receiver: AddressLike, amount: BigNumberish], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "roleStore"): TypedContractMethod<[], [string], "view">; - - filters: {}; -} diff --git a/src/typechain-types/Timelock.ts b/src/typechain-types/Timelock.ts deleted file mode 100644 index aa150e814e..0000000000 --- a/src/typechain-types/Timelock.ts +++ /dev/null @@ -1,1250 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface TimelockInterface extends Interface { - getFunction( - nameOrSignature: - | "MAX_BUFFER" - | "MAX_FUNDING_RATE_FACTOR" - | "MAX_LEVERAGE_VALIDATION" - | "PRICE_PRECISION" - | "admin" - | "approve" - | "batchSetBonusRewards" - | "batchWithdrawFees" - | "buffer" - | "cancelAction" - | "disableLeverage" - | "enableLeverage" - | "glpManager" - | "govSetCodeOwner" - | "initGlpManager" - | "initRewardRouter" - | "isHandler" - | "isKeeper" - | "marginFeeBasisPoints" - | "maxMarginFeeBasisPoints" - | "maxTokenSupply" - | "mintReceiver" - | "pendingActions" - | "processMint" - | "redeemUsdg" - | "removeAdmin" - | "rewardRouter" - | "setAdmin" - | "setBuffer" - | "setContractHandler" - | "setExternalAdmin" - | "setFees" - | "setFundingRate" - | "setGlpCooldownDuration" - | "setGov" - | "setHandler" - | "setInPrivateLiquidationMode" - | "setInPrivateTransferMode" - | "setIsLeverageEnabled" - | "setIsSwapEnabled" - | "setKeeper" - | "setLiquidator" - | "setMarginFeeBasisPoints" - | "setMaxGasPrice" - | "setMaxGlobalShortSize" - | "setMaxLeverage" - | "setPriceFeed" - | "setReferrerTier" - | "setShortsTrackerAveragePriceWeight" - | "setShouldToggleIsLeverageEnabled" - | "setSwapFees" - | "setTier" - | "setTokenConfig" - | "setUsdgAmounts" - | "setVaultUtils" - | "shouldToggleIsLeverageEnabled" - | "signalApprove" - | "signalMint" - | "signalRedeemUsdg" - | "signalSetGov" - | "signalSetHandler" - | "signalSetPriceFeed" - | "signalVaultSetTokenConfig" - | "signalWithdrawToken" - | "tokenManager" - | "transferIn" - | "updateUsdgSupply" - | "vaultSetTokenConfig" - | "withdrawFees" - | "withdrawToken" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: - | "ClearAction" - | "SignalApprove" - | "SignalMint" - | "SignalPendingAction" - | "SignalRedeemUsdg" - | "SignalSetGov" - | "SignalSetHandler" - | "SignalSetPriceFeed" - | "SignalVaultSetTokenConfig" - | "SignalWithdrawToken" - ): EventFragment; - - encodeFunctionData(functionFragment: "MAX_BUFFER", values?: undefined): string; - encodeFunctionData(functionFragment: "MAX_FUNDING_RATE_FACTOR", values?: undefined): string; - encodeFunctionData(functionFragment: "MAX_LEVERAGE_VALIDATION", values?: undefined): string; - encodeFunctionData(functionFragment: "PRICE_PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "admin", values?: undefined): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData( - functionFragment: "batchSetBonusRewards", - values: [AddressLike, AddressLike[], BigNumberish[]] - ): string; - encodeFunctionData(functionFragment: "batchWithdrawFees", values: [AddressLike, AddressLike[]]): string; - encodeFunctionData(functionFragment: "buffer", values?: undefined): string; - encodeFunctionData(functionFragment: "cancelAction", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "disableLeverage", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "enableLeverage", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "glpManager", values?: undefined): string; - encodeFunctionData(functionFragment: "govSetCodeOwner", values: [AddressLike, BytesLike, AddressLike]): string; - encodeFunctionData(functionFragment: "initGlpManager", values?: undefined): string; - encodeFunctionData(functionFragment: "initRewardRouter", values?: undefined): string; - encodeFunctionData(functionFragment: "isHandler", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isKeeper", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "marginFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "maxMarginFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "maxTokenSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "mintReceiver", values?: undefined): string; - encodeFunctionData(functionFragment: "pendingActions", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "processMint", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "redeemUsdg", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "removeAdmin", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "rewardRouter", values?: undefined): string; - encodeFunctionData(functionFragment: "setAdmin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setBuffer", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setContractHandler", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setExternalAdmin", values: [AddressLike, AddressLike]): string; - encodeFunctionData( - functionFragment: "setFees", - values: [ - AddressLike, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - boolean, - ] - ): string; - encodeFunctionData( - functionFragment: "setFundingRate", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "setGlpCooldownDuration", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "setHandler", values: [AddressLike, AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setInPrivateLiquidationMode", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setInPrivateTransferMode", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setIsLeverageEnabled", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setIsSwapEnabled", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setKeeper", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setLiquidator", values: [AddressLike, AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setMarginFeeBasisPoints", values: [BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "setMaxGasPrice", values: [AddressLike, BigNumberish]): string; - encodeFunctionData( - functionFragment: "setMaxGlobalShortSize", - values: [AddressLike, AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "setMaxLeverage", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setPriceFeed", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "setReferrerTier", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setShortsTrackerAveragePriceWeight", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setShouldToggleIsLeverageEnabled", values: [boolean]): string; - encodeFunctionData( - functionFragment: "setSwapFees", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "setTier", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "setTokenConfig", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "setUsdgAmounts", values: [AddressLike, AddressLike[], BigNumberish[]]): string; - encodeFunctionData(functionFragment: "setVaultUtils", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "shouldToggleIsLeverageEnabled", values?: undefined): string; - encodeFunctionData(functionFragment: "signalApprove", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "signalMint", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "signalRedeemUsdg", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "signalSetGov", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "signalSetHandler", values: [AddressLike, AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "signalSetPriceFeed", values: [AddressLike, AddressLike]): string; - encodeFunctionData( - functionFragment: "signalVaultSetTokenConfig", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish, BigNumberish, boolean, boolean] - ): string; - encodeFunctionData( - functionFragment: "signalWithdrawToken", - values: [AddressLike, AddressLike, AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "tokenManager", values?: undefined): string; - encodeFunctionData(functionFragment: "transferIn", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "updateUsdgSupply", values: [BigNumberish]): string; - encodeFunctionData( - functionFragment: "vaultSetTokenConfig", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish, BigNumberish, boolean, boolean] - ): string; - encodeFunctionData(functionFragment: "withdrawFees", values: [AddressLike, AddressLike, AddressLike]): string; - encodeFunctionData( - functionFragment: "withdrawToken", - values: [AddressLike, AddressLike, AddressLike, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "MAX_BUFFER", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MAX_FUNDING_RATE_FACTOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MAX_LEVERAGE_VALIDATION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "PRICE_PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "batchSetBonusRewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "batchWithdrawFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "buffer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancelAction", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "disableLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "enableLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "glpManager", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "govSetCodeOwner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initGlpManager", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initRewardRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isKeeper", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "marginFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxMarginFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxTokenSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mintReceiver", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pendingActions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "processMint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "redeemUsdg", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "rewardRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setBuffer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setContractHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setExternalAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGlpCooldownDuration", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInPrivateLiquidationMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInPrivateTransferMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIsLeverageEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIsSwapEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setKeeper", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setLiquidator", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMarginFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxGasPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxGlobalShortSize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setPriceFeed", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setReferrerTier", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setShortsTrackerAveragePriceWeight", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setShouldToggleIsLeverageEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setSwapFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTier", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTokenConfig", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setUsdgAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setVaultUtils", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "shouldToggleIsLeverageEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signalApprove", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signalMint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signalRedeemUsdg", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signalSetGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signalSetHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signalSetPriceFeed", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signalVaultSetTokenConfig", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "signalWithdrawToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenManager", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferIn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateUsdgSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vaultSetTokenConfig", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawToken", data: BytesLike): Result; -} - -export namespace ClearActionEvent { - export type InputTuple = [action: BytesLike]; - export type OutputTuple = [action: string]; - export interface OutputObject { - action: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignalApproveEvent { - export type InputTuple = [token: AddressLike, spender: AddressLike, amount: BigNumberish, action: BytesLike]; - export type OutputTuple = [token: string, spender: string, amount: bigint, action: string]; - export interface OutputObject { - token: string; - spender: string; - amount: bigint; - action: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignalMintEvent { - export type InputTuple = [token: AddressLike, receiver: AddressLike, amount: BigNumberish, action: BytesLike]; - export type OutputTuple = [token: string, receiver: string, amount: bigint, action: string]; - export interface OutputObject { - token: string; - receiver: string; - amount: bigint; - action: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignalPendingActionEvent { - export type InputTuple = [action: BytesLike]; - export type OutputTuple = [action: string]; - export interface OutputObject { - action: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignalRedeemUsdgEvent { - export type InputTuple = [vault: AddressLike, token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [vault: string, token: string, amount: bigint]; - export interface OutputObject { - vault: string; - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignalSetGovEvent { - export type InputTuple = [target: AddressLike, gov: AddressLike, action: BytesLike]; - export type OutputTuple = [target: string, gov: string, action: string]; - export interface OutputObject { - target: string; - gov: string; - action: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignalSetHandlerEvent { - export type InputTuple = [target: AddressLike, handler: AddressLike, isActive: boolean, action: BytesLike]; - export type OutputTuple = [target: string, handler: string, isActive: boolean, action: string]; - export interface OutputObject { - target: string; - handler: string; - isActive: boolean; - action: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignalSetPriceFeedEvent { - export type InputTuple = [vault: AddressLike, priceFeed: AddressLike, action: BytesLike]; - export type OutputTuple = [vault: string, priceFeed: string, action: string]; - export interface OutputObject { - vault: string; - priceFeed: string; - action: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignalVaultSetTokenConfigEvent { - export type InputTuple = [ - vault: AddressLike, - token: AddressLike, - tokenDecimals: BigNumberish, - tokenWeight: BigNumberish, - minProfitBps: BigNumberish, - maxUsdgAmount: BigNumberish, - isStable: boolean, - isShortable: boolean, - ]; - export type OutputTuple = [ - vault: string, - token: string, - tokenDecimals: bigint, - tokenWeight: bigint, - minProfitBps: bigint, - maxUsdgAmount: bigint, - isStable: boolean, - isShortable: boolean, - ]; - export interface OutputObject { - vault: string; - token: string; - tokenDecimals: bigint; - tokenWeight: bigint; - minProfitBps: bigint; - maxUsdgAmount: bigint; - isStable: boolean; - isShortable: boolean; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SignalWithdrawTokenEvent { - export type InputTuple = [ - target: AddressLike, - token: AddressLike, - receiver: AddressLike, - amount: BigNumberish, - action: BytesLike, - ]; - export type OutputTuple = [target: string, token: string, receiver: string, amount: bigint, action: string]; - export interface OutputObject { - target: string; - token: string; - receiver: string; - amount: bigint; - action: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface Timelock extends BaseContract { - connect(runner?: ContractRunner | null): Timelock; - waitForDeployment(): Promise; - - interface: TimelockInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - MAX_BUFFER: TypedContractMethod<[], [bigint], "view">; - - MAX_FUNDING_RATE_FACTOR: TypedContractMethod<[], [bigint], "view">; - - MAX_LEVERAGE_VALIDATION: TypedContractMethod<[], [bigint], "view">; - - PRICE_PRECISION: TypedContractMethod<[], [bigint], "view">; - - admin: TypedContractMethod<[], [string], "view">; - - approve: TypedContractMethod< - [_token: AddressLike, _spender: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - batchSetBonusRewards: TypedContractMethod< - [_vester: AddressLike, _accounts: AddressLike[], _amounts: BigNumberish[]], - [void], - "nonpayable" - >; - - batchWithdrawFees: TypedContractMethod<[_vault: AddressLike, _tokens: AddressLike[]], [void], "nonpayable">; - - buffer: TypedContractMethod<[], [bigint], "view">; - - cancelAction: TypedContractMethod<[_action: BytesLike], [void], "nonpayable">; - - disableLeverage: TypedContractMethod<[_vault: AddressLike], [void], "nonpayable">; - - enableLeverage: TypedContractMethod<[_vault: AddressLike], [void], "nonpayable">; - - glpManager: TypedContractMethod<[], [string], "view">; - - govSetCodeOwner: TypedContractMethod< - [_referralStorage: AddressLike, _code: BytesLike, _newAccount: AddressLike], - [void], - "nonpayable" - >; - - initGlpManager: TypedContractMethod<[], [void], "nonpayable">; - - initRewardRouter: TypedContractMethod<[], [void], "nonpayable">; - - isHandler: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isKeeper: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - marginFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - maxMarginFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - maxTokenSupply: TypedContractMethod<[], [bigint], "view">; - - mintReceiver: TypedContractMethod<[], [string], "view">; - - pendingActions: TypedContractMethod<[arg0: BytesLike], [bigint], "view">; - - processMint: TypedContractMethod< - [_token: AddressLike, _receiver: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - redeemUsdg: TypedContractMethod< - [_vault: AddressLike, _token: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - removeAdmin: TypedContractMethod<[_token: AddressLike, _account: AddressLike], [void], "nonpayable">; - - rewardRouter: TypedContractMethod<[], [string], "view">; - - setAdmin: TypedContractMethod<[_admin: AddressLike], [void], "nonpayable">; - - setBuffer: TypedContractMethod<[_buffer: BigNumberish], [void], "nonpayable">; - - setContractHandler: TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setExternalAdmin: TypedContractMethod<[_target: AddressLike, _admin: AddressLike], [void], "nonpayable">; - - setFees: TypedContractMethod< - [ - _vault: AddressLike, - _taxBasisPoints: BigNumberish, - _stableTaxBasisPoints: BigNumberish, - _mintBurnFeeBasisPoints: BigNumberish, - _swapFeeBasisPoints: BigNumberish, - _stableSwapFeeBasisPoints: BigNumberish, - _marginFeeBasisPoints: BigNumberish, - _liquidationFeeUsd: BigNumberish, - _minProfitTime: BigNumberish, - _hasDynamicFees: boolean, - ], - [void], - "nonpayable" - >; - - setFundingRate: TypedContractMethod< - [ - _vault: AddressLike, - _fundingInterval: BigNumberish, - _fundingRateFactor: BigNumberish, - _stableFundingRateFactor: BigNumberish, - ], - [void], - "nonpayable" - >; - - setGlpCooldownDuration: TypedContractMethod<[_cooldownDuration: BigNumberish], [void], "nonpayable">; - - setGov: TypedContractMethod<[_target: AddressLike, _gov: AddressLike], [void], "nonpayable">; - - setHandler: TypedContractMethod< - [_target: AddressLike, _handler: AddressLike, _isActive: boolean], - [void], - "nonpayable" - >; - - setInPrivateLiquidationMode: TypedContractMethod< - [_vault: AddressLike, _inPrivateLiquidationMode: boolean], - [void], - "nonpayable" - >; - - setInPrivateTransferMode: TypedContractMethod< - [_token: AddressLike, _inPrivateTransferMode: boolean], - [void], - "nonpayable" - >; - - setIsLeverageEnabled: TypedContractMethod<[_vault: AddressLike, _isLeverageEnabled: boolean], [void], "nonpayable">; - - setIsSwapEnabled: TypedContractMethod<[_vault: AddressLike, _isSwapEnabled: boolean], [void], "nonpayable">; - - setKeeper: TypedContractMethod<[_keeper: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setLiquidator: TypedContractMethod< - [_vault: AddressLike, _liquidator: AddressLike, _isActive: boolean], - [void], - "nonpayable" - >; - - setMarginFeeBasisPoints: TypedContractMethod< - [_marginFeeBasisPoints: BigNumberish, _maxMarginFeeBasisPoints: BigNumberish], - [void], - "nonpayable" - >; - - setMaxGasPrice: TypedContractMethod<[_vault: AddressLike, _maxGasPrice: BigNumberish], [void], "nonpayable">; - - setMaxGlobalShortSize: TypedContractMethod< - [_vault: AddressLike, _token: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - setMaxLeverage: TypedContractMethod<[_vault: AddressLike, _maxLeverage: BigNumberish], [void], "nonpayable">; - - setPriceFeed: TypedContractMethod<[_vault: AddressLike, _priceFeed: AddressLike], [void], "nonpayable">; - - setReferrerTier: TypedContractMethod< - [_referralStorage: AddressLike, _referrer: AddressLike, _tierId: BigNumberish], - [void], - "nonpayable" - >; - - setShortsTrackerAveragePriceWeight: TypedContractMethod< - [_shortsTrackerAveragePriceWeight: BigNumberish], - [void], - "nonpayable" - >; - - setShouldToggleIsLeverageEnabled: TypedContractMethod< - [_shouldToggleIsLeverageEnabled: boolean], - [void], - "nonpayable" - >; - - setSwapFees: TypedContractMethod< - [ - _vault: AddressLike, - _taxBasisPoints: BigNumberish, - _stableTaxBasisPoints: BigNumberish, - _mintBurnFeeBasisPoints: BigNumberish, - _swapFeeBasisPoints: BigNumberish, - _stableSwapFeeBasisPoints: BigNumberish, - ], - [void], - "nonpayable" - >; - - setTier: TypedContractMethod< - [_referralStorage: AddressLike, _tierId: BigNumberish, _totalRebate: BigNumberish, _discountShare: BigNumberish], - [void], - "nonpayable" - >; - - setTokenConfig: TypedContractMethod< - [ - _vault: AddressLike, - _token: AddressLike, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _bufferAmount: BigNumberish, - _usdgAmount: BigNumberish, - ], - [void], - "nonpayable" - >; - - setUsdgAmounts: TypedContractMethod< - [_vault: AddressLike, _tokens: AddressLike[], _usdgAmounts: BigNumberish[]], - [void], - "nonpayable" - >; - - setVaultUtils: TypedContractMethod<[_vault: AddressLike, _vaultUtils: AddressLike], [void], "nonpayable">; - - shouldToggleIsLeverageEnabled: TypedContractMethod<[], [boolean], "view">; - - signalApprove: TypedContractMethod< - [_token: AddressLike, _spender: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - signalMint: TypedContractMethod< - [_token: AddressLike, _receiver: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - signalRedeemUsdg: TypedContractMethod< - [_vault: AddressLike, _token: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - signalSetGov: TypedContractMethod<[_target: AddressLike, _gov: AddressLike], [void], "nonpayable">; - - signalSetHandler: TypedContractMethod< - [_target: AddressLike, _handler: AddressLike, _isActive: boolean], - [void], - "nonpayable" - >; - - signalSetPriceFeed: TypedContractMethod<[_vault: AddressLike, _priceFeed: AddressLike], [void], "nonpayable">; - - signalVaultSetTokenConfig: TypedContractMethod< - [ - _vault: AddressLike, - _token: AddressLike, - _tokenDecimals: BigNumberish, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _isStable: boolean, - _isShortable: boolean, - ], - [void], - "nonpayable" - >; - - signalWithdrawToken: TypedContractMethod< - [_target: AddressLike, _token: AddressLike, _receiver: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - tokenManager: TypedContractMethod<[], [string], "view">; - - transferIn: TypedContractMethod< - [_sender: AddressLike, _token: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - updateUsdgSupply: TypedContractMethod<[usdgAmount: BigNumberish], [void], "nonpayable">; - - vaultSetTokenConfig: TypedContractMethod< - [ - _vault: AddressLike, - _token: AddressLike, - _tokenDecimals: BigNumberish, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _isStable: boolean, - _isShortable: boolean, - ], - [void], - "nonpayable" - >; - - withdrawFees: TypedContractMethod< - [_vault: AddressLike, _token: AddressLike, _receiver: AddressLike], - [void], - "nonpayable" - >; - - withdrawToken: TypedContractMethod< - [_target: AddressLike, _token: AddressLike, _receiver: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "MAX_BUFFER"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MAX_FUNDING_RATE_FACTOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MAX_LEVERAGE_VALIDATION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "PRICE_PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "admin"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[_token: AddressLike, _spender: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "batchSetBonusRewards" - ): TypedContractMethod< - [_vester: AddressLike, _accounts: AddressLike[], _amounts: BigNumberish[]], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "batchWithdrawFees" - ): TypedContractMethod<[_vault: AddressLike, _tokens: AddressLike[]], [void], "nonpayable">; - getFunction(nameOrSignature: "buffer"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "cancelAction"): TypedContractMethod<[_action: BytesLike], [void], "nonpayable">; - getFunction(nameOrSignature: "disableLeverage"): TypedContractMethod<[_vault: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "enableLeverage"): TypedContractMethod<[_vault: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "glpManager"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "govSetCodeOwner" - ): TypedContractMethod< - [_referralStorage: AddressLike, _code: BytesLike, _newAccount: AddressLike], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "initGlpManager"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "initRewardRouter"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "isHandler"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isKeeper"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "marginFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxMarginFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxTokenSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "mintReceiver"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "pendingActions"): TypedContractMethod<[arg0: BytesLike], [bigint], "view">; - getFunction( - nameOrSignature: "processMint" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "redeemUsdg" - ): TypedContractMethod<[_vault: AddressLike, _token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "removeAdmin" - ): TypedContractMethod<[_token: AddressLike, _account: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "rewardRouter"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "setAdmin"): TypedContractMethod<[_admin: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setBuffer"): TypedContractMethod<[_buffer: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setContractHandler" - ): TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setExternalAdmin" - ): TypedContractMethod<[_target: AddressLike, _admin: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setFees" - ): TypedContractMethod< - [ - _vault: AddressLike, - _taxBasisPoints: BigNumberish, - _stableTaxBasisPoints: BigNumberish, - _mintBurnFeeBasisPoints: BigNumberish, - _swapFeeBasisPoints: BigNumberish, - _stableSwapFeeBasisPoints: BigNumberish, - _marginFeeBasisPoints: BigNumberish, - _liquidationFeeUsd: BigNumberish, - _minProfitTime: BigNumberish, - _hasDynamicFees: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setFundingRate" - ): TypedContractMethod< - [ - _vault: AddressLike, - _fundingInterval: BigNumberish, - _fundingRateFactor: BigNumberish, - _stableFundingRateFactor: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setGlpCooldownDuration" - ): TypedContractMethod<[_cooldownDuration: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setGov" - ): TypedContractMethod<[_target: AddressLike, _gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setHandler" - ): TypedContractMethod<[_target: AddressLike, _handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInPrivateLiquidationMode" - ): TypedContractMethod<[_vault: AddressLike, _inPrivateLiquidationMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInPrivateTransferMode" - ): TypedContractMethod<[_token: AddressLike, _inPrivateTransferMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setIsLeverageEnabled" - ): TypedContractMethod<[_vault: AddressLike, _isLeverageEnabled: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setIsSwapEnabled" - ): TypedContractMethod<[_vault: AddressLike, _isSwapEnabled: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setKeeper" - ): TypedContractMethod<[_keeper: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setLiquidator" - ): TypedContractMethod<[_vault: AddressLike, _liquidator: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMarginFeeBasisPoints" - ): TypedContractMethod< - [_marginFeeBasisPoints: BigNumberish, _maxMarginFeeBasisPoints: BigNumberish], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setMaxGasPrice" - ): TypedContractMethod<[_vault: AddressLike, _maxGasPrice: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxGlobalShortSize" - ): TypedContractMethod<[_vault: AddressLike, _token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxLeverage" - ): TypedContractMethod<[_vault: AddressLike, _maxLeverage: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setPriceFeed" - ): TypedContractMethod<[_vault: AddressLike, _priceFeed: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setReferrerTier" - ): TypedContractMethod< - [_referralStorage: AddressLike, _referrer: AddressLike, _tierId: BigNumberish], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setShortsTrackerAveragePriceWeight" - ): TypedContractMethod<[_shortsTrackerAveragePriceWeight: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setShouldToggleIsLeverageEnabled" - ): TypedContractMethod<[_shouldToggleIsLeverageEnabled: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setSwapFees" - ): TypedContractMethod< - [ - _vault: AddressLike, - _taxBasisPoints: BigNumberish, - _stableTaxBasisPoints: BigNumberish, - _mintBurnFeeBasisPoints: BigNumberish, - _swapFeeBasisPoints: BigNumberish, - _stableSwapFeeBasisPoints: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setTier" - ): TypedContractMethod< - [_referralStorage: AddressLike, _tierId: BigNumberish, _totalRebate: BigNumberish, _discountShare: BigNumberish], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setTokenConfig" - ): TypedContractMethod< - [ - _vault: AddressLike, - _token: AddressLike, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _bufferAmount: BigNumberish, - _usdgAmount: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setUsdgAmounts" - ): TypedContractMethod< - [_vault: AddressLike, _tokens: AddressLike[], _usdgAmounts: BigNumberish[]], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setVaultUtils" - ): TypedContractMethod<[_vault: AddressLike, _vaultUtils: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "shouldToggleIsLeverageEnabled"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "signalApprove" - ): TypedContractMethod<[_token: AddressLike, _spender: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "signalMint" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "signalRedeemUsdg" - ): TypedContractMethod<[_vault: AddressLike, _token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "signalSetGov" - ): TypedContractMethod<[_target: AddressLike, _gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "signalSetHandler" - ): TypedContractMethod<[_target: AddressLike, _handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "signalSetPriceFeed" - ): TypedContractMethod<[_vault: AddressLike, _priceFeed: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "signalVaultSetTokenConfig" - ): TypedContractMethod< - [ - _vault: AddressLike, - _token: AddressLike, - _tokenDecimals: BigNumberish, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _isStable: boolean, - _isShortable: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "signalWithdrawToken" - ): TypedContractMethod< - [_target: AddressLike, _token: AddressLike, _receiver: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "tokenManager"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "transferIn" - ): TypedContractMethod<[_sender: AddressLike, _token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "updateUsdgSupply" - ): TypedContractMethod<[usdgAmount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "vaultSetTokenConfig" - ): TypedContractMethod< - [ - _vault: AddressLike, - _token: AddressLike, - _tokenDecimals: BigNumberish, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _isStable: boolean, - _isShortable: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "withdrawFees" - ): TypedContractMethod<[_vault: AddressLike, _token: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "withdrawToken" - ): TypedContractMethod< - [_target: AddressLike, _token: AddressLike, _receiver: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - getEvent( - key: "ClearAction" - ): TypedContractEvent; - getEvent( - key: "SignalApprove" - ): TypedContractEvent; - getEvent( - key: "SignalMint" - ): TypedContractEvent; - getEvent( - key: "SignalPendingAction" - ): TypedContractEvent< - SignalPendingActionEvent.InputTuple, - SignalPendingActionEvent.OutputTuple, - SignalPendingActionEvent.OutputObject - >; - getEvent( - key: "SignalRedeemUsdg" - ): TypedContractEvent< - SignalRedeemUsdgEvent.InputTuple, - SignalRedeemUsdgEvent.OutputTuple, - SignalRedeemUsdgEvent.OutputObject - >; - getEvent( - key: "SignalSetGov" - ): TypedContractEvent; - getEvent( - key: "SignalSetHandler" - ): TypedContractEvent< - SignalSetHandlerEvent.InputTuple, - SignalSetHandlerEvent.OutputTuple, - SignalSetHandlerEvent.OutputObject - >; - getEvent( - key: "SignalSetPriceFeed" - ): TypedContractEvent< - SignalSetPriceFeedEvent.InputTuple, - SignalSetPriceFeedEvent.OutputTuple, - SignalSetPriceFeedEvent.OutputObject - >; - getEvent( - key: "SignalVaultSetTokenConfig" - ): TypedContractEvent< - SignalVaultSetTokenConfigEvent.InputTuple, - SignalVaultSetTokenConfigEvent.OutputTuple, - SignalVaultSetTokenConfigEvent.OutputObject - >; - getEvent( - key: "SignalWithdrawToken" - ): TypedContractEvent< - SignalWithdrawTokenEvent.InputTuple, - SignalWithdrawTokenEvent.OutputTuple, - SignalWithdrawTokenEvent.OutputObject - >; - - filters: { - "ClearAction(bytes32)": TypedContractEvent< - ClearActionEvent.InputTuple, - ClearActionEvent.OutputTuple, - ClearActionEvent.OutputObject - >; - ClearAction: TypedContractEvent< - ClearActionEvent.InputTuple, - ClearActionEvent.OutputTuple, - ClearActionEvent.OutputObject - >; - - "SignalApprove(address,address,uint256,bytes32)": TypedContractEvent< - SignalApproveEvent.InputTuple, - SignalApproveEvent.OutputTuple, - SignalApproveEvent.OutputObject - >; - SignalApprove: TypedContractEvent< - SignalApproveEvent.InputTuple, - SignalApproveEvent.OutputTuple, - SignalApproveEvent.OutputObject - >; - - "SignalMint(address,address,uint256,bytes32)": TypedContractEvent< - SignalMintEvent.InputTuple, - SignalMintEvent.OutputTuple, - SignalMintEvent.OutputObject - >; - SignalMint: TypedContractEvent< - SignalMintEvent.InputTuple, - SignalMintEvent.OutputTuple, - SignalMintEvent.OutputObject - >; - - "SignalPendingAction(bytes32)": TypedContractEvent< - SignalPendingActionEvent.InputTuple, - SignalPendingActionEvent.OutputTuple, - SignalPendingActionEvent.OutputObject - >; - SignalPendingAction: TypedContractEvent< - SignalPendingActionEvent.InputTuple, - SignalPendingActionEvent.OutputTuple, - SignalPendingActionEvent.OutputObject - >; - - "SignalRedeemUsdg(address,address,uint256)": TypedContractEvent< - SignalRedeemUsdgEvent.InputTuple, - SignalRedeemUsdgEvent.OutputTuple, - SignalRedeemUsdgEvent.OutputObject - >; - SignalRedeemUsdg: TypedContractEvent< - SignalRedeemUsdgEvent.InputTuple, - SignalRedeemUsdgEvent.OutputTuple, - SignalRedeemUsdgEvent.OutputObject - >; - - "SignalSetGov(address,address,bytes32)": TypedContractEvent< - SignalSetGovEvent.InputTuple, - SignalSetGovEvent.OutputTuple, - SignalSetGovEvent.OutputObject - >; - SignalSetGov: TypedContractEvent< - SignalSetGovEvent.InputTuple, - SignalSetGovEvent.OutputTuple, - SignalSetGovEvent.OutputObject - >; - - "SignalSetHandler(address,address,bool,bytes32)": TypedContractEvent< - SignalSetHandlerEvent.InputTuple, - SignalSetHandlerEvent.OutputTuple, - SignalSetHandlerEvent.OutputObject - >; - SignalSetHandler: TypedContractEvent< - SignalSetHandlerEvent.InputTuple, - SignalSetHandlerEvent.OutputTuple, - SignalSetHandlerEvent.OutputObject - >; - - "SignalSetPriceFeed(address,address,bytes32)": TypedContractEvent< - SignalSetPriceFeedEvent.InputTuple, - SignalSetPriceFeedEvent.OutputTuple, - SignalSetPriceFeedEvent.OutputObject - >; - SignalSetPriceFeed: TypedContractEvent< - SignalSetPriceFeedEvent.InputTuple, - SignalSetPriceFeedEvent.OutputTuple, - SignalSetPriceFeedEvent.OutputObject - >; - - "SignalVaultSetTokenConfig(address,address,uint256,uint256,uint256,uint256,bool,bool)": TypedContractEvent< - SignalVaultSetTokenConfigEvent.InputTuple, - SignalVaultSetTokenConfigEvent.OutputTuple, - SignalVaultSetTokenConfigEvent.OutputObject - >; - SignalVaultSetTokenConfig: TypedContractEvent< - SignalVaultSetTokenConfigEvent.InputTuple, - SignalVaultSetTokenConfigEvent.OutputTuple, - SignalVaultSetTokenConfigEvent.OutputObject - >; - - "SignalWithdrawToken(address,address,address,uint256,bytes32)": TypedContractEvent< - SignalWithdrawTokenEvent.InputTuple, - SignalWithdrawTokenEvent.OutputTuple, - SignalWithdrawTokenEvent.OutputObject - >; - SignalWithdrawToken: TypedContractEvent< - SignalWithdrawTokenEvent.InputTuple, - SignalWithdrawTokenEvent.OutputTuple, - SignalWithdrawTokenEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/Token.ts b/src/typechain-types/Token.ts deleted file mode 100644 index d74f611d21..0000000000 --- a/src/typechain-types/Token.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface TokenInterface extends Interface { - getFunction( - nameOrSignature: - | "allowance" - | "approve" - | "balanceOf" - | "decimals" - | "decreaseAllowance" - | "deposit" - | "increaseAllowance" - | "mint" - | "name" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - | "withdraw" - | "withdrawToken" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; - - encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "decreaseAllowance", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "deposit", values?: undefined): string; - encodeFunctionData(functionFragment: "increaseAllowance", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "mint", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "withdraw", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "withdrawToken", values: [AddressLike, AddressLike, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawToken", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; - export interface OutputObject { - owner: string; - spender: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface Token extends BaseContract { - connect(runner?: ContractRunner | null): Token; - waitForDeployment(): Promise; - - interface: TokenInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - allowance: TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; - - approve: TypedContractMethod<[spender: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - - balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; - - decimals: TypedContractMethod<[], [bigint], "view">; - - decreaseAllowance: TypedContractMethod< - [spender: AddressLike, subtractedValue: BigNumberish], - [boolean], - "nonpayable" - >; - - deposit: TypedContractMethod<[], [void], "payable">; - - increaseAllowance: TypedContractMethod<[spender: AddressLike, addedValue: BigNumberish], [boolean], "nonpayable">; - - mint: TypedContractMethod<[account: AddressLike, amount: BigNumberish], [void], "nonpayable">; - - name: TypedContractMethod<[], [string], "view">; - - symbol: TypedContractMethod<[], [string], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transfer: TypedContractMethod<[recipient: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - - transferFrom: TypedContractMethod< - [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], - [boolean], - "nonpayable" - >; - - withdraw: TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">; - - withdrawToken: TypedContractMethod< - [token: AddressLike, account: AddressLike, amount: BigNumberish], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "allowance" - ): TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[spender: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "decreaseAllowance" - ): TypedContractMethod<[spender: AddressLike, subtractedValue: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "deposit"): TypedContractMethod<[], [void], "payable">; - getFunction( - nameOrSignature: "increaseAllowance" - ): TypedContractMethod<[spender: AddressLike, addedValue: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "mint" - ): TypedContractMethod<[account: AddressLike, amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transfer" - ): TypedContractMethod<[recipient: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod<[sender: AddressLike, recipient: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "withdraw"): TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "withdrawToken" - ): TypedContractMethod<[token: AddressLike, account: AddressLike, amount: BigNumberish], [void], "nonpayable">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent( - key: "Transfer" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - }; -} diff --git a/src/typechain-types/Treasury.ts b/src/typechain-types/Treasury.ts deleted file mode 100644 index 9630fecb59..0000000000 --- a/src/typechain-types/Treasury.ts +++ /dev/null @@ -1,259 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface TreasuryInterface extends Interface { - getFunction( - nameOrSignature: - | "addLiquidity" - | "addWhitelists" - | "busd" - | "busdBasisPoints" - | "busdHardCap" - | "busdReceived" - | "busdSlotCap" - | "endSwap" - | "extendUnlockTime" - | "fund" - | "gmt" - | "gmtListingPrice" - | "gmtPresalePrice" - | "gov" - | "increaseBusdBasisPoints" - | "initialize" - | "isInitialized" - | "isLiquidityAdded" - | "isSwapActive" - | "removeWhitelists" - | "router" - | "setFund" - | "setGov" - | "swap" - | "swapAmounts" - | "swapWhitelist" - | "unlockTime" - | "updateWhitelist" - | "withdrawToken" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "addLiquidity", values?: undefined): string; - encodeFunctionData(functionFragment: "addWhitelists", values: [AddressLike[]]): string; - encodeFunctionData(functionFragment: "busd", values?: undefined): string; - encodeFunctionData(functionFragment: "busdBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "busdHardCap", values?: undefined): string; - encodeFunctionData(functionFragment: "busdReceived", values?: undefined): string; - encodeFunctionData(functionFragment: "busdSlotCap", values?: undefined): string; - encodeFunctionData(functionFragment: "endSwap", values?: undefined): string; - encodeFunctionData(functionFragment: "extendUnlockTime", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "fund", values?: undefined): string; - encodeFunctionData(functionFragment: "gmt", values?: undefined): string; - encodeFunctionData(functionFragment: "gmtListingPrice", values?: undefined): string; - encodeFunctionData(functionFragment: "gmtPresalePrice", values?: undefined): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "increaseBusdBasisPoints", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "initialize", values: [AddressLike[], BigNumberish[]]): string; - encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; - encodeFunctionData(functionFragment: "isLiquidityAdded", values?: undefined): string; - encodeFunctionData(functionFragment: "isSwapActive", values?: undefined): string; - encodeFunctionData(functionFragment: "removeWhitelists", values: [AddressLike[]]): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "setFund", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "swap", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "swapAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "swapWhitelist", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "unlockTime", values?: undefined): string; - encodeFunctionData(functionFragment: "updateWhitelist", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "withdrawToken", values: [AddressLike, AddressLike, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "addLiquidity", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addWhitelists", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "busd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "busdBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "busdHardCap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "busdReceived", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "busdSlotCap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "endSwap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "extendUnlockTime", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "fund", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gmt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gmtListingPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gmtPresalePrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increaseBusdBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isLiquidityAdded", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isSwapActive", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeWhitelists", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFund", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapWhitelist", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "unlockTime", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateWhitelist", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawToken", data: BytesLike): Result; -} - -export interface Treasury extends BaseContract { - connect(runner?: ContractRunner | null): Treasury; - waitForDeployment(): Promise; - - interface: TreasuryInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - addLiquidity: TypedContractMethod<[], [void], "nonpayable">; - - addWhitelists: TypedContractMethod<[_accounts: AddressLike[]], [void], "nonpayable">; - - busd: TypedContractMethod<[], [string], "view">; - - busdBasisPoints: TypedContractMethod<[], [bigint], "view">; - - busdHardCap: TypedContractMethod<[], [bigint], "view">; - - busdReceived: TypedContractMethod<[], [bigint], "view">; - - busdSlotCap: TypedContractMethod<[], [bigint], "view">; - - endSwap: TypedContractMethod<[], [void], "nonpayable">; - - extendUnlockTime: TypedContractMethod<[_unlockTime: BigNumberish], [void], "nonpayable">; - - fund: TypedContractMethod<[], [string], "view">; - - gmt: TypedContractMethod<[], [string], "view">; - - gmtListingPrice: TypedContractMethod<[], [bigint], "view">; - - gmtPresalePrice: TypedContractMethod<[], [bigint], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - increaseBusdBasisPoints: TypedContractMethod<[_busdBasisPoints: BigNumberish], [void], "nonpayable">; - - initialize: TypedContractMethod<[_addresses: AddressLike[], _values: BigNumberish[]], [void], "nonpayable">; - - isInitialized: TypedContractMethod<[], [boolean], "view">; - - isLiquidityAdded: TypedContractMethod<[], [boolean], "view">; - - isSwapActive: TypedContractMethod<[], [boolean], "view">; - - removeWhitelists: TypedContractMethod<[_accounts: AddressLike[]], [void], "nonpayable">; - - router: TypedContractMethod<[], [string], "view">; - - setFund: TypedContractMethod<[_fund: AddressLike], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - swap: TypedContractMethod<[_busdAmount: BigNumberish], [void], "nonpayable">; - - swapAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - swapWhitelist: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - unlockTime: TypedContractMethod<[], [bigint], "view">; - - updateWhitelist: TypedContractMethod<[prevAccount: AddressLike, nextAccount: AddressLike], [void], "nonpayable">; - - withdrawToken: TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "addLiquidity"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "addWhitelists"): TypedContractMethod<[_accounts: AddressLike[]], [void], "nonpayable">; - getFunction(nameOrSignature: "busd"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "busdBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "busdHardCap"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "busdReceived"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "busdSlotCap"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "endSwap"): TypedContractMethod<[], [void], "nonpayable">; - getFunction( - nameOrSignature: "extendUnlockTime" - ): TypedContractMethod<[_unlockTime: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "fund"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "gmt"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "gmtListingPrice"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "gmtPresalePrice"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "increaseBusdBasisPoints" - ): TypedContractMethod<[_busdBasisPoints: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "initialize" - ): TypedContractMethod<[_addresses: AddressLike[], _values: BigNumberish[]], [void], "nonpayable">; - getFunction(nameOrSignature: "isInitialized"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isLiquidityAdded"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isSwapActive"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "removeWhitelists" - ): TypedContractMethod<[_accounts: AddressLike[]], [void], "nonpayable">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "setFund"): TypedContractMethod<[_fund: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "swap"): TypedContractMethod<[_busdAmount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "swapAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "swapWhitelist"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "unlockTime"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "updateWhitelist" - ): TypedContractMethod<[prevAccount: AddressLike, nextAccount: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "withdrawToken" - ): TypedContractMethod<[_token: AddressLike, _account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - filters: {}; -} diff --git a/src/typechain-types/UniPool.ts b/src/typechain-types/UniPool.ts deleted file mode 100644 index 8fefe18aba..0000000000 --- a/src/typechain-types/UniPool.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface UniPoolInterface extends Interface { - getFunction(nameOrSignature: "observe" | "slot0" | "tickSpacing"): FunctionFragment; - - encodeFunctionData(functionFragment: "observe", values: [BigNumberish[]]): string; - encodeFunctionData(functionFragment: "slot0", values?: undefined): string; - encodeFunctionData(functionFragment: "tickSpacing", values?: undefined): string; - - decodeFunctionResult(functionFragment: "observe", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "slot0", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tickSpacing", data: BytesLike): Result; -} - -export interface UniPool extends BaseContract { - connect(runner?: ContractRunner | null): UniPool; - waitForDeployment(): Promise; - - interface: UniPoolInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - observe: TypedContractMethod< - [arg0: BigNumberish[]], - [ - [bigint[], bigint[]] & { - tickCumulatives: bigint[]; - secondsPerLiquidityCumulativeX128s: bigint[]; - }, - ], - "view" - >; - - slot0: TypedContractMethod< - [], - [ - [bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { - sqrtPriceX96: bigint; - tick: bigint; - observationIndex: bigint; - observationCardinality: bigint; - observationCardinalityNext: bigint; - feeProtocol: bigint; - unlocked: boolean; - }, - ], - "view" - >; - - tickSpacing: TypedContractMethod<[], [bigint], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "observe"): TypedContractMethod< - [arg0: BigNumberish[]], - [ - [bigint[], bigint[]] & { - tickCumulatives: bigint[]; - secondsPerLiquidityCumulativeX128s: bigint[]; - }, - ], - "view" - >; - getFunction(nameOrSignature: "slot0"): TypedContractMethod< - [], - [ - [bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { - sqrtPriceX96: bigint; - tick: bigint; - observationIndex: bigint; - observationCardinality: bigint; - observationCardinalityNext: bigint; - feeProtocol: bigint; - unlocked: boolean; - }, - ], - "view" - >; - getFunction(nameOrSignature: "tickSpacing"): TypedContractMethod<[], [bigint], "view">; - - filters: {}; -} diff --git a/src/typechain-types/UniswapV2.ts b/src/typechain-types/UniswapV2.ts deleted file mode 100644 index 4f28e989d8..0000000000 --- a/src/typechain-types/UniswapV2.ts +++ /dev/null @@ -1,456 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface UniswapV2Interface extends Interface { - getFunction( - nameOrSignature: - | "DOMAIN_SEPARATOR" - | "MINIMUM_LIQUIDITY" - | "PERMIT_TYPEHASH" - | "allowance" - | "approve" - | "balanceOf" - | "burn" - | "decimals" - | "factory" - | "getReserves" - | "initialize" - | "kLast" - | "mint" - | "name" - | "nonces" - | "permit" - | "price0CumulativeLast" - | "price1CumulativeLast" - | "skim" - | "swap" - | "symbol" - | "sync" - | "token0" - | "token1" - | "totalSupply" - | "transfer" - | "transferFrom" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Approval" | "Burn" | "Mint" | "Swap" | "Sync" | "Transfer"): EventFragment; - - encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; - encodeFunctionData(functionFragment: "MINIMUM_LIQUIDITY", values?: undefined): string; - encodeFunctionData(functionFragment: "PERMIT_TYPEHASH", values?: undefined): string; - encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "burn", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "factory", values?: undefined): string; - encodeFunctionData(functionFragment: "getReserves", values?: undefined): string; - encodeFunctionData(functionFragment: "initialize", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "kLast", values?: undefined): string; - encodeFunctionData(functionFragment: "mint", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "permit", - values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] - ): string; - encodeFunctionData(functionFragment: "price0CumulativeLast", values?: undefined): string; - encodeFunctionData(functionFragment: "price1CumulativeLast", values?: undefined): string; - encodeFunctionData(functionFragment: "skim", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "swap", values: [BigNumberish, BigNumberish, AddressLike, BytesLike]): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "sync", values?: undefined): string; - encodeFunctionData(functionFragment: "token0", values?: undefined): string; - encodeFunctionData(functionFragment: "token1", values?: undefined): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MINIMUM_LIQUIDITY", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "PERMIT_TYPEHASH", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getReserves", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "kLast", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "price0CumulativeLast", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "price1CumulativeLast", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "skim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sync", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "token0", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "token1", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; - export interface OutputObject { - owner: string; - spender: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace BurnEvent { - export type InputTuple = [sender: AddressLike, amount0: BigNumberish, amount1: BigNumberish, to: AddressLike]; - export type OutputTuple = [sender: string, amount0: bigint, amount1: bigint, to: string]; - export interface OutputObject { - sender: string; - amount0: bigint; - amount1: bigint; - to: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace MintEvent { - export type InputTuple = [sender: AddressLike, amount0: BigNumberish, amount1: BigNumberish]; - export type OutputTuple = [sender: string, amount0: bigint, amount1: bigint]; - export interface OutputObject { - sender: string; - amount0: bigint; - amount1: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SwapEvent { - export type InputTuple = [ - sender: AddressLike, - amount0In: BigNumberish, - amount1In: BigNumberish, - amount0Out: BigNumberish, - amount1Out: BigNumberish, - to: AddressLike, - ]; - export type OutputTuple = [ - sender: string, - amount0In: bigint, - amount1In: bigint, - amount0Out: bigint, - amount1Out: bigint, - to: string, - ]; - export interface OutputObject { - sender: string; - amount0In: bigint; - amount1In: bigint; - amount0Out: bigint; - amount1Out: bigint; - to: string; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SyncEvent { - export type InputTuple = [reserve0: BigNumberish, reserve1: BigNumberish]; - export type OutputTuple = [reserve0: bigint, reserve1: bigint]; - export interface OutputObject { - reserve0: bigint; - reserve1: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface UniswapV2 extends BaseContract { - connect(runner?: ContractRunner | null): UniswapV2; - waitForDeployment(): Promise; - - interface: UniswapV2Interface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; - - MINIMUM_LIQUIDITY: TypedContractMethod<[], [bigint], "view">; - - PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; - - allowance: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - - approve: TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - - balanceOf: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - burn: TypedContractMethod<[to: AddressLike], [[bigint, bigint] & { amount0: bigint; amount1: bigint }], "nonpayable">; - - decimals: TypedContractMethod<[], [bigint], "view">; - - factory: TypedContractMethod<[], [string], "view">; - - getReserves: TypedContractMethod< - [], - [ - [bigint, bigint, bigint] & { - _reserve0: bigint; - _reserve1: bigint; - _blockTimestampLast: bigint; - }, - ], - "view" - >; - - initialize: TypedContractMethod<[_token0: AddressLike, _token1: AddressLike], [void], "nonpayable">; - - kLast: TypedContractMethod<[], [bigint], "view">; - - mint: TypedContractMethod<[to: AddressLike], [bigint], "nonpayable">; - - name: TypedContractMethod<[], [string], "view">; - - nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - permit: TypedContractMethod< - [ - owner: AddressLike, - spender: AddressLike, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - ], - [void], - "nonpayable" - >; - - price0CumulativeLast: TypedContractMethod<[], [bigint], "view">; - - price1CumulativeLast: TypedContractMethod<[], [bigint], "view">; - - skim: TypedContractMethod<[to: AddressLike], [void], "nonpayable">; - - swap: TypedContractMethod< - [amount0Out: BigNumberish, amount1Out: BigNumberish, to: AddressLike, data: BytesLike], - [void], - "nonpayable" - >; - - symbol: TypedContractMethod<[], [string], "view">; - - sync: TypedContractMethod<[], [void], "nonpayable">; - - token0: TypedContractMethod<[], [string], "view">; - - token1: TypedContractMethod<[], [string], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transfer: TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - - transferFrom: TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "DOMAIN_SEPARATOR"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "MINIMUM_LIQUIDITY"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "PERMIT_TYPEHASH"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "allowance" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "burn" - ): TypedContractMethod<[to: AddressLike], [[bigint, bigint] & { amount0: bigint; amount1: bigint }], "nonpayable">; - getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "factory"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "getReserves"): TypedContractMethod< - [], - [ - [bigint, bigint, bigint] & { - _reserve0: bigint; - _reserve1: bigint; - _blockTimestampLast: bigint; - }, - ], - "view" - >; - getFunction( - nameOrSignature: "initialize" - ): TypedContractMethod<[_token0: AddressLike, _token1: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "kLast"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "mint"): TypedContractMethod<[to: AddressLike], [bigint], "nonpayable">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "nonces"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "permit" - ): TypedContractMethod< - [ - owner: AddressLike, - spender: AddressLike, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "price0CumulativeLast"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "price1CumulativeLast"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "skim"): TypedContractMethod<[to: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "swap" - ): TypedContractMethod< - [amount0Out: BigNumberish, amount1Out: BigNumberish, to: AddressLike, data: BytesLike], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "sync"): TypedContractMethod<[], [void], "nonpayable">; - getFunction(nameOrSignature: "token0"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "token1"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transfer" - ): TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent(key: "Burn"): TypedContractEvent; - getEvent(key: "Mint"): TypedContractEvent; - getEvent(key: "Swap"): TypedContractEvent; - getEvent(key: "Sync"): TypedContractEvent; - getEvent( - key: "Transfer" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "Burn(address,uint256,uint256,address)": TypedContractEvent< - BurnEvent.InputTuple, - BurnEvent.OutputTuple, - BurnEvent.OutputObject - >; - Burn: TypedContractEvent; - - "Mint(address,uint256,uint256)": TypedContractEvent< - MintEvent.InputTuple, - MintEvent.OutputTuple, - MintEvent.OutputObject - >; - Mint: TypedContractEvent; - - "Swap(address,uint256,uint256,uint256,uint256,address)": TypedContractEvent< - SwapEvent.InputTuple, - SwapEvent.OutputTuple, - SwapEvent.OutputObject - >; - Swap: TypedContractEvent; - - "Sync(uint112,uint112)": TypedContractEvent; - Sync: TypedContractEvent; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - }; -} diff --git a/src/typechain-types/Vault.ts b/src/typechain-types/Vault.ts deleted file mode 100644 index 7765ccc704..0000000000 --- a/src/typechain-types/Vault.ts +++ /dev/null @@ -1,2139 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface VaultInterface extends Interface { - getFunction( - nameOrSignature: - | "BASIS_POINTS_DIVISOR" - | "FUNDING_RATE_PRECISION" - | "MAX_FEE_BASIS_POINTS" - | "MAX_FUNDING_RATE_FACTOR" - | "MAX_LIQUIDATION_FEE_USD" - | "MIN_FUNDING_RATE_INTERVAL" - | "MIN_LEVERAGE" - | "PRICE_PRECISION" - | "USDG_DECIMALS" - | "addRouter" - | "adjustForDecimals" - | "allWhitelistedTokens" - | "allWhitelistedTokensLength" - | "approvedRouters" - | "bufferAmounts" - | "buyUSDG" - | "clearTokenConfig" - | "cumulativeFundingRates" - | "decreasePosition" - | "directPoolDeposit" - | "errorController" - | "errors" - | "feeReserves" - | "fundingInterval" - | "fundingRateFactor" - | "getDelta" - | "getEntryFundingRate" - | "getFeeBasisPoints" - | "getFundingFee" - | "getGlobalShortDelta" - | "getMaxPrice" - | "getMinPrice" - | "getNextAveragePrice" - | "getNextFundingRate" - | "getNextGlobalShortAveragePrice" - | "getPosition" - | "getPositionDelta" - | "getPositionFee" - | "getPositionKey" - | "getPositionLeverage" - | "getRedemptionAmount" - | "getRedemptionCollateral" - | "getRedemptionCollateralUsd" - | "getTargetUsdgAmount" - | "getUtilisation" - | "globalShortAveragePrices" - | "globalShortSizes" - | "gov" - | "guaranteedUsd" - | "hasDynamicFees" - | "inManagerMode" - | "inPrivateLiquidationMode" - | "includeAmmPrice" - | "increasePosition" - | "initialize" - | "isInitialized" - | "isLeverageEnabled" - | "isLiquidator" - | "isManager" - | "isSwapEnabled" - | "lastFundingTimes" - | "liquidatePosition" - | "liquidationFeeUsd" - | "marginFeeBasisPoints" - | "maxGasPrice" - | "maxGlobalShortSizes" - | "maxLeverage" - | "maxUsdgAmounts" - | "minProfitBasisPoints" - | "minProfitTime" - | "mintBurnFeeBasisPoints" - | "poolAmounts" - | "positions" - | "priceFeed" - | "removeRouter" - | "reservedAmounts" - | "router" - | "sellUSDG" - | "setBufferAmount" - | "setError" - | "setErrorController" - | "setFees" - | "setFundingRate" - | "setGov" - | "setInManagerMode" - | "setInPrivateLiquidationMode" - | "setIsLeverageEnabled" - | "setIsSwapEnabled" - | "setLiquidator" - | "setManager" - | "setMaxGasPrice" - | "setMaxGlobalShortSize" - | "setMaxLeverage" - | "setPriceFeed" - | "setTokenConfig" - | "setUsdgAmount" - | "setVaultUtils" - | "shortableTokens" - | "stableFundingRateFactor" - | "stableSwapFeeBasisPoints" - | "stableTaxBasisPoints" - | "stableTokens" - | "swap" - | "swapFeeBasisPoints" - | "taxBasisPoints" - | "tokenBalances" - | "tokenDecimals" - | "tokenToUsdMin" - | "tokenWeights" - | "totalTokenWeights" - | "updateCumulativeFundingRate" - | "upgradeVault" - | "usdToToken" - | "usdToTokenMax" - | "usdToTokenMin" - | "usdg" - | "usdgAmounts" - | "useSwapPricing" - | "validateLiquidation" - | "vaultUtils" - | "whitelistedTokenCount" - | "whitelistedTokens" - | "withdrawFees" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: - | "BuyUSDG" - | "ClosePosition" - | "CollectMarginFees" - | "CollectSwapFees" - | "DecreaseGuaranteedUsd" - | "DecreasePoolAmount" - | "DecreasePosition" - | "DecreaseReservedAmount" - | "DecreaseUsdgAmount" - | "DirectPoolDeposit" - | "IncreaseGuaranteedUsd" - | "IncreasePoolAmount" - | "IncreasePosition" - | "IncreaseReservedAmount" - | "IncreaseUsdgAmount" - | "LiquidatePosition" - | "SellUSDG" - | "Swap" - | "UpdateFundingRate" - | "UpdatePnl" - | "UpdatePosition" - ): EventFragment; - - encodeFunctionData(functionFragment: "BASIS_POINTS_DIVISOR", values?: undefined): string; - encodeFunctionData(functionFragment: "FUNDING_RATE_PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "MAX_FEE_BASIS_POINTS", values?: undefined): string; - encodeFunctionData(functionFragment: "MAX_FUNDING_RATE_FACTOR", values?: undefined): string; - encodeFunctionData(functionFragment: "MAX_LIQUIDATION_FEE_USD", values?: undefined): string; - encodeFunctionData(functionFragment: "MIN_FUNDING_RATE_INTERVAL", values?: undefined): string; - encodeFunctionData(functionFragment: "MIN_LEVERAGE", values?: undefined): string; - encodeFunctionData(functionFragment: "PRICE_PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "USDG_DECIMALS", values?: undefined): string; - encodeFunctionData(functionFragment: "addRouter", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "adjustForDecimals", values: [BigNumberish, AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "allWhitelistedTokens", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "allWhitelistedTokensLength", values?: undefined): string; - encodeFunctionData(functionFragment: "approvedRouters", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "bufferAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "buyUSDG", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "clearTokenConfig", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "cumulativeFundingRates", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "decreasePosition", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, BigNumberish, boolean, AddressLike] - ): string; - encodeFunctionData(functionFragment: "directPoolDeposit", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "errorController", values?: undefined): string; - encodeFunctionData(functionFragment: "errors", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "feeReserves", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "fundingInterval", values?: undefined): string; - encodeFunctionData(functionFragment: "fundingRateFactor", values?: undefined): string; - encodeFunctionData( - functionFragment: "getDelta", - values: [AddressLike, BigNumberish, BigNumberish, boolean, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getEntryFundingRate", values: [AddressLike, AddressLike, boolean]): string; - encodeFunctionData( - functionFragment: "getFeeBasisPoints", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, boolean] - ): string; - encodeFunctionData( - functionFragment: "getFundingFee", - values: [AddressLike, AddressLike, AddressLike, boolean, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getGlobalShortDelta", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getMaxPrice", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getMinPrice", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "getNextAveragePrice", - values: [AddressLike, BigNumberish, BigNumberish, boolean, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getNextFundingRate", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "getNextGlobalShortAveragePrice", - values: [AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getPosition", values: [AddressLike, AddressLike, AddressLike, boolean]): string; - encodeFunctionData( - functionFragment: "getPositionDelta", - values: [AddressLike, AddressLike, AddressLike, boolean] - ): string; - encodeFunctionData( - functionFragment: "getPositionFee", - values: [AddressLike, AddressLike, AddressLike, boolean, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPositionKey", - values: [AddressLike, AddressLike, AddressLike, boolean] - ): string; - encodeFunctionData( - functionFragment: "getPositionLeverage", - values: [AddressLike, AddressLike, AddressLike, boolean] - ): string; - encodeFunctionData(functionFragment: "getRedemptionAmount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "getRedemptionCollateral", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getRedemptionCollateralUsd", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getTargetUsdgAmount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getUtilisation", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "globalShortAveragePrices", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "globalShortSizes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "guaranteedUsd", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "hasDynamicFees", values?: undefined): string; - encodeFunctionData(functionFragment: "inManagerMode", values?: undefined): string; - encodeFunctionData(functionFragment: "inPrivateLiquidationMode", values?: undefined): string; - encodeFunctionData(functionFragment: "includeAmmPrice", values?: undefined): string; - encodeFunctionData( - functionFragment: "increasePosition", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, boolean] - ): string; - encodeFunctionData( - functionFragment: "initialize", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; - encodeFunctionData(functionFragment: "isLeverageEnabled", values?: undefined): string; - encodeFunctionData(functionFragment: "isLiquidator", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isManager", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isSwapEnabled", values?: undefined): string; - encodeFunctionData(functionFragment: "lastFundingTimes", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "liquidatePosition", - values: [AddressLike, AddressLike, AddressLike, boolean, AddressLike] - ): string; - encodeFunctionData(functionFragment: "liquidationFeeUsd", values?: undefined): string; - encodeFunctionData(functionFragment: "marginFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "maxGasPrice", values?: undefined): string; - encodeFunctionData(functionFragment: "maxGlobalShortSizes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "maxLeverage", values?: undefined): string; - encodeFunctionData(functionFragment: "maxUsdgAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "minProfitBasisPoints", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "minProfitTime", values?: undefined): string; - encodeFunctionData(functionFragment: "mintBurnFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "poolAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "positions", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "priceFeed", values?: undefined): string; - encodeFunctionData(functionFragment: "removeRouter", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "reservedAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sellUSDG", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "setBufferAmount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setError", values: [BigNumberish, string]): string; - encodeFunctionData(functionFragment: "setErrorController", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "setFees", - values: [ - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - boolean, - ] - ): string; - encodeFunctionData(functionFragment: "setFundingRate", values: [BigNumberish, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setInManagerMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setInPrivateLiquidationMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setIsLeverageEnabled", values: [boolean]): string; - encodeFunctionData(functionFragment: "setIsSwapEnabled", values: [boolean]): string; - encodeFunctionData(functionFragment: "setLiquidator", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setManager", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setMaxGasPrice", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setMaxGlobalShortSize", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setMaxLeverage", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setPriceFeed", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "setTokenConfig", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BigNumberish, boolean, boolean] - ): string; - encodeFunctionData(functionFragment: "setUsdgAmount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setVaultUtils", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "shortableTokens", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "stableFundingRateFactor", values?: undefined): string; - encodeFunctionData(functionFragment: "stableSwapFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "stableTaxBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "stableTokens", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "swap", values: [AddressLike, AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "swapFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "taxBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "tokenBalances", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "tokenDecimals", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "tokenToUsdMin", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "tokenWeights", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "totalTokenWeights", values?: undefined): string; - encodeFunctionData(functionFragment: "updateCumulativeFundingRate", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "upgradeVault", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdToToken", values: [AddressLike, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdToTokenMax", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdToTokenMin", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdg", values?: undefined): string; - encodeFunctionData(functionFragment: "usdgAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "useSwapPricing", values?: undefined): string; - encodeFunctionData( - functionFragment: "validateLiquidation", - values: [AddressLike, AddressLike, AddressLike, boolean, boolean] - ): string; - encodeFunctionData(functionFragment: "vaultUtils", values?: undefined): string; - encodeFunctionData(functionFragment: "whitelistedTokenCount", values?: undefined): string; - encodeFunctionData(functionFragment: "whitelistedTokens", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "withdrawFees", values: [AddressLike, AddressLike]): string; - - decodeFunctionResult(functionFragment: "BASIS_POINTS_DIVISOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "FUNDING_RATE_PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MAX_FEE_BASIS_POINTS", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MAX_FUNDING_RATE_FACTOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MAX_LIQUIDATION_FEE_USD", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MIN_FUNDING_RATE_INTERVAL", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MIN_LEVERAGE", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "PRICE_PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "USDG_DECIMALS", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "adjustForDecimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allWhitelistedTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allWhitelistedTokensLength", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approvedRouters", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "bufferAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "buyUSDG", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "clearTokenConfig", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cumulativeFundingRates", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "directPoolDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "errorController", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "errors", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "feeReserves", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "fundingInterval", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "fundingRateFactor", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getDelta", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getEntryFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFundingFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlobalShortDelta", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMaxPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMinPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getNextAveragePrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getNextFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getNextGlobalShortAveragePrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionDelta", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionKey", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getRedemptionAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getRedemptionCollateral", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getRedemptionCollateralUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTargetUsdgAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getUtilisation", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "globalShortAveragePrices", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "globalShortSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "guaranteedUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasDynamicFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inManagerMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inPrivateLiquidationMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "includeAmmPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isLeverageEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isLiquidator", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isManager", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isSwapEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lastFundingTimes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "liquidatePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "liquidationFeeUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "marginFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxGasPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxGlobalShortSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxUsdgAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minProfitBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minProfitTime", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mintBurnFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "poolAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "positions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "priceFeed", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "reservedAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sellUSDG", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setBufferAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setError", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setErrorController", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInManagerMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInPrivateLiquidationMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIsLeverageEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIsSwapEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setLiquidator", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setManager", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxGasPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxGlobalShortSize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setPriceFeed", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTokenConfig", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setUsdgAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setVaultUtils", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "shortableTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableFundingRateFactor", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableSwapFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableTaxBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "taxBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenBalances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenDecimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenToUsdMin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenWeights", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalTokenWeights", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateCumulativeFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "upgradeVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdToToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdToTokenMax", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdToTokenMin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdg", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdgAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "useSwapPricing", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "validateLiquidation", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vaultUtils", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "whitelistedTokenCount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "whitelistedTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawFees", data: BytesLike): Result; -} - -export namespace BuyUSDGEvent { - export type InputTuple = [ - account: AddressLike, - token: AddressLike, - tokenAmount: BigNumberish, - usdgAmount: BigNumberish, - feeBasisPoints: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - token: string, - tokenAmount: bigint, - usdgAmount: bigint, - feeBasisPoints: bigint, - ]; - export interface OutputObject { - account: string; - token: string; - tokenAmount: bigint; - usdgAmount: bigint; - feeBasisPoints: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace ClosePositionEvent { - export type InputTuple = [ - key: BytesLike, - size: BigNumberish, - collateral: BigNumberish, - averagePrice: BigNumberish, - entryFundingRate: BigNumberish, - reserveAmount: BigNumberish, - realisedPnl: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - size: bigint, - collateral: bigint, - averagePrice: bigint, - entryFundingRate: bigint, - reserveAmount: bigint, - realisedPnl: bigint, - ]; - export interface OutputObject { - key: string; - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CollectMarginFeesEvent { - export type InputTuple = [token: AddressLike, feeUsd: BigNumberish, feeTokens: BigNumberish]; - export type OutputTuple = [token: string, feeUsd: bigint, feeTokens: bigint]; - export interface OutputObject { - token: string; - feeUsd: bigint; - feeTokens: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CollectSwapFeesEvent { - export type InputTuple = [token: AddressLike, feeUsd: BigNumberish, feeTokens: BigNumberish]; - export type OutputTuple = [token: string, feeUsd: bigint, feeTokens: bigint]; - export interface OutputObject { - token: string; - feeUsd: bigint; - feeTokens: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreaseGuaranteedUsdEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreasePoolAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreasePositionEvent { - export type InputTuple = [ - key: BytesLike, - account: AddressLike, - collateralToken: AddressLike, - indexToken: AddressLike, - collateralDelta: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - price: BigNumberish, - fee: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - account: string, - collateralToken: string, - indexToken: string, - collateralDelta: bigint, - sizeDelta: bigint, - isLong: boolean, - price: bigint, - fee: bigint, - ]; - export interface OutputObject { - key: string; - account: string; - collateralToken: string; - indexToken: string; - collateralDelta: bigint; - sizeDelta: bigint; - isLong: boolean; - price: bigint; - fee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreaseReservedAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreaseUsdgAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DirectPoolDepositEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreaseGuaranteedUsdEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreasePoolAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreasePositionEvent { - export type InputTuple = [ - key: BytesLike, - account: AddressLike, - collateralToken: AddressLike, - indexToken: AddressLike, - collateralDelta: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - price: BigNumberish, - fee: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - account: string, - collateralToken: string, - indexToken: string, - collateralDelta: bigint, - sizeDelta: bigint, - isLong: boolean, - price: bigint, - fee: bigint, - ]; - export interface OutputObject { - key: string; - account: string; - collateralToken: string; - indexToken: string; - collateralDelta: bigint; - sizeDelta: bigint; - isLong: boolean; - price: bigint; - fee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreaseReservedAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreaseUsdgAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace LiquidatePositionEvent { - export type InputTuple = [ - key: BytesLike, - account: AddressLike, - collateralToken: AddressLike, - indexToken: AddressLike, - isLong: boolean, - size: BigNumberish, - collateral: BigNumberish, - reserveAmount: BigNumberish, - realisedPnl: BigNumberish, - markPrice: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - account: string, - collateralToken: string, - indexToken: string, - isLong: boolean, - size: bigint, - collateral: bigint, - reserveAmount: bigint, - realisedPnl: bigint, - markPrice: bigint, - ]; - export interface OutputObject { - key: string; - account: string; - collateralToken: string; - indexToken: string; - isLong: boolean; - size: bigint; - collateral: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - markPrice: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SellUSDGEvent { - export type InputTuple = [ - account: AddressLike, - token: AddressLike, - usdgAmount: BigNumberish, - tokenAmount: BigNumberish, - feeBasisPoints: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - token: string, - usdgAmount: bigint, - tokenAmount: bigint, - feeBasisPoints: bigint, - ]; - export interface OutputObject { - account: string; - token: string; - usdgAmount: bigint; - tokenAmount: bigint; - feeBasisPoints: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SwapEvent { - export type InputTuple = [ - account: AddressLike, - tokenIn: AddressLike, - tokenOut: AddressLike, - amountIn: BigNumberish, - amountOut: BigNumberish, - amountOutAfterFees: BigNumberish, - feeBasisPoints: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - tokenIn: string, - tokenOut: string, - amountIn: bigint, - amountOut: bigint, - amountOutAfterFees: bigint, - feeBasisPoints: bigint, - ]; - export interface OutputObject { - account: string; - tokenIn: string; - tokenOut: string; - amountIn: bigint; - amountOut: bigint; - amountOutAfterFees: bigint; - feeBasisPoints: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdateFundingRateEvent { - export type InputTuple = [token: AddressLike, fundingRate: BigNumberish]; - export type OutputTuple = [token: string, fundingRate: bigint]; - export interface OutputObject { - token: string; - fundingRate: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdatePnlEvent { - export type InputTuple = [key: BytesLike, hasProfit: boolean, delta: BigNumberish]; - export type OutputTuple = [key: string, hasProfit: boolean, delta: bigint]; - export interface OutputObject { - key: string; - hasProfit: boolean; - delta: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdatePositionEvent { - export type InputTuple = [ - key: BytesLike, - size: BigNumberish, - collateral: BigNumberish, - averagePrice: BigNumberish, - entryFundingRate: BigNumberish, - reserveAmount: BigNumberish, - realisedPnl: BigNumberish, - markPrice: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - size: bigint, - collateral: bigint, - averagePrice: bigint, - entryFundingRate: bigint, - reserveAmount: bigint, - realisedPnl: bigint, - markPrice: bigint, - ]; - export interface OutputObject { - key: string; - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - markPrice: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface Vault extends BaseContract { - connect(runner?: ContractRunner | null): Vault; - waitForDeployment(): Promise; - - interface: VaultInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - BASIS_POINTS_DIVISOR: TypedContractMethod<[], [bigint], "view">; - - FUNDING_RATE_PRECISION: TypedContractMethod<[], [bigint], "view">; - - MAX_FEE_BASIS_POINTS: TypedContractMethod<[], [bigint], "view">; - - MAX_FUNDING_RATE_FACTOR: TypedContractMethod<[], [bigint], "view">; - - MAX_LIQUIDATION_FEE_USD: TypedContractMethod<[], [bigint], "view">; - - MIN_FUNDING_RATE_INTERVAL: TypedContractMethod<[], [bigint], "view">; - - MIN_LEVERAGE: TypedContractMethod<[], [bigint], "view">; - - PRICE_PRECISION: TypedContractMethod<[], [bigint], "view">; - - USDG_DECIMALS: TypedContractMethod<[], [bigint], "view">; - - addRouter: TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - - adjustForDecimals: TypedContractMethod< - [_amount: BigNumberish, _tokenDiv: AddressLike, _tokenMul: AddressLike], - [bigint], - "view" - >; - - allWhitelistedTokens: TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - allWhitelistedTokensLength: TypedContractMethod<[], [bigint], "view">; - - approvedRouters: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [boolean], "view">; - - bufferAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - buyUSDG: TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - clearTokenConfig: TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - - cumulativeFundingRates: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - decreasePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - - directPoolDeposit: TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - - errorController: TypedContractMethod<[], [string], "view">; - - errors: TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - feeReserves: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - fundingInterval: TypedContractMethod<[], [bigint], "view">; - - fundingRateFactor: TypedContractMethod<[], [bigint], "view">; - - getDelta: TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _lastIncreasedTime: BigNumberish, - ], - [[boolean, bigint]], - "view" - >; - - getEntryFundingRate: TypedContractMethod< - [_collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [bigint], - "view" - >; - - getFeeBasisPoints: TypedContractMethod< - [ - _token: AddressLike, - _usdgDelta: BigNumberish, - _feeBasisPoints: BigNumberish, - _taxBasisPoints: BigNumberish, - _increment: boolean, - ], - [bigint], - "view" - >; - - getFundingFee: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _size: BigNumberish, - _entryFundingRate: BigNumberish, - ], - [bigint], - "view" - >; - - getGlobalShortDelta: TypedContractMethod<[_token: AddressLike], [[boolean, bigint]], "view">; - - getMaxPrice: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getMinPrice: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getNextAveragePrice: TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _nextPrice: BigNumberish, - _sizeDelta: BigNumberish, - _lastIncreasedTime: BigNumberish, - ], - [bigint], - "view" - >; - - getNextFundingRate: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getNextGlobalShortAveragePrice: TypedContractMethod< - [_indexToken: AddressLike, _nextPrice: BigNumberish, _sizeDelta: BigNumberish], - [bigint], - "view" - >; - - getPosition: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[bigint, bigint, bigint, bigint, bigint, bigint, boolean, bigint]], - "view" - >; - - getPositionDelta: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[boolean, bigint]], - "view" - >; - - getPositionFee: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _sizeDelta: BigNumberish, - ], - [bigint], - "view" - >; - - getPositionKey: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [string], - "view" - >; - - getPositionLeverage: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [bigint], - "view" - >; - - getRedemptionAmount: TypedContractMethod<[_token: AddressLike, _usdgAmount: BigNumberish], [bigint], "view">; - - getRedemptionCollateral: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getRedemptionCollateralUsd: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getTargetUsdgAmount: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getUtilisation: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - globalShortAveragePrices: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - globalShortSizes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - guaranteedUsd: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - hasDynamicFees: TypedContractMethod<[], [boolean], "view">; - - inManagerMode: TypedContractMethod<[], [boolean], "view">; - - inPrivateLiquidationMode: TypedContractMethod<[], [boolean], "view">; - - includeAmmPrice: TypedContractMethod<[], [boolean], "view">; - - increasePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _isLong: boolean, - ], - [void], - "nonpayable" - >; - - initialize: TypedContractMethod< - [ - _router: AddressLike, - _usdg: AddressLike, - _priceFeed: AddressLike, - _liquidationFeeUsd: BigNumberish, - _fundingRateFactor: BigNumberish, - _stableFundingRateFactor: BigNumberish, - ], - [void], - "nonpayable" - >; - - isInitialized: TypedContractMethod<[], [boolean], "view">; - - isLeverageEnabled: TypedContractMethod<[], [boolean], "view">; - - isLiquidator: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isManager: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isSwapEnabled: TypedContractMethod<[], [boolean], "view">; - - lastFundingTimes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - liquidatePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _feeReceiver: AddressLike, - ], - [void], - "nonpayable" - >; - - liquidationFeeUsd: TypedContractMethod<[], [bigint], "view">; - - marginFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - maxGasPrice: TypedContractMethod<[], [bigint], "view">; - - maxGlobalShortSizes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - maxLeverage: TypedContractMethod<[], [bigint], "view">; - - maxUsdgAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - minProfitBasisPoints: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - minProfitTime: TypedContractMethod<[], [bigint], "view">; - - mintBurnFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - poolAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - positions: TypedContractMethod< - [arg0: BytesLike], - [ - [bigint, bigint, bigint, bigint, bigint, bigint, bigint] & { - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - lastIncreasedTime: bigint; - }, - ], - "view" - >; - - priceFeed: TypedContractMethod<[], [string], "view">; - - removeRouter: TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - - reservedAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sellUSDG: TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - setBufferAmount: TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - setError: TypedContractMethod<[_errorCode: BigNumberish, _error: string], [void], "nonpayable">; - - setErrorController: TypedContractMethod<[_errorController: AddressLike], [void], "nonpayable">; - - setFees: TypedContractMethod< - [ - _taxBasisPoints: BigNumberish, - _stableTaxBasisPoints: BigNumberish, - _mintBurnFeeBasisPoints: BigNumberish, - _swapFeeBasisPoints: BigNumberish, - _stableSwapFeeBasisPoints: BigNumberish, - _marginFeeBasisPoints: BigNumberish, - _liquidationFeeUsd: BigNumberish, - _minProfitTime: BigNumberish, - _hasDynamicFees: boolean, - ], - [void], - "nonpayable" - >; - - setFundingRate: TypedContractMethod< - [_fundingInterval: BigNumberish, _fundingRateFactor: BigNumberish, _stableFundingRateFactor: BigNumberish], - [void], - "nonpayable" - >; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setInManagerMode: TypedContractMethod<[_inManagerMode: boolean], [void], "nonpayable">; - - setInPrivateLiquidationMode: TypedContractMethod<[_inPrivateLiquidationMode: boolean], [void], "nonpayable">; - - setIsLeverageEnabled: TypedContractMethod<[_isLeverageEnabled: boolean], [void], "nonpayable">; - - setIsSwapEnabled: TypedContractMethod<[_isSwapEnabled: boolean], [void], "nonpayable">; - - setLiquidator: TypedContractMethod<[_liquidator: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setManager: TypedContractMethod<[_manager: AddressLike, _isManager: boolean], [void], "nonpayable">; - - setMaxGasPrice: TypedContractMethod<[_maxGasPrice: BigNumberish], [void], "nonpayable">; - - setMaxGlobalShortSize: TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - setMaxLeverage: TypedContractMethod<[_maxLeverage: BigNumberish], [void], "nonpayable">; - - setPriceFeed: TypedContractMethod<[_priceFeed: AddressLike], [void], "nonpayable">; - - setTokenConfig: TypedContractMethod< - [ - _token: AddressLike, - _tokenDecimals: BigNumberish, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _isStable: boolean, - _isShortable: boolean, - ], - [void], - "nonpayable" - >; - - setUsdgAmount: TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - setVaultUtils: TypedContractMethod<[_vaultUtils: AddressLike], [void], "nonpayable">; - - shortableTokens: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - stableFundingRateFactor: TypedContractMethod<[], [bigint], "view">; - - stableSwapFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - stableTaxBasisPoints: TypedContractMethod<[], [bigint], "view">; - - stableTokens: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - swap: TypedContractMethod< - [_tokenIn: AddressLike, _tokenOut: AddressLike, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - - swapFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - taxBasisPoints: TypedContractMethod<[], [bigint], "view">; - - tokenBalances: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - tokenDecimals: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - tokenToUsdMin: TypedContractMethod<[_token: AddressLike, _tokenAmount: BigNumberish], [bigint], "view">; - - tokenWeights: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - totalTokenWeights: TypedContractMethod<[], [bigint], "view">; - - updateCumulativeFundingRate: TypedContractMethod< - [_collateralToken: AddressLike, _indexToken: AddressLike], - [void], - "nonpayable" - >; - - upgradeVault: TypedContractMethod< - [_newVault: AddressLike, _token: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - usdToToken: TypedContractMethod< - [_token: AddressLike, _usdAmount: BigNumberish, _price: BigNumberish], - [bigint], - "view" - >; - - usdToTokenMax: TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - - usdToTokenMin: TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - - usdg: TypedContractMethod<[], [string], "view">; - - usdgAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - useSwapPricing: TypedContractMethod<[], [boolean], "view">; - - validateLiquidation: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean, _raise: boolean], - [[bigint, bigint]], - "view" - >; - - vaultUtils: TypedContractMethod<[], [string], "view">; - - whitelistedTokenCount: TypedContractMethod<[], [bigint], "view">; - - whitelistedTokens: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - withdrawFees: TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "BASIS_POINTS_DIVISOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "FUNDING_RATE_PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MAX_FEE_BASIS_POINTS"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MAX_FUNDING_RATE_FACTOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MAX_LIQUIDATION_FEE_USD"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MIN_FUNDING_RATE_INTERVAL"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MIN_LEVERAGE"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "PRICE_PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "USDG_DECIMALS"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "addRouter"): TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "adjustForDecimals" - ): TypedContractMethod<[_amount: BigNumberish, _tokenDiv: AddressLike, _tokenMul: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "allWhitelistedTokens"): TypedContractMethod<[arg0: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "allWhitelistedTokensLength"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "approvedRouters" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "bufferAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "buyUSDG" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - getFunction(nameOrSignature: "clearTokenConfig"): TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "cumulativeFundingRates"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "decreasePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - getFunction(nameOrSignature: "directPoolDeposit"): TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "errorController"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "errors"): TypedContractMethod<[arg0: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "feeReserves"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "fundingInterval"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "fundingRateFactor"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "getDelta" - ): TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _lastIncreasedTime: BigNumberish, - ], - [[boolean, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getEntryFundingRate" - ): TypedContractMethod<[_collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], [bigint], "view">; - getFunction( - nameOrSignature: "getFeeBasisPoints" - ): TypedContractMethod< - [ - _token: AddressLike, - _usdgDelta: BigNumberish, - _feeBasisPoints: BigNumberish, - _taxBasisPoints: BigNumberish, - _increment: boolean, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getFundingFee" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _size: BigNumberish, - _entryFundingRate: BigNumberish, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getGlobalShortDelta" - ): TypedContractMethod<[_token: AddressLike], [[boolean, bigint]], "view">; - getFunction(nameOrSignature: "getMaxPrice"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getMinPrice"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getNextAveragePrice" - ): TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _nextPrice: BigNumberish, - _sizeDelta: BigNumberish, - _lastIncreasedTime: BigNumberish, - ], - [bigint], - "view" - >; - getFunction(nameOrSignature: "getNextFundingRate"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getNextGlobalShortAveragePrice" - ): TypedContractMethod< - [_indexToken: AddressLike, _nextPrice: BigNumberish, _sizeDelta: BigNumberish], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getPosition" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[bigint, bigint, bigint, bigint, bigint, bigint, boolean, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getPositionDelta" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[boolean, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getPositionFee" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _sizeDelta: BigNumberish, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getPositionKey" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [string], - "view" - >; - getFunction( - nameOrSignature: "getPositionLeverage" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getRedemptionAmount" - ): TypedContractMethod<[_token: AddressLike, _usdgAmount: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "getRedemptionCollateral"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getRedemptionCollateralUsd" - ): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getTargetUsdgAmount"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getUtilisation"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "globalShortAveragePrices"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "globalShortSizes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "guaranteedUsd"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "hasDynamicFees"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "inManagerMode"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "inPrivateLiquidationMode"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "includeAmmPrice"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "increasePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _isLong: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "initialize" - ): TypedContractMethod< - [ - _router: AddressLike, - _usdg: AddressLike, - _priceFeed: AddressLike, - _liquidationFeeUsd: BigNumberish, - _fundingRateFactor: BigNumberish, - _stableFundingRateFactor: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "isInitialized"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isLeverageEnabled"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isLiquidator"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isManager"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isSwapEnabled"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "lastFundingTimes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "liquidatePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _feeReceiver: AddressLike, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "liquidationFeeUsd"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "marginFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxGasPrice"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxGlobalShortSizes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "maxLeverage"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxUsdgAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "minProfitBasisPoints"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "minProfitTime"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "mintBurnFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "poolAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "positions"): TypedContractMethod< - [arg0: BytesLike], - [ - [bigint, bigint, bigint, bigint, bigint, bigint, bigint] & { - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - lastIncreasedTime: bigint; - }, - ], - "view" - >; - getFunction(nameOrSignature: "priceFeed"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "removeRouter"): TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "reservedAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sellUSDG" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "setBufferAmount" - ): TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setError" - ): TypedContractMethod<[_errorCode: BigNumberish, _error: string], [void], "nonpayable">; - getFunction( - nameOrSignature: "setErrorController" - ): TypedContractMethod<[_errorController: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setFees" - ): TypedContractMethod< - [ - _taxBasisPoints: BigNumberish, - _stableTaxBasisPoints: BigNumberish, - _mintBurnFeeBasisPoints: BigNumberish, - _swapFeeBasisPoints: BigNumberish, - _stableSwapFeeBasisPoints: BigNumberish, - _marginFeeBasisPoints: BigNumberish, - _liquidationFeeUsd: BigNumberish, - _minProfitTime: BigNumberish, - _hasDynamicFees: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setFundingRate" - ): TypedContractMethod< - [_fundingInterval: BigNumberish, _fundingRateFactor: BigNumberish, _stableFundingRateFactor: BigNumberish], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInManagerMode" - ): TypedContractMethod<[_inManagerMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInPrivateLiquidationMode" - ): TypedContractMethod<[_inPrivateLiquidationMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setIsLeverageEnabled" - ): TypedContractMethod<[_isLeverageEnabled: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setIsSwapEnabled" - ): TypedContractMethod<[_isSwapEnabled: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setLiquidator" - ): TypedContractMethod<[_liquidator: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setManager" - ): TypedContractMethod<[_manager: AddressLike, _isManager: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxGasPrice" - ): TypedContractMethod<[_maxGasPrice: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxGlobalShortSize" - ): TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxLeverage" - ): TypedContractMethod<[_maxLeverage: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "setPriceFeed"): TypedContractMethod<[_priceFeed: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setTokenConfig" - ): TypedContractMethod< - [ - _token: AddressLike, - _tokenDecimals: BigNumberish, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _isStable: boolean, - _isShortable: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setUsdgAmount" - ): TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "setVaultUtils"): TypedContractMethod<[_vaultUtils: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "shortableTokens"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "stableFundingRateFactor"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "stableSwapFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "stableTaxBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "stableTokens"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "swap" - ): TypedContractMethod< - [_tokenIn: AddressLike, _tokenOut: AddressLike, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - getFunction(nameOrSignature: "swapFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "taxBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "tokenBalances"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "tokenDecimals"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "tokenToUsdMin" - ): TypedContractMethod<[_token: AddressLike, _tokenAmount: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "tokenWeights"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "totalTokenWeights"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "updateCumulativeFundingRate" - ): TypedContractMethod<[_collateralToken: AddressLike, _indexToken: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "upgradeVault" - ): TypedContractMethod<[_newVault: AddressLike, _token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "usdToToken" - ): TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish, _price: BigNumberish], [bigint], "view">; - getFunction( - nameOrSignature: "usdToTokenMax" - ): TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - getFunction( - nameOrSignature: "usdToTokenMin" - ): TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "usdg"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "usdgAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "useSwapPricing"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "validateLiquidation" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean, _raise: boolean], - [[bigint, bigint]], - "view" - >; - getFunction(nameOrSignature: "vaultUtils"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "whitelistedTokenCount"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "whitelistedTokens"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "withdrawFees" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - getEvent( - key: "BuyUSDG" - ): TypedContractEvent; - getEvent( - key: "ClosePosition" - ): TypedContractEvent; - getEvent( - key: "CollectMarginFees" - ): TypedContractEvent< - CollectMarginFeesEvent.InputTuple, - CollectMarginFeesEvent.OutputTuple, - CollectMarginFeesEvent.OutputObject - >; - getEvent( - key: "CollectSwapFees" - ): TypedContractEvent< - CollectSwapFeesEvent.InputTuple, - CollectSwapFeesEvent.OutputTuple, - CollectSwapFeesEvent.OutputObject - >; - getEvent( - key: "DecreaseGuaranteedUsd" - ): TypedContractEvent< - DecreaseGuaranteedUsdEvent.InputTuple, - DecreaseGuaranteedUsdEvent.OutputTuple, - DecreaseGuaranteedUsdEvent.OutputObject - >; - getEvent( - key: "DecreasePoolAmount" - ): TypedContractEvent< - DecreasePoolAmountEvent.InputTuple, - DecreasePoolAmountEvent.OutputTuple, - DecreasePoolAmountEvent.OutputObject - >; - getEvent( - key: "DecreasePosition" - ): TypedContractEvent< - DecreasePositionEvent.InputTuple, - DecreasePositionEvent.OutputTuple, - DecreasePositionEvent.OutputObject - >; - getEvent( - key: "DecreaseReservedAmount" - ): TypedContractEvent< - DecreaseReservedAmountEvent.InputTuple, - DecreaseReservedAmountEvent.OutputTuple, - DecreaseReservedAmountEvent.OutputObject - >; - getEvent( - key: "DecreaseUsdgAmount" - ): TypedContractEvent< - DecreaseUsdgAmountEvent.InputTuple, - DecreaseUsdgAmountEvent.OutputTuple, - DecreaseUsdgAmountEvent.OutputObject - >; - getEvent( - key: "DirectPoolDeposit" - ): TypedContractEvent< - DirectPoolDepositEvent.InputTuple, - DirectPoolDepositEvent.OutputTuple, - DirectPoolDepositEvent.OutputObject - >; - getEvent( - key: "IncreaseGuaranteedUsd" - ): TypedContractEvent< - IncreaseGuaranteedUsdEvent.InputTuple, - IncreaseGuaranteedUsdEvent.OutputTuple, - IncreaseGuaranteedUsdEvent.OutputObject - >; - getEvent( - key: "IncreasePoolAmount" - ): TypedContractEvent< - IncreasePoolAmountEvent.InputTuple, - IncreasePoolAmountEvent.OutputTuple, - IncreasePoolAmountEvent.OutputObject - >; - getEvent( - key: "IncreasePosition" - ): TypedContractEvent< - IncreasePositionEvent.InputTuple, - IncreasePositionEvent.OutputTuple, - IncreasePositionEvent.OutputObject - >; - getEvent( - key: "IncreaseReservedAmount" - ): TypedContractEvent< - IncreaseReservedAmountEvent.InputTuple, - IncreaseReservedAmountEvent.OutputTuple, - IncreaseReservedAmountEvent.OutputObject - >; - getEvent( - key: "IncreaseUsdgAmount" - ): TypedContractEvent< - IncreaseUsdgAmountEvent.InputTuple, - IncreaseUsdgAmountEvent.OutputTuple, - IncreaseUsdgAmountEvent.OutputObject - >; - getEvent( - key: "LiquidatePosition" - ): TypedContractEvent< - LiquidatePositionEvent.InputTuple, - LiquidatePositionEvent.OutputTuple, - LiquidatePositionEvent.OutputObject - >; - getEvent( - key: "SellUSDG" - ): TypedContractEvent; - getEvent(key: "Swap"): TypedContractEvent; - getEvent( - key: "UpdateFundingRate" - ): TypedContractEvent< - UpdateFundingRateEvent.InputTuple, - UpdateFundingRateEvent.OutputTuple, - UpdateFundingRateEvent.OutputObject - >; - getEvent( - key: "UpdatePnl" - ): TypedContractEvent; - getEvent( - key: "UpdatePosition" - ): TypedContractEvent< - UpdatePositionEvent.InputTuple, - UpdatePositionEvent.OutputTuple, - UpdatePositionEvent.OutputObject - >; - - filters: { - "BuyUSDG(address,address,uint256,uint256,uint256)": TypedContractEvent< - BuyUSDGEvent.InputTuple, - BuyUSDGEvent.OutputTuple, - BuyUSDGEvent.OutputObject - >; - BuyUSDG: TypedContractEvent; - - "ClosePosition(bytes32,uint256,uint256,uint256,uint256,uint256,int256)": TypedContractEvent< - ClosePositionEvent.InputTuple, - ClosePositionEvent.OutputTuple, - ClosePositionEvent.OutputObject - >; - ClosePosition: TypedContractEvent< - ClosePositionEvent.InputTuple, - ClosePositionEvent.OutputTuple, - ClosePositionEvent.OutputObject - >; - - "CollectMarginFees(address,uint256,uint256)": TypedContractEvent< - CollectMarginFeesEvent.InputTuple, - CollectMarginFeesEvent.OutputTuple, - CollectMarginFeesEvent.OutputObject - >; - CollectMarginFees: TypedContractEvent< - CollectMarginFeesEvent.InputTuple, - CollectMarginFeesEvent.OutputTuple, - CollectMarginFeesEvent.OutputObject - >; - - "CollectSwapFees(address,uint256,uint256)": TypedContractEvent< - CollectSwapFeesEvent.InputTuple, - CollectSwapFeesEvent.OutputTuple, - CollectSwapFeesEvent.OutputObject - >; - CollectSwapFees: TypedContractEvent< - CollectSwapFeesEvent.InputTuple, - CollectSwapFeesEvent.OutputTuple, - CollectSwapFeesEvent.OutputObject - >; - - "DecreaseGuaranteedUsd(address,uint256)": TypedContractEvent< - DecreaseGuaranteedUsdEvent.InputTuple, - DecreaseGuaranteedUsdEvent.OutputTuple, - DecreaseGuaranteedUsdEvent.OutputObject - >; - DecreaseGuaranteedUsd: TypedContractEvent< - DecreaseGuaranteedUsdEvent.InputTuple, - DecreaseGuaranteedUsdEvent.OutputTuple, - DecreaseGuaranteedUsdEvent.OutputObject - >; - - "DecreasePoolAmount(address,uint256)": TypedContractEvent< - DecreasePoolAmountEvent.InputTuple, - DecreasePoolAmountEvent.OutputTuple, - DecreasePoolAmountEvent.OutputObject - >; - DecreasePoolAmount: TypedContractEvent< - DecreasePoolAmountEvent.InputTuple, - DecreasePoolAmountEvent.OutputTuple, - DecreasePoolAmountEvent.OutputObject - >; - - "DecreasePosition(bytes32,address,address,address,uint256,uint256,bool,uint256,uint256)": TypedContractEvent< - DecreasePositionEvent.InputTuple, - DecreasePositionEvent.OutputTuple, - DecreasePositionEvent.OutputObject - >; - DecreasePosition: TypedContractEvent< - DecreasePositionEvent.InputTuple, - DecreasePositionEvent.OutputTuple, - DecreasePositionEvent.OutputObject - >; - - "DecreaseReservedAmount(address,uint256)": TypedContractEvent< - DecreaseReservedAmountEvent.InputTuple, - DecreaseReservedAmountEvent.OutputTuple, - DecreaseReservedAmountEvent.OutputObject - >; - DecreaseReservedAmount: TypedContractEvent< - DecreaseReservedAmountEvent.InputTuple, - DecreaseReservedAmountEvent.OutputTuple, - DecreaseReservedAmountEvent.OutputObject - >; - - "DecreaseUsdgAmount(address,uint256)": TypedContractEvent< - DecreaseUsdgAmountEvent.InputTuple, - DecreaseUsdgAmountEvent.OutputTuple, - DecreaseUsdgAmountEvent.OutputObject - >; - DecreaseUsdgAmount: TypedContractEvent< - DecreaseUsdgAmountEvent.InputTuple, - DecreaseUsdgAmountEvent.OutputTuple, - DecreaseUsdgAmountEvent.OutputObject - >; - - "DirectPoolDeposit(address,uint256)": TypedContractEvent< - DirectPoolDepositEvent.InputTuple, - DirectPoolDepositEvent.OutputTuple, - DirectPoolDepositEvent.OutputObject - >; - DirectPoolDeposit: TypedContractEvent< - DirectPoolDepositEvent.InputTuple, - DirectPoolDepositEvent.OutputTuple, - DirectPoolDepositEvent.OutputObject - >; - - "IncreaseGuaranteedUsd(address,uint256)": TypedContractEvent< - IncreaseGuaranteedUsdEvent.InputTuple, - IncreaseGuaranteedUsdEvent.OutputTuple, - IncreaseGuaranteedUsdEvent.OutputObject - >; - IncreaseGuaranteedUsd: TypedContractEvent< - IncreaseGuaranteedUsdEvent.InputTuple, - IncreaseGuaranteedUsdEvent.OutputTuple, - IncreaseGuaranteedUsdEvent.OutputObject - >; - - "IncreasePoolAmount(address,uint256)": TypedContractEvent< - IncreasePoolAmountEvent.InputTuple, - IncreasePoolAmountEvent.OutputTuple, - IncreasePoolAmountEvent.OutputObject - >; - IncreasePoolAmount: TypedContractEvent< - IncreasePoolAmountEvent.InputTuple, - IncreasePoolAmountEvent.OutputTuple, - IncreasePoolAmountEvent.OutputObject - >; - - "IncreasePosition(bytes32,address,address,address,uint256,uint256,bool,uint256,uint256)": TypedContractEvent< - IncreasePositionEvent.InputTuple, - IncreasePositionEvent.OutputTuple, - IncreasePositionEvent.OutputObject - >; - IncreasePosition: TypedContractEvent< - IncreasePositionEvent.InputTuple, - IncreasePositionEvent.OutputTuple, - IncreasePositionEvent.OutputObject - >; - - "IncreaseReservedAmount(address,uint256)": TypedContractEvent< - IncreaseReservedAmountEvent.InputTuple, - IncreaseReservedAmountEvent.OutputTuple, - IncreaseReservedAmountEvent.OutputObject - >; - IncreaseReservedAmount: TypedContractEvent< - IncreaseReservedAmountEvent.InputTuple, - IncreaseReservedAmountEvent.OutputTuple, - IncreaseReservedAmountEvent.OutputObject - >; - - "IncreaseUsdgAmount(address,uint256)": TypedContractEvent< - IncreaseUsdgAmountEvent.InputTuple, - IncreaseUsdgAmountEvent.OutputTuple, - IncreaseUsdgAmountEvent.OutputObject - >; - IncreaseUsdgAmount: TypedContractEvent< - IncreaseUsdgAmountEvent.InputTuple, - IncreaseUsdgAmountEvent.OutputTuple, - IncreaseUsdgAmountEvent.OutputObject - >; - - "LiquidatePosition(bytes32,address,address,address,bool,uint256,uint256,uint256,int256,uint256)": TypedContractEvent< - LiquidatePositionEvent.InputTuple, - LiquidatePositionEvent.OutputTuple, - LiquidatePositionEvent.OutputObject - >; - LiquidatePosition: TypedContractEvent< - LiquidatePositionEvent.InputTuple, - LiquidatePositionEvent.OutputTuple, - LiquidatePositionEvent.OutputObject - >; - - "SellUSDG(address,address,uint256,uint256,uint256)": TypedContractEvent< - SellUSDGEvent.InputTuple, - SellUSDGEvent.OutputTuple, - SellUSDGEvent.OutputObject - >; - SellUSDG: TypedContractEvent; - - "Swap(address,address,address,uint256,uint256,uint256,uint256)": TypedContractEvent< - SwapEvent.InputTuple, - SwapEvent.OutputTuple, - SwapEvent.OutputObject - >; - Swap: TypedContractEvent; - - "UpdateFundingRate(address,uint256)": TypedContractEvent< - UpdateFundingRateEvent.InputTuple, - UpdateFundingRateEvent.OutputTuple, - UpdateFundingRateEvent.OutputObject - >; - UpdateFundingRate: TypedContractEvent< - UpdateFundingRateEvent.InputTuple, - UpdateFundingRateEvent.OutputTuple, - UpdateFundingRateEvent.OutputObject - >; - - "UpdatePnl(bytes32,bool,uint256)": TypedContractEvent< - UpdatePnlEvent.InputTuple, - UpdatePnlEvent.OutputTuple, - UpdatePnlEvent.OutputObject - >; - UpdatePnl: TypedContractEvent; - - "UpdatePosition(bytes32,uint256,uint256,uint256,uint256,uint256,int256,uint256)": TypedContractEvent< - UpdatePositionEvent.InputTuple, - UpdatePositionEvent.OutputTuple, - UpdatePositionEvent.OutputObject - >; - UpdatePosition: TypedContractEvent< - UpdatePositionEvent.InputTuple, - UpdatePositionEvent.OutputTuple, - UpdatePositionEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/VaultReader.ts b/src/typechain-types/VaultReader.ts deleted file mode 100644 index 859775191d..0000000000 --- a/src/typechain-types/VaultReader.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface VaultReaderInterface extends Interface { - getFunction(nameOrSignature: "getVaultTokenInfoV3" | "getVaultTokenInfoV4"): FunctionFragment; - - encodeFunctionData( - functionFragment: "getVaultTokenInfoV3", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, AddressLike[]] - ): string; - encodeFunctionData( - functionFragment: "getVaultTokenInfoV4", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, AddressLike[]] - ): string; - - decodeFunctionResult(functionFragment: "getVaultTokenInfoV3", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getVaultTokenInfoV4", data: BytesLike): Result; -} - -export interface VaultReader extends BaseContract { - connect(runner?: ContractRunner | null): VaultReader; - waitForDeployment(): Promise; - - interface: VaultReaderInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - getVaultTokenInfoV3: TypedContractMethod< - [ - _vault: AddressLike, - _positionManager: AddressLike, - _weth: AddressLike, - _usdgAmount: BigNumberish, - _tokens: AddressLike[], - ], - [bigint[]], - "view" - >; - - getVaultTokenInfoV4: TypedContractMethod< - [ - _vault: AddressLike, - _positionManager: AddressLike, - _weth: AddressLike, - _usdgAmount: BigNumberish, - _tokens: AddressLike[], - ], - [bigint[]], - "view" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "getVaultTokenInfoV3" - ): TypedContractMethod< - [ - _vault: AddressLike, - _positionManager: AddressLike, - _weth: AddressLike, - _usdgAmount: BigNumberish, - _tokens: AddressLike[], - ], - [bigint[]], - "view" - >; - getFunction( - nameOrSignature: "getVaultTokenInfoV4" - ): TypedContractMethod< - [ - _vault: AddressLike, - _positionManager: AddressLike, - _weth: AddressLike, - _usdgAmount: BigNumberish, - _tokens: AddressLike[], - ], - [bigint[]], - "view" - >; - - filters: {}; -} diff --git a/src/typechain-types/VaultV2.ts b/src/typechain-types/VaultV2.ts deleted file mode 100644 index 2eb9b34248..0000000000 --- a/src/typechain-types/VaultV2.ts +++ /dev/null @@ -1,2020 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface VaultV2Interface extends Interface { - getFunction( - nameOrSignature: - | "BASIS_POINTS_DIVISOR" - | "FUNDING_RATE_PRECISION" - | "MAX_FEE_BASIS_POINTS" - | "MAX_FUNDING_RATE_FACTOR" - | "MAX_LIQUIDATION_FEE_USD" - | "MIN_FUNDING_RATE_INTERVAL" - | "MIN_LEVERAGE" - | "PRICE_PRECISION" - | "USDG_DECIMALS" - | "addRouter" - | "adjustForDecimals" - | "allWhitelistedTokens" - | "allWhitelistedTokensLength" - | "approvedRouters" - | "bufferAmounts" - | "buyUSDG" - | "clearTokenConfig" - | "cumulativeFundingRates" - | "decreasePosition" - | "directPoolDeposit" - | "feeReserves" - | "fundingInterval" - | "fundingRateFactor" - | "getDelta" - | "getFeeBasisPoints" - | "getFundingFee" - | "getGlobalShortDelta" - | "getMaxPrice" - | "getMinPrice" - | "getNextAveragePrice" - | "getNextFundingRate" - | "getNextGlobalShortAveragePrice" - | "getPosition" - | "getPositionDelta" - | "getPositionFee" - | "getPositionKey" - | "getPositionLeverage" - | "getRedemptionAmount" - | "getRedemptionCollateral" - | "getRedemptionCollateralUsd" - | "getTargetUsdgAmount" - | "getUtilisation" - | "globalShortAveragePrices" - | "globalShortSizes" - | "gov" - | "guaranteedUsd" - | "hasDynamicFees" - | "inManagerMode" - | "inPrivateLiquidationMode" - | "includeAmmPrice" - | "increasePosition" - | "initialize" - | "isInitialized" - | "isLeverageEnabled" - | "isLiquidator" - | "isManager" - | "isSwapEnabled" - | "lastFundingTimes" - | "liquidatePosition" - | "liquidationFeeUsd" - | "marginFeeBasisPoints" - | "maxGasPrice" - | "maxLeverage" - | "maxUsdgAmounts" - | "minProfitBasisPoints" - | "minProfitTime" - | "mintBurnFeeBasisPoints" - | "poolAmounts" - | "positions" - | "priceFeed" - | "removeRouter" - | "reservedAmounts" - | "router" - | "sellUSDG" - | "setBufferAmount" - | "setFees" - | "setFundingRate" - | "setGov" - | "setInManagerMode" - | "setInPrivateLiquidationMode" - | "setIsLeverageEnabled" - | "setIsSwapEnabled" - | "setLiquidator" - | "setManager" - | "setMaxGasPrice" - | "setMaxLeverage" - | "setPriceFeed" - | "setTokenConfig" - | "setUsdgAmount" - | "shortableTokens" - | "stableFundingRateFactor" - | "stableSwapFeeBasisPoints" - | "stableTaxBasisPoints" - | "stableTokens" - | "swap" - | "swapFeeBasisPoints" - | "taxBasisPoints" - | "tokenBalances" - | "tokenDecimals" - | "tokenToUsdMin" - | "tokenWeights" - | "totalTokenWeights" - | "updateCumulativeFundingRate" - | "upgradeVault" - | "usdToToken" - | "usdToTokenMax" - | "usdToTokenMin" - | "usdg" - | "usdgAmounts" - | "useSwapPricing" - | "validateLiquidation" - | "whitelistedTokenCount" - | "whitelistedTokens" - | "withdrawFees" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: - | "BuyUSDG" - | "ClosePosition" - | "CollectMarginFees" - | "CollectSwapFees" - | "DecreaseGuaranteedUsd" - | "DecreasePoolAmount" - | "DecreasePosition" - | "DecreaseReservedAmount" - | "DecreaseUsdgAmount" - | "DirectPoolDeposit" - | "IncreaseGuaranteedUsd" - | "IncreasePoolAmount" - | "IncreasePosition" - | "IncreaseReservedAmount" - | "IncreaseUsdgAmount" - | "LiquidatePosition" - | "SellUSDG" - | "Swap" - | "UpdateFundingRate" - | "UpdatePnl" - | "UpdatePosition" - ): EventFragment; - - encodeFunctionData(functionFragment: "BASIS_POINTS_DIVISOR", values?: undefined): string; - encodeFunctionData(functionFragment: "FUNDING_RATE_PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "MAX_FEE_BASIS_POINTS", values?: undefined): string; - encodeFunctionData(functionFragment: "MAX_FUNDING_RATE_FACTOR", values?: undefined): string; - encodeFunctionData(functionFragment: "MAX_LIQUIDATION_FEE_USD", values?: undefined): string; - encodeFunctionData(functionFragment: "MIN_FUNDING_RATE_INTERVAL", values?: undefined): string; - encodeFunctionData(functionFragment: "MIN_LEVERAGE", values?: undefined): string; - encodeFunctionData(functionFragment: "PRICE_PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "USDG_DECIMALS", values?: undefined): string; - encodeFunctionData(functionFragment: "addRouter", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "adjustForDecimals", values: [BigNumberish, AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "allWhitelistedTokens", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "allWhitelistedTokensLength", values?: undefined): string; - encodeFunctionData(functionFragment: "approvedRouters", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "bufferAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "buyUSDG", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "clearTokenConfig", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "cumulativeFundingRates", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "decreasePosition", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, BigNumberish, boolean, AddressLike] - ): string; - encodeFunctionData(functionFragment: "directPoolDeposit", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "feeReserves", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "fundingInterval", values?: undefined): string; - encodeFunctionData(functionFragment: "fundingRateFactor", values?: undefined): string; - encodeFunctionData( - functionFragment: "getDelta", - values: [AddressLike, BigNumberish, BigNumberish, boolean, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getFeeBasisPoints", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, boolean] - ): string; - encodeFunctionData(functionFragment: "getFundingFee", values: [AddressLike, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "getGlobalShortDelta", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getMaxPrice", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getMinPrice", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "getNextAveragePrice", - values: [AddressLike, BigNumberish, BigNumberish, boolean, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getNextFundingRate", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "getNextGlobalShortAveragePrice", - values: [AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getPosition", values: [AddressLike, AddressLike, AddressLike, boolean]): string; - encodeFunctionData( - functionFragment: "getPositionDelta", - values: [AddressLike, AddressLike, AddressLike, boolean] - ): string; - encodeFunctionData(functionFragment: "getPositionFee", values: [BigNumberish]): string; - encodeFunctionData( - functionFragment: "getPositionKey", - values: [AddressLike, AddressLike, AddressLike, boolean] - ): string; - encodeFunctionData( - functionFragment: "getPositionLeverage", - values: [AddressLike, AddressLike, AddressLike, boolean] - ): string; - encodeFunctionData(functionFragment: "getRedemptionAmount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "getRedemptionCollateral", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getRedemptionCollateralUsd", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getTargetUsdgAmount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getUtilisation", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "globalShortAveragePrices", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "globalShortSizes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "guaranteedUsd", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "hasDynamicFees", values?: undefined): string; - encodeFunctionData(functionFragment: "inManagerMode", values?: undefined): string; - encodeFunctionData(functionFragment: "inPrivateLiquidationMode", values?: undefined): string; - encodeFunctionData(functionFragment: "includeAmmPrice", values?: undefined): string; - encodeFunctionData( - functionFragment: "increasePosition", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, boolean] - ): string; - encodeFunctionData( - functionFragment: "initialize", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; - encodeFunctionData(functionFragment: "isLeverageEnabled", values?: undefined): string; - encodeFunctionData(functionFragment: "isLiquidator", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isManager", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isSwapEnabled", values?: undefined): string; - encodeFunctionData(functionFragment: "lastFundingTimes", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "liquidatePosition", - values: [AddressLike, AddressLike, AddressLike, boolean, AddressLike] - ): string; - encodeFunctionData(functionFragment: "liquidationFeeUsd", values?: undefined): string; - encodeFunctionData(functionFragment: "marginFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "maxGasPrice", values?: undefined): string; - encodeFunctionData(functionFragment: "maxLeverage", values?: undefined): string; - encodeFunctionData(functionFragment: "maxUsdgAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "minProfitBasisPoints", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "minProfitTime", values?: undefined): string; - encodeFunctionData(functionFragment: "mintBurnFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "poolAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "positions", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "priceFeed", values?: undefined): string; - encodeFunctionData(functionFragment: "removeRouter", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "reservedAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sellUSDG", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "setBufferAmount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData( - functionFragment: "setFees", - values: [ - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - boolean, - ] - ): string; - encodeFunctionData(functionFragment: "setFundingRate", values: [BigNumberish, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setInManagerMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setInPrivateLiquidationMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setIsLeverageEnabled", values: [boolean]): string; - encodeFunctionData(functionFragment: "setIsSwapEnabled", values: [boolean]): string; - encodeFunctionData(functionFragment: "setLiquidator", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setManager", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setMaxGasPrice", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setMaxLeverage", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setPriceFeed", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "setTokenConfig", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BigNumberish, boolean, boolean] - ): string; - encodeFunctionData(functionFragment: "setUsdgAmount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "shortableTokens", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "stableFundingRateFactor", values?: undefined): string; - encodeFunctionData(functionFragment: "stableSwapFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "stableTaxBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "stableTokens", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "swap", values: [AddressLike, AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "swapFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "taxBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "tokenBalances", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "tokenDecimals", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "tokenToUsdMin", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "tokenWeights", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "totalTokenWeights", values?: undefined): string; - encodeFunctionData(functionFragment: "updateCumulativeFundingRate", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "upgradeVault", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdToToken", values: [AddressLike, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdToTokenMax", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdToTokenMin", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdg", values?: undefined): string; - encodeFunctionData(functionFragment: "usdgAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "useSwapPricing", values?: undefined): string; - encodeFunctionData( - functionFragment: "validateLiquidation", - values: [AddressLike, AddressLike, AddressLike, boolean, boolean] - ): string; - encodeFunctionData(functionFragment: "whitelistedTokenCount", values?: undefined): string; - encodeFunctionData(functionFragment: "whitelistedTokens", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "withdrawFees", values: [AddressLike, AddressLike]): string; - - decodeFunctionResult(functionFragment: "BASIS_POINTS_DIVISOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "FUNDING_RATE_PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MAX_FEE_BASIS_POINTS", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MAX_FUNDING_RATE_FACTOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MAX_LIQUIDATION_FEE_USD", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MIN_FUNDING_RATE_INTERVAL", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MIN_LEVERAGE", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "PRICE_PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "USDG_DECIMALS", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "adjustForDecimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allWhitelistedTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allWhitelistedTokensLength", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approvedRouters", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "bufferAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "buyUSDG", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "clearTokenConfig", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cumulativeFundingRates", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "directPoolDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "feeReserves", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "fundingInterval", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "fundingRateFactor", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getDelta", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFundingFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlobalShortDelta", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMaxPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMinPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getNextAveragePrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getNextFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getNextGlobalShortAveragePrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionDelta", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionKey", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getRedemptionAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getRedemptionCollateral", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getRedemptionCollateralUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTargetUsdgAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getUtilisation", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "globalShortAveragePrices", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "globalShortSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "guaranteedUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasDynamicFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inManagerMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inPrivateLiquidationMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "includeAmmPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isLeverageEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isLiquidator", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isManager", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isSwapEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lastFundingTimes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "liquidatePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "liquidationFeeUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "marginFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxGasPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxUsdgAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minProfitBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minProfitTime", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mintBurnFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "poolAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "positions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "priceFeed", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "reservedAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sellUSDG", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setBufferAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInManagerMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInPrivateLiquidationMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIsLeverageEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIsSwapEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setLiquidator", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setManager", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxGasPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setPriceFeed", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTokenConfig", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setUsdgAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "shortableTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableFundingRateFactor", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableSwapFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableTaxBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "taxBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenBalances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenDecimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenToUsdMin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenWeights", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalTokenWeights", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateCumulativeFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "upgradeVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdToToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdToTokenMax", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdToTokenMin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdg", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdgAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "useSwapPricing", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "validateLiquidation", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "whitelistedTokenCount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "whitelistedTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawFees", data: BytesLike): Result; -} - -export namespace BuyUSDGEvent { - export type InputTuple = [ - account: AddressLike, - token: AddressLike, - tokenAmount: BigNumberish, - usdgAmount: BigNumberish, - feeBasisPoints: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - token: string, - tokenAmount: bigint, - usdgAmount: bigint, - feeBasisPoints: bigint, - ]; - export interface OutputObject { - account: string; - token: string; - tokenAmount: bigint; - usdgAmount: bigint; - feeBasisPoints: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace ClosePositionEvent { - export type InputTuple = [ - key: BytesLike, - size: BigNumberish, - collateral: BigNumberish, - averagePrice: BigNumberish, - entryFundingRate: BigNumberish, - reserveAmount: BigNumberish, - realisedPnl: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - size: bigint, - collateral: bigint, - averagePrice: bigint, - entryFundingRate: bigint, - reserveAmount: bigint, - realisedPnl: bigint, - ]; - export interface OutputObject { - key: string; - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CollectMarginFeesEvent { - export type InputTuple = [token: AddressLike, feeUsd: BigNumberish, feeTokens: BigNumberish]; - export type OutputTuple = [token: string, feeUsd: bigint, feeTokens: bigint]; - export interface OutputObject { - token: string; - feeUsd: bigint; - feeTokens: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CollectSwapFeesEvent { - export type InputTuple = [token: AddressLike, feeUsd: BigNumberish, feeTokens: BigNumberish]; - export type OutputTuple = [token: string, feeUsd: bigint, feeTokens: bigint]; - export interface OutputObject { - token: string; - feeUsd: bigint; - feeTokens: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreaseGuaranteedUsdEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreasePoolAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreasePositionEvent { - export type InputTuple = [ - key: BytesLike, - account: AddressLike, - collateralToken: AddressLike, - indexToken: AddressLike, - collateralDelta: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - price: BigNumberish, - fee: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - account: string, - collateralToken: string, - indexToken: string, - collateralDelta: bigint, - sizeDelta: bigint, - isLong: boolean, - price: bigint, - fee: bigint, - ]; - export interface OutputObject { - key: string; - account: string; - collateralToken: string; - indexToken: string; - collateralDelta: bigint; - sizeDelta: bigint; - isLong: boolean; - price: bigint; - fee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreaseReservedAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreaseUsdgAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DirectPoolDepositEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreaseGuaranteedUsdEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreasePoolAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreasePositionEvent { - export type InputTuple = [ - key: BytesLike, - account: AddressLike, - collateralToken: AddressLike, - indexToken: AddressLike, - collateralDelta: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - price: BigNumberish, - fee: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - account: string, - collateralToken: string, - indexToken: string, - collateralDelta: bigint, - sizeDelta: bigint, - isLong: boolean, - price: bigint, - fee: bigint, - ]; - export interface OutputObject { - key: string; - account: string; - collateralToken: string; - indexToken: string; - collateralDelta: bigint; - sizeDelta: bigint; - isLong: boolean; - price: bigint; - fee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreaseReservedAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreaseUsdgAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace LiquidatePositionEvent { - export type InputTuple = [ - key: BytesLike, - account: AddressLike, - collateralToken: AddressLike, - indexToken: AddressLike, - isLong: boolean, - size: BigNumberish, - collateral: BigNumberish, - reserveAmount: BigNumberish, - realisedPnl: BigNumberish, - markPrice: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - account: string, - collateralToken: string, - indexToken: string, - isLong: boolean, - size: bigint, - collateral: bigint, - reserveAmount: bigint, - realisedPnl: bigint, - markPrice: bigint, - ]; - export interface OutputObject { - key: string; - account: string; - collateralToken: string; - indexToken: string; - isLong: boolean; - size: bigint; - collateral: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - markPrice: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SellUSDGEvent { - export type InputTuple = [ - account: AddressLike, - token: AddressLike, - usdgAmount: BigNumberish, - tokenAmount: BigNumberish, - feeBasisPoints: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - token: string, - usdgAmount: bigint, - tokenAmount: bigint, - feeBasisPoints: bigint, - ]; - export interface OutputObject { - account: string; - token: string; - usdgAmount: bigint; - tokenAmount: bigint; - feeBasisPoints: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SwapEvent { - export type InputTuple = [ - account: AddressLike, - tokenIn: AddressLike, - tokenOut: AddressLike, - amountIn: BigNumberish, - amountOut: BigNumberish, - amountOutAfterFees: BigNumberish, - feeBasisPoints: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - tokenIn: string, - tokenOut: string, - amountIn: bigint, - amountOut: bigint, - amountOutAfterFees: bigint, - feeBasisPoints: bigint, - ]; - export interface OutputObject { - account: string; - tokenIn: string; - tokenOut: string; - amountIn: bigint; - amountOut: bigint; - amountOutAfterFees: bigint; - feeBasisPoints: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdateFundingRateEvent { - export type InputTuple = [token: AddressLike, fundingRate: BigNumberish]; - export type OutputTuple = [token: string, fundingRate: bigint]; - export interface OutputObject { - token: string; - fundingRate: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdatePnlEvent { - export type InputTuple = [key: BytesLike, hasProfit: boolean, delta: BigNumberish]; - export type OutputTuple = [key: string, hasProfit: boolean, delta: bigint]; - export interface OutputObject { - key: string; - hasProfit: boolean; - delta: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdatePositionEvent { - export type InputTuple = [ - key: BytesLike, - size: BigNumberish, - collateral: BigNumberish, - averagePrice: BigNumberish, - entryFundingRate: BigNumberish, - reserveAmount: BigNumberish, - realisedPnl: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - size: bigint, - collateral: bigint, - averagePrice: bigint, - entryFundingRate: bigint, - reserveAmount: bigint, - realisedPnl: bigint, - ]; - export interface OutputObject { - key: string; - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface VaultV2 extends BaseContract { - connect(runner?: ContractRunner | null): VaultV2; - waitForDeployment(): Promise; - - interface: VaultV2Interface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - BASIS_POINTS_DIVISOR: TypedContractMethod<[], [bigint], "view">; - - FUNDING_RATE_PRECISION: TypedContractMethod<[], [bigint], "view">; - - MAX_FEE_BASIS_POINTS: TypedContractMethod<[], [bigint], "view">; - - MAX_FUNDING_RATE_FACTOR: TypedContractMethod<[], [bigint], "view">; - - MAX_LIQUIDATION_FEE_USD: TypedContractMethod<[], [bigint], "view">; - - MIN_FUNDING_RATE_INTERVAL: TypedContractMethod<[], [bigint], "view">; - - MIN_LEVERAGE: TypedContractMethod<[], [bigint], "view">; - - PRICE_PRECISION: TypedContractMethod<[], [bigint], "view">; - - USDG_DECIMALS: TypedContractMethod<[], [bigint], "view">; - - addRouter: TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - - adjustForDecimals: TypedContractMethod< - [_amount: BigNumberish, _tokenDiv: AddressLike, _tokenMul: AddressLike], - [bigint], - "view" - >; - - allWhitelistedTokens: TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - allWhitelistedTokensLength: TypedContractMethod<[], [bigint], "view">; - - approvedRouters: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [boolean], "view">; - - bufferAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - buyUSDG: TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - clearTokenConfig: TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - - cumulativeFundingRates: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - decreasePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - - directPoolDeposit: TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - - feeReserves: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - fundingInterval: TypedContractMethod<[], [bigint], "view">; - - fundingRateFactor: TypedContractMethod<[], [bigint], "view">; - - getDelta: TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _lastIncreasedTime: BigNumberish, - ], - [[boolean, bigint]], - "view" - >; - - getFeeBasisPoints: TypedContractMethod< - [ - _token: AddressLike, - _usdgDelta: BigNumberish, - _feeBasisPoints: BigNumberish, - _taxBasisPoints: BigNumberish, - _increment: boolean, - ], - [bigint], - "view" - >; - - getFundingFee: TypedContractMethod< - [_token: AddressLike, _size: BigNumberish, _entryFundingRate: BigNumberish], - [bigint], - "view" - >; - - getGlobalShortDelta: TypedContractMethod<[_token: AddressLike], [[boolean, bigint]], "view">; - - getMaxPrice: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getMinPrice: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getNextAveragePrice: TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _nextPrice: BigNumberish, - _sizeDelta: BigNumberish, - _lastIncreasedTime: BigNumberish, - ], - [bigint], - "view" - >; - - getNextFundingRate: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getNextGlobalShortAveragePrice: TypedContractMethod< - [_indexToken: AddressLike, _nextPrice: BigNumberish, _sizeDelta: BigNumberish], - [bigint], - "view" - >; - - getPosition: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[bigint, bigint, bigint, bigint, bigint, bigint, boolean, bigint]], - "view" - >; - - getPositionDelta: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[boolean, bigint]], - "view" - >; - - getPositionFee: TypedContractMethod<[_sizeDelta: BigNumberish], [bigint], "view">; - - getPositionKey: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [string], - "view" - >; - - getPositionLeverage: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [bigint], - "view" - >; - - getRedemptionAmount: TypedContractMethod<[_token: AddressLike, _usdgAmount: BigNumberish], [bigint], "view">; - - getRedemptionCollateral: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getRedemptionCollateralUsd: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getTargetUsdgAmount: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getUtilisation: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - globalShortAveragePrices: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - globalShortSizes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - guaranteedUsd: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - hasDynamicFees: TypedContractMethod<[], [boolean], "view">; - - inManagerMode: TypedContractMethod<[], [boolean], "view">; - - inPrivateLiquidationMode: TypedContractMethod<[], [boolean], "view">; - - includeAmmPrice: TypedContractMethod<[], [boolean], "view">; - - increasePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _isLong: boolean, - ], - [void], - "nonpayable" - >; - - initialize: TypedContractMethod< - [ - _router: AddressLike, - _usdg: AddressLike, - _priceFeed: AddressLike, - _liquidationFeeUsd: BigNumberish, - _fundingRateFactor: BigNumberish, - _stableFundingRateFactor: BigNumberish, - ], - [void], - "nonpayable" - >; - - isInitialized: TypedContractMethod<[], [boolean], "view">; - - isLeverageEnabled: TypedContractMethod<[], [boolean], "view">; - - isLiquidator: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isManager: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isSwapEnabled: TypedContractMethod<[], [boolean], "view">; - - lastFundingTimes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - liquidatePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _feeReceiver: AddressLike, - ], - [void], - "nonpayable" - >; - - liquidationFeeUsd: TypedContractMethod<[], [bigint], "view">; - - marginFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - maxGasPrice: TypedContractMethod<[], [bigint], "view">; - - maxLeverage: TypedContractMethod<[], [bigint], "view">; - - maxUsdgAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - minProfitBasisPoints: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - minProfitTime: TypedContractMethod<[], [bigint], "view">; - - mintBurnFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - poolAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - positions: TypedContractMethod< - [arg0: BytesLike], - [ - [bigint, bigint, bigint, bigint, bigint, bigint, bigint] & { - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - lastIncreasedTime: bigint; - }, - ], - "view" - >; - - priceFeed: TypedContractMethod<[], [string], "view">; - - removeRouter: TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - - reservedAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sellUSDG: TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - setBufferAmount: TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - setFees: TypedContractMethod< - [ - _taxBasisPoints: BigNumberish, - _stableTaxBasisPoints: BigNumberish, - _mintBurnFeeBasisPoints: BigNumberish, - _swapFeeBasisPoints: BigNumberish, - _stableSwapFeeBasisPoints: BigNumberish, - _marginFeeBasisPoints: BigNumberish, - _liquidationFeeUsd: BigNumberish, - _minProfitTime: BigNumberish, - _hasDynamicFees: boolean, - ], - [void], - "nonpayable" - >; - - setFundingRate: TypedContractMethod< - [_fundingInterval: BigNumberish, _fundingRateFactor: BigNumberish, _stableFundingRateFactor: BigNumberish], - [void], - "nonpayable" - >; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setInManagerMode: TypedContractMethod<[_inManagerMode: boolean], [void], "nonpayable">; - - setInPrivateLiquidationMode: TypedContractMethod<[_inPrivateLiquidationMode: boolean], [void], "nonpayable">; - - setIsLeverageEnabled: TypedContractMethod<[_isLeverageEnabled: boolean], [void], "nonpayable">; - - setIsSwapEnabled: TypedContractMethod<[_isSwapEnabled: boolean], [void], "nonpayable">; - - setLiquidator: TypedContractMethod<[_liquidator: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setManager: TypedContractMethod<[_manager: AddressLike, _isManager: boolean], [void], "nonpayable">; - - setMaxGasPrice: TypedContractMethod<[_maxGasPrice: BigNumberish], [void], "nonpayable">; - - setMaxLeverage: TypedContractMethod<[_maxLeverage: BigNumberish], [void], "nonpayable">; - - setPriceFeed: TypedContractMethod<[_priceFeed: AddressLike], [void], "nonpayable">; - - setTokenConfig: TypedContractMethod< - [ - _token: AddressLike, - _tokenDecimals: BigNumberish, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _isStable: boolean, - _isShortable: boolean, - ], - [void], - "nonpayable" - >; - - setUsdgAmount: TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - shortableTokens: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - stableFundingRateFactor: TypedContractMethod<[], [bigint], "view">; - - stableSwapFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - stableTaxBasisPoints: TypedContractMethod<[], [bigint], "view">; - - stableTokens: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - swap: TypedContractMethod< - [_tokenIn: AddressLike, _tokenOut: AddressLike, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - - swapFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - taxBasisPoints: TypedContractMethod<[], [bigint], "view">; - - tokenBalances: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - tokenDecimals: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - tokenToUsdMin: TypedContractMethod<[_token: AddressLike, _tokenAmount: BigNumberish], [bigint], "view">; - - tokenWeights: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - totalTokenWeights: TypedContractMethod<[], [bigint], "view">; - - updateCumulativeFundingRate: TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - - upgradeVault: TypedContractMethod< - [_newVault: AddressLike, _token: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - usdToToken: TypedContractMethod< - [_token: AddressLike, _usdAmount: BigNumberish, _price: BigNumberish], - [bigint], - "view" - >; - - usdToTokenMax: TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - - usdToTokenMin: TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - - usdg: TypedContractMethod<[], [string], "view">; - - usdgAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - useSwapPricing: TypedContractMethod<[], [boolean], "view">; - - validateLiquidation: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean, _raise: boolean], - [[bigint, bigint]], - "view" - >; - - whitelistedTokenCount: TypedContractMethod<[], [bigint], "view">; - - whitelistedTokens: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - withdrawFees: TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "BASIS_POINTS_DIVISOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "FUNDING_RATE_PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MAX_FEE_BASIS_POINTS"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MAX_FUNDING_RATE_FACTOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MAX_LIQUIDATION_FEE_USD"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MIN_FUNDING_RATE_INTERVAL"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MIN_LEVERAGE"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "PRICE_PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "USDG_DECIMALS"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "addRouter"): TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "adjustForDecimals" - ): TypedContractMethod<[_amount: BigNumberish, _tokenDiv: AddressLike, _tokenMul: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "allWhitelistedTokens"): TypedContractMethod<[arg0: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "allWhitelistedTokensLength"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "approvedRouters" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "bufferAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "buyUSDG" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - getFunction(nameOrSignature: "clearTokenConfig"): TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "cumulativeFundingRates"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "decreasePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - getFunction(nameOrSignature: "directPoolDeposit"): TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "feeReserves"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "fundingInterval"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "fundingRateFactor"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "getDelta" - ): TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _lastIncreasedTime: BigNumberish, - ], - [[boolean, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getFeeBasisPoints" - ): TypedContractMethod< - [ - _token: AddressLike, - _usdgDelta: BigNumberish, - _feeBasisPoints: BigNumberish, - _taxBasisPoints: BigNumberish, - _increment: boolean, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getFundingFee" - ): TypedContractMethod<[_token: AddressLike, _size: BigNumberish, _entryFundingRate: BigNumberish], [bigint], "view">; - getFunction( - nameOrSignature: "getGlobalShortDelta" - ): TypedContractMethod<[_token: AddressLike], [[boolean, bigint]], "view">; - getFunction(nameOrSignature: "getMaxPrice"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getMinPrice"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getNextAveragePrice" - ): TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _nextPrice: BigNumberish, - _sizeDelta: BigNumberish, - _lastIncreasedTime: BigNumberish, - ], - [bigint], - "view" - >; - getFunction(nameOrSignature: "getNextFundingRate"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getNextGlobalShortAveragePrice" - ): TypedContractMethod< - [_indexToken: AddressLike, _nextPrice: BigNumberish, _sizeDelta: BigNumberish], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getPosition" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[bigint, bigint, bigint, bigint, bigint, bigint, boolean, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getPositionDelta" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[boolean, bigint]], - "view" - >; - getFunction(nameOrSignature: "getPositionFee"): TypedContractMethod<[_sizeDelta: BigNumberish], [bigint], "view">; - getFunction( - nameOrSignature: "getPositionKey" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [string], - "view" - >; - getFunction( - nameOrSignature: "getPositionLeverage" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getRedemptionAmount" - ): TypedContractMethod<[_token: AddressLike, _usdgAmount: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "getRedemptionCollateral"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getRedemptionCollateralUsd" - ): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getTargetUsdgAmount"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getUtilisation"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "globalShortAveragePrices"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "globalShortSizes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "guaranteedUsd"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "hasDynamicFees"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "inManagerMode"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "inPrivateLiquidationMode"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "includeAmmPrice"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "increasePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _isLong: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "initialize" - ): TypedContractMethod< - [ - _router: AddressLike, - _usdg: AddressLike, - _priceFeed: AddressLike, - _liquidationFeeUsd: BigNumberish, - _fundingRateFactor: BigNumberish, - _stableFundingRateFactor: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "isInitialized"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isLeverageEnabled"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isLiquidator"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isManager"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isSwapEnabled"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "lastFundingTimes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "liquidatePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _feeReceiver: AddressLike, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "liquidationFeeUsd"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "marginFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxGasPrice"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxLeverage"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxUsdgAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "minProfitBasisPoints"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "minProfitTime"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "mintBurnFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "poolAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "positions"): TypedContractMethod< - [arg0: BytesLike], - [ - [bigint, bigint, bigint, bigint, bigint, bigint, bigint] & { - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - lastIncreasedTime: bigint; - }, - ], - "view" - >; - getFunction(nameOrSignature: "priceFeed"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "removeRouter"): TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "reservedAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sellUSDG" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "setBufferAmount" - ): TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setFees" - ): TypedContractMethod< - [ - _taxBasisPoints: BigNumberish, - _stableTaxBasisPoints: BigNumberish, - _mintBurnFeeBasisPoints: BigNumberish, - _swapFeeBasisPoints: BigNumberish, - _stableSwapFeeBasisPoints: BigNumberish, - _marginFeeBasisPoints: BigNumberish, - _liquidationFeeUsd: BigNumberish, - _minProfitTime: BigNumberish, - _hasDynamicFees: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setFundingRate" - ): TypedContractMethod< - [_fundingInterval: BigNumberish, _fundingRateFactor: BigNumberish, _stableFundingRateFactor: BigNumberish], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInManagerMode" - ): TypedContractMethod<[_inManagerMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInPrivateLiquidationMode" - ): TypedContractMethod<[_inPrivateLiquidationMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setIsLeverageEnabled" - ): TypedContractMethod<[_isLeverageEnabled: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setIsSwapEnabled" - ): TypedContractMethod<[_isSwapEnabled: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setLiquidator" - ): TypedContractMethod<[_liquidator: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setManager" - ): TypedContractMethod<[_manager: AddressLike, _isManager: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxGasPrice" - ): TypedContractMethod<[_maxGasPrice: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxLeverage" - ): TypedContractMethod<[_maxLeverage: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "setPriceFeed"): TypedContractMethod<[_priceFeed: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setTokenConfig" - ): TypedContractMethod< - [ - _token: AddressLike, - _tokenDecimals: BigNumberish, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _isStable: boolean, - _isShortable: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setUsdgAmount" - ): TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "shortableTokens"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "stableFundingRateFactor"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "stableSwapFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "stableTaxBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "stableTokens"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "swap" - ): TypedContractMethod< - [_tokenIn: AddressLike, _tokenOut: AddressLike, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - getFunction(nameOrSignature: "swapFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "taxBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "tokenBalances"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "tokenDecimals"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "tokenToUsdMin" - ): TypedContractMethod<[_token: AddressLike, _tokenAmount: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "tokenWeights"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "totalTokenWeights"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "updateCumulativeFundingRate" - ): TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "upgradeVault" - ): TypedContractMethod<[_newVault: AddressLike, _token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "usdToToken" - ): TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish, _price: BigNumberish], [bigint], "view">; - getFunction( - nameOrSignature: "usdToTokenMax" - ): TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - getFunction( - nameOrSignature: "usdToTokenMin" - ): TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "usdg"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "usdgAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "useSwapPricing"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "validateLiquidation" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean, _raise: boolean], - [[bigint, bigint]], - "view" - >; - getFunction(nameOrSignature: "whitelistedTokenCount"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "whitelistedTokens"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "withdrawFees" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - getEvent( - key: "BuyUSDG" - ): TypedContractEvent; - getEvent( - key: "ClosePosition" - ): TypedContractEvent; - getEvent( - key: "CollectMarginFees" - ): TypedContractEvent< - CollectMarginFeesEvent.InputTuple, - CollectMarginFeesEvent.OutputTuple, - CollectMarginFeesEvent.OutputObject - >; - getEvent( - key: "CollectSwapFees" - ): TypedContractEvent< - CollectSwapFeesEvent.InputTuple, - CollectSwapFeesEvent.OutputTuple, - CollectSwapFeesEvent.OutputObject - >; - getEvent( - key: "DecreaseGuaranteedUsd" - ): TypedContractEvent< - DecreaseGuaranteedUsdEvent.InputTuple, - DecreaseGuaranteedUsdEvent.OutputTuple, - DecreaseGuaranteedUsdEvent.OutputObject - >; - getEvent( - key: "DecreasePoolAmount" - ): TypedContractEvent< - DecreasePoolAmountEvent.InputTuple, - DecreasePoolAmountEvent.OutputTuple, - DecreasePoolAmountEvent.OutputObject - >; - getEvent( - key: "DecreasePosition" - ): TypedContractEvent< - DecreasePositionEvent.InputTuple, - DecreasePositionEvent.OutputTuple, - DecreasePositionEvent.OutputObject - >; - getEvent( - key: "DecreaseReservedAmount" - ): TypedContractEvent< - DecreaseReservedAmountEvent.InputTuple, - DecreaseReservedAmountEvent.OutputTuple, - DecreaseReservedAmountEvent.OutputObject - >; - getEvent( - key: "DecreaseUsdgAmount" - ): TypedContractEvent< - DecreaseUsdgAmountEvent.InputTuple, - DecreaseUsdgAmountEvent.OutputTuple, - DecreaseUsdgAmountEvent.OutputObject - >; - getEvent( - key: "DirectPoolDeposit" - ): TypedContractEvent< - DirectPoolDepositEvent.InputTuple, - DirectPoolDepositEvent.OutputTuple, - DirectPoolDepositEvent.OutputObject - >; - getEvent( - key: "IncreaseGuaranteedUsd" - ): TypedContractEvent< - IncreaseGuaranteedUsdEvent.InputTuple, - IncreaseGuaranteedUsdEvent.OutputTuple, - IncreaseGuaranteedUsdEvent.OutputObject - >; - getEvent( - key: "IncreasePoolAmount" - ): TypedContractEvent< - IncreasePoolAmountEvent.InputTuple, - IncreasePoolAmountEvent.OutputTuple, - IncreasePoolAmountEvent.OutputObject - >; - getEvent( - key: "IncreasePosition" - ): TypedContractEvent< - IncreasePositionEvent.InputTuple, - IncreasePositionEvent.OutputTuple, - IncreasePositionEvent.OutputObject - >; - getEvent( - key: "IncreaseReservedAmount" - ): TypedContractEvent< - IncreaseReservedAmountEvent.InputTuple, - IncreaseReservedAmountEvent.OutputTuple, - IncreaseReservedAmountEvent.OutputObject - >; - getEvent( - key: "IncreaseUsdgAmount" - ): TypedContractEvent< - IncreaseUsdgAmountEvent.InputTuple, - IncreaseUsdgAmountEvent.OutputTuple, - IncreaseUsdgAmountEvent.OutputObject - >; - getEvent( - key: "LiquidatePosition" - ): TypedContractEvent< - LiquidatePositionEvent.InputTuple, - LiquidatePositionEvent.OutputTuple, - LiquidatePositionEvent.OutputObject - >; - getEvent( - key: "SellUSDG" - ): TypedContractEvent; - getEvent(key: "Swap"): TypedContractEvent; - getEvent( - key: "UpdateFundingRate" - ): TypedContractEvent< - UpdateFundingRateEvent.InputTuple, - UpdateFundingRateEvent.OutputTuple, - UpdateFundingRateEvent.OutputObject - >; - getEvent( - key: "UpdatePnl" - ): TypedContractEvent; - getEvent( - key: "UpdatePosition" - ): TypedContractEvent< - UpdatePositionEvent.InputTuple, - UpdatePositionEvent.OutputTuple, - UpdatePositionEvent.OutputObject - >; - - filters: { - "BuyUSDG(address,address,uint256,uint256,uint256)": TypedContractEvent< - BuyUSDGEvent.InputTuple, - BuyUSDGEvent.OutputTuple, - BuyUSDGEvent.OutputObject - >; - BuyUSDG: TypedContractEvent; - - "ClosePosition(bytes32,uint256,uint256,uint256,uint256,uint256,int256)": TypedContractEvent< - ClosePositionEvent.InputTuple, - ClosePositionEvent.OutputTuple, - ClosePositionEvent.OutputObject - >; - ClosePosition: TypedContractEvent< - ClosePositionEvent.InputTuple, - ClosePositionEvent.OutputTuple, - ClosePositionEvent.OutputObject - >; - - "CollectMarginFees(address,uint256,uint256)": TypedContractEvent< - CollectMarginFeesEvent.InputTuple, - CollectMarginFeesEvent.OutputTuple, - CollectMarginFeesEvent.OutputObject - >; - CollectMarginFees: TypedContractEvent< - CollectMarginFeesEvent.InputTuple, - CollectMarginFeesEvent.OutputTuple, - CollectMarginFeesEvent.OutputObject - >; - - "CollectSwapFees(address,uint256,uint256)": TypedContractEvent< - CollectSwapFeesEvent.InputTuple, - CollectSwapFeesEvent.OutputTuple, - CollectSwapFeesEvent.OutputObject - >; - CollectSwapFees: TypedContractEvent< - CollectSwapFeesEvent.InputTuple, - CollectSwapFeesEvent.OutputTuple, - CollectSwapFeesEvent.OutputObject - >; - - "DecreaseGuaranteedUsd(address,uint256)": TypedContractEvent< - DecreaseGuaranteedUsdEvent.InputTuple, - DecreaseGuaranteedUsdEvent.OutputTuple, - DecreaseGuaranteedUsdEvent.OutputObject - >; - DecreaseGuaranteedUsd: TypedContractEvent< - DecreaseGuaranteedUsdEvent.InputTuple, - DecreaseGuaranteedUsdEvent.OutputTuple, - DecreaseGuaranteedUsdEvent.OutputObject - >; - - "DecreasePoolAmount(address,uint256)": TypedContractEvent< - DecreasePoolAmountEvent.InputTuple, - DecreasePoolAmountEvent.OutputTuple, - DecreasePoolAmountEvent.OutputObject - >; - DecreasePoolAmount: TypedContractEvent< - DecreasePoolAmountEvent.InputTuple, - DecreasePoolAmountEvent.OutputTuple, - DecreasePoolAmountEvent.OutputObject - >; - - "DecreasePosition(bytes32,address,address,address,uint256,uint256,bool,uint256,uint256)": TypedContractEvent< - DecreasePositionEvent.InputTuple, - DecreasePositionEvent.OutputTuple, - DecreasePositionEvent.OutputObject - >; - DecreasePosition: TypedContractEvent< - DecreasePositionEvent.InputTuple, - DecreasePositionEvent.OutputTuple, - DecreasePositionEvent.OutputObject - >; - - "DecreaseReservedAmount(address,uint256)": TypedContractEvent< - DecreaseReservedAmountEvent.InputTuple, - DecreaseReservedAmountEvent.OutputTuple, - DecreaseReservedAmountEvent.OutputObject - >; - DecreaseReservedAmount: TypedContractEvent< - DecreaseReservedAmountEvent.InputTuple, - DecreaseReservedAmountEvent.OutputTuple, - DecreaseReservedAmountEvent.OutputObject - >; - - "DecreaseUsdgAmount(address,uint256)": TypedContractEvent< - DecreaseUsdgAmountEvent.InputTuple, - DecreaseUsdgAmountEvent.OutputTuple, - DecreaseUsdgAmountEvent.OutputObject - >; - DecreaseUsdgAmount: TypedContractEvent< - DecreaseUsdgAmountEvent.InputTuple, - DecreaseUsdgAmountEvent.OutputTuple, - DecreaseUsdgAmountEvent.OutputObject - >; - - "DirectPoolDeposit(address,uint256)": TypedContractEvent< - DirectPoolDepositEvent.InputTuple, - DirectPoolDepositEvent.OutputTuple, - DirectPoolDepositEvent.OutputObject - >; - DirectPoolDeposit: TypedContractEvent< - DirectPoolDepositEvent.InputTuple, - DirectPoolDepositEvent.OutputTuple, - DirectPoolDepositEvent.OutputObject - >; - - "IncreaseGuaranteedUsd(address,uint256)": TypedContractEvent< - IncreaseGuaranteedUsdEvent.InputTuple, - IncreaseGuaranteedUsdEvent.OutputTuple, - IncreaseGuaranteedUsdEvent.OutputObject - >; - IncreaseGuaranteedUsd: TypedContractEvent< - IncreaseGuaranteedUsdEvent.InputTuple, - IncreaseGuaranteedUsdEvent.OutputTuple, - IncreaseGuaranteedUsdEvent.OutputObject - >; - - "IncreasePoolAmount(address,uint256)": TypedContractEvent< - IncreasePoolAmountEvent.InputTuple, - IncreasePoolAmountEvent.OutputTuple, - IncreasePoolAmountEvent.OutputObject - >; - IncreasePoolAmount: TypedContractEvent< - IncreasePoolAmountEvent.InputTuple, - IncreasePoolAmountEvent.OutputTuple, - IncreasePoolAmountEvent.OutputObject - >; - - "IncreasePosition(bytes32,address,address,address,uint256,uint256,bool,uint256,uint256)": TypedContractEvent< - IncreasePositionEvent.InputTuple, - IncreasePositionEvent.OutputTuple, - IncreasePositionEvent.OutputObject - >; - IncreasePosition: TypedContractEvent< - IncreasePositionEvent.InputTuple, - IncreasePositionEvent.OutputTuple, - IncreasePositionEvent.OutputObject - >; - - "IncreaseReservedAmount(address,uint256)": TypedContractEvent< - IncreaseReservedAmountEvent.InputTuple, - IncreaseReservedAmountEvent.OutputTuple, - IncreaseReservedAmountEvent.OutputObject - >; - IncreaseReservedAmount: TypedContractEvent< - IncreaseReservedAmountEvent.InputTuple, - IncreaseReservedAmountEvent.OutputTuple, - IncreaseReservedAmountEvent.OutputObject - >; - - "IncreaseUsdgAmount(address,uint256)": TypedContractEvent< - IncreaseUsdgAmountEvent.InputTuple, - IncreaseUsdgAmountEvent.OutputTuple, - IncreaseUsdgAmountEvent.OutputObject - >; - IncreaseUsdgAmount: TypedContractEvent< - IncreaseUsdgAmountEvent.InputTuple, - IncreaseUsdgAmountEvent.OutputTuple, - IncreaseUsdgAmountEvent.OutputObject - >; - - "LiquidatePosition(bytes32,address,address,address,bool,uint256,uint256,uint256,int256,uint256)": TypedContractEvent< - LiquidatePositionEvent.InputTuple, - LiquidatePositionEvent.OutputTuple, - LiquidatePositionEvent.OutputObject - >; - LiquidatePosition: TypedContractEvent< - LiquidatePositionEvent.InputTuple, - LiquidatePositionEvent.OutputTuple, - LiquidatePositionEvent.OutputObject - >; - - "SellUSDG(address,address,uint256,uint256,uint256)": TypedContractEvent< - SellUSDGEvent.InputTuple, - SellUSDGEvent.OutputTuple, - SellUSDGEvent.OutputObject - >; - SellUSDG: TypedContractEvent; - - "Swap(address,address,address,uint256,uint256,uint256,uint256)": TypedContractEvent< - SwapEvent.InputTuple, - SwapEvent.OutputTuple, - SwapEvent.OutputObject - >; - Swap: TypedContractEvent; - - "UpdateFundingRate(address,uint256)": TypedContractEvent< - UpdateFundingRateEvent.InputTuple, - UpdateFundingRateEvent.OutputTuple, - UpdateFundingRateEvent.OutputObject - >; - UpdateFundingRate: TypedContractEvent< - UpdateFundingRateEvent.InputTuple, - UpdateFundingRateEvent.OutputTuple, - UpdateFundingRateEvent.OutputObject - >; - - "UpdatePnl(bytes32,bool,uint256)": TypedContractEvent< - UpdatePnlEvent.InputTuple, - UpdatePnlEvent.OutputTuple, - UpdatePnlEvent.OutputObject - >; - UpdatePnl: TypedContractEvent; - - "UpdatePosition(bytes32,uint256,uint256,uint256,uint256,uint256,int256)": TypedContractEvent< - UpdatePositionEvent.InputTuple, - UpdatePositionEvent.OutputTuple, - UpdatePositionEvent.OutputObject - >; - UpdatePosition: TypedContractEvent< - UpdatePositionEvent.InputTuple, - UpdatePositionEvent.OutputTuple, - UpdatePositionEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/VaultV2b.ts b/src/typechain-types/VaultV2b.ts deleted file mode 100644 index a693bb90d5..0000000000 --- a/src/typechain-types/VaultV2b.ts +++ /dev/null @@ -1,2139 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface VaultV2bInterface extends Interface { - getFunction( - nameOrSignature: - | "BASIS_POINTS_DIVISOR" - | "FUNDING_RATE_PRECISION" - | "MAX_FEE_BASIS_POINTS" - | "MAX_FUNDING_RATE_FACTOR" - | "MAX_LIQUIDATION_FEE_USD" - | "MIN_FUNDING_RATE_INTERVAL" - | "MIN_LEVERAGE" - | "PRICE_PRECISION" - | "USDG_DECIMALS" - | "addRouter" - | "adjustForDecimals" - | "allWhitelistedTokens" - | "allWhitelistedTokensLength" - | "approvedRouters" - | "bufferAmounts" - | "buyUSDG" - | "clearTokenConfig" - | "cumulativeFundingRates" - | "decreasePosition" - | "directPoolDeposit" - | "errorController" - | "errors" - | "feeReserves" - | "fundingInterval" - | "fundingRateFactor" - | "getDelta" - | "getEntryFundingRate" - | "getFeeBasisPoints" - | "getFundingFee" - | "getGlobalShortDelta" - | "getMaxPrice" - | "getMinPrice" - | "getNextAveragePrice" - | "getNextFundingRate" - | "getNextGlobalShortAveragePrice" - | "getPosition" - | "getPositionDelta" - | "getPositionFee" - | "getPositionKey" - | "getPositionLeverage" - | "getRedemptionAmount" - | "getRedemptionCollateral" - | "getRedemptionCollateralUsd" - | "getTargetUsdgAmount" - | "getUtilisation" - | "globalShortAveragePrices" - | "globalShortSizes" - | "gov" - | "guaranteedUsd" - | "hasDynamicFees" - | "inManagerMode" - | "inPrivateLiquidationMode" - | "includeAmmPrice" - | "increasePosition" - | "initialize" - | "isInitialized" - | "isLeverageEnabled" - | "isLiquidator" - | "isManager" - | "isSwapEnabled" - | "lastFundingTimes" - | "liquidatePosition" - | "liquidationFeeUsd" - | "marginFeeBasisPoints" - | "maxGasPrice" - | "maxGlobalShortSizes" - | "maxLeverage" - | "maxUsdgAmounts" - | "minProfitBasisPoints" - | "minProfitTime" - | "mintBurnFeeBasisPoints" - | "poolAmounts" - | "positions" - | "priceFeed" - | "removeRouter" - | "reservedAmounts" - | "router" - | "sellUSDG" - | "setBufferAmount" - | "setError" - | "setErrorController" - | "setFees" - | "setFundingRate" - | "setGov" - | "setInManagerMode" - | "setInPrivateLiquidationMode" - | "setIsLeverageEnabled" - | "setIsSwapEnabled" - | "setLiquidator" - | "setManager" - | "setMaxGasPrice" - | "setMaxGlobalShortSize" - | "setMaxLeverage" - | "setPriceFeed" - | "setTokenConfig" - | "setUsdgAmount" - | "setVaultUtils" - | "shortableTokens" - | "stableFundingRateFactor" - | "stableSwapFeeBasisPoints" - | "stableTaxBasisPoints" - | "stableTokens" - | "swap" - | "swapFeeBasisPoints" - | "taxBasisPoints" - | "tokenBalances" - | "tokenDecimals" - | "tokenToUsdMin" - | "tokenWeights" - | "totalTokenWeights" - | "updateCumulativeFundingRate" - | "upgradeVault" - | "usdToToken" - | "usdToTokenMax" - | "usdToTokenMin" - | "usdg" - | "usdgAmounts" - | "useSwapPricing" - | "validateLiquidation" - | "vaultUtils" - | "whitelistedTokenCount" - | "whitelistedTokens" - | "withdrawFees" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: - | "BuyUSDG" - | "ClosePosition" - | "CollectMarginFees" - | "CollectSwapFees" - | "DecreaseGuaranteedUsd" - | "DecreasePoolAmount" - | "DecreasePosition" - | "DecreaseReservedAmount" - | "DecreaseUsdgAmount" - | "DirectPoolDeposit" - | "IncreaseGuaranteedUsd" - | "IncreasePoolAmount" - | "IncreasePosition" - | "IncreaseReservedAmount" - | "IncreaseUsdgAmount" - | "LiquidatePosition" - | "SellUSDG" - | "Swap" - | "UpdateFundingRate" - | "UpdatePnl" - | "UpdatePosition" - ): EventFragment; - - encodeFunctionData(functionFragment: "BASIS_POINTS_DIVISOR", values?: undefined): string; - encodeFunctionData(functionFragment: "FUNDING_RATE_PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "MAX_FEE_BASIS_POINTS", values?: undefined): string; - encodeFunctionData(functionFragment: "MAX_FUNDING_RATE_FACTOR", values?: undefined): string; - encodeFunctionData(functionFragment: "MAX_LIQUIDATION_FEE_USD", values?: undefined): string; - encodeFunctionData(functionFragment: "MIN_FUNDING_RATE_INTERVAL", values?: undefined): string; - encodeFunctionData(functionFragment: "MIN_LEVERAGE", values?: undefined): string; - encodeFunctionData(functionFragment: "PRICE_PRECISION", values?: undefined): string; - encodeFunctionData(functionFragment: "USDG_DECIMALS", values?: undefined): string; - encodeFunctionData(functionFragment: "addRouter", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "adjustForDecimals", values: [BigNumberish, AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "allWhitelistedTokens", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "allWhitelistedTokensLength", values?: undefined): string; - encodeFunctionData(functionFragment: "approvedRouters", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "bufferAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "buyUSDG", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "clearTokenConfig", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "cumulativeFundingRates", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "decreasePosition", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, BigNumberish, boolean, AddressLike] - ): string; - encodeFunctionData(functionFragment: "directPoolDeposit", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "errorController", values?: undefined): string; - encodeFunctionData(functionFragment: "errors", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "feeReserves", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "fundingInterval", values?: undefined): string; - encodeFunctionData(functionFragment: "fundingRateFactor", values?: undefined): string; - encodeFunctionData( - functionFragment: "getDelta", - values: [AddressLike, BigNumberish, BigNumberish, boolean, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getEntryFundingRate", values: [AddressLike, AddressLike, boolean]): string; - encodeFunctionData( - functionFragment: "getFeeBasisPoints", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, boolean] - ): string; - encodeFunctionData( - functionFragment: "getFundingFee", - values: [AddressLike, AddressLike, AddressLike, boolean, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getGlobalShortDelta", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getMaxPrice", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getMinPrice", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "getNextAveragePrice", - values: [AddressLike, BigNumberish, BigNumberish, boolean, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getNextFundingRate", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "getNextGlobalShortAveragePrice", - values: [AddressLike, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getPosition", values: [AddressLike, AddressLike, AddressLike, boolean]): string; - encodeFunctionData( - functionFragment: "getPositionDelta", - values: [AddressLike, AddressLike, AddressLike, boolean] - ): string; - encodeFunctionData( - functionFragment: "getPositionFee", - values: [AddressLike, AddressLike, AddressLike, boolean, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPositionKey", - values: [AddressLike, AddressLike, AddressLike, boolean] - ): string; - encodeFunctionData( - functionFragment: "getPositionLeverage", - values: [AddressLike, AddressLike, AddressLike, boolean] - ): string; - encodeFunctionData(functionFragment: "getRedemptionAmount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "getRedemptionCollateral", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getRedemptionCollateralUsd", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getTargetUsdgAmount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getUtilisation", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "globalShortAveragePrices", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "globalShortSizes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "guaranteedUsd", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "hasDynamicFees", values?: undefined): string; - encodeFunctionData(functionFragment: "inManagerMode", values?: undefined): string; - encodeFunctionData(functionFragment: "inPrivateLiquidationMode", values?: undefined): string; - encodeFunctionData(functionFragment: "includeAmmPrice", values?: undefined): string; - encodeFunctionData( - functionFragment: "increasePosition", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, boolean] - ): string; - encodeFunctionData( - functionFragment: "initialize", - values: [AddressLike, AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; - encodeFunctionData(functionFragment: "isLeverageEnabled", values?: undefined): string; - encodeFunctionData(functionFragment: "isLiquidator", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isManager", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "isSwapEnabled", values?: undefined): string; - encodeFunctionData(functionFragment: "lastFundingTimes", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "liquidatePosition", - values: [AddressLike, AddressLike, AddressLike, boolean, AddressLike] - ): string; - encodeFunctionData(functionFragment: "liquidationFeeUsd", values?: undefined): string; - encodeFunctionData(functionFragment: "marginFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "maxGasPrice", values?: undefined): string; - encodeFunctionData(functionFragment: "maxGlobalShortSizes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "maxLeverage", values?: undefined): string; - encodeFunctionData(functionFragment: "maxUsdgAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "minProfitBasisPoints", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "minProfitTime", values?: undefined): string; - encodeFunctionData(functionFragment: "mintBurnFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "poolAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "positions", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "priceFeed", values?: undefined): string; - encodeFunctionData(functionFragment: "removeRouter", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "reservedAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData(functionFragment: "sellUSDG", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "setBufferAmount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setError", values: [BigNumberish, string]): string; - encodeFunctionData(functionFragment: "setErrorController", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "setFees", - values: [ - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - BigNumberish, - boolean, - ] - ): string; - encodeFunctionData(functionFragment: "setFundingRate", values: [BigNumberish, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setInManagerMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setInPrivateLiquidationMode", values: [boolean]): string; - encodeFunctionData(functionFragment: "setIsLeverageEnabled", values: [boolean]): string; - encodeFunctionData(functionFragment: "setIsSwapEnabled", values: [boolean]): string; - encodeFunctionData(functionFragment: "setLiquidator", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setManager", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setMaxGasPrice", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setMaxGlobalShortSize", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setMaxLeverage", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "setPriceFeed", values: [AddressLike]): string; - encodeFunctionData( - functionFragment: "setTokenConfig", - values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BigNumberish, boolean, boolean] - ): string; - encodeFunctionData(functionFragment: "setUsdgAmount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setVaultUtils", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "shortableTokens", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "stableFundingRateFactor", values?: undefined): string; - encodeFunctionData(functionFragment: "stableSwapFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "stableTaxBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "stableTokens", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "swap", values: [AddressLike, AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "swapFeeBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "taxBasisPoints", values?: undefined): string; - encodeFunctionData(functionFragment: "tokenBalances", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "tokenDecimals", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "tokenToUsdMin", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "tokenWeights", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "totalTokenWeights", values?: undefined): string; - encodeFunctionData(functionFragment: "updateCumulativeFundingRate", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "upgradeVault", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdToToken", values: [AddressLike, BigNumberish, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdToTokenMax", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdToTokenMin", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "usdg", values?: undefined): string; - encodeFunctionData(functionFragment: "usdgAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "useSwapPricing", values?: undefined): string; - encodeFunctionData( - functionFragment: "validateLiquidation", - values: [AddressLike, AddressLike, AddressLike, boolean, boolean] - ): string; - encodeFunctionData(functionFragment: "vaultUtils", values?: undefined): string; - encodeFunctionData(functionFragment: "whitelistedTokenCount", values?: undefined): string; - encodeFunctionData(functionFragment: "whitelistedTokens", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "withdrawFees", values: [AddressLike, AddressLike]): string; - - decodeFunctionResult(functionFragment: "BASIS_POINTS_DIVISOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "FUNDING_RATE_PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MAX_FEE_BASIS_POINTS", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MAX_FUNDING_RATE_FACTOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MAX_LIQUIDATION_FEE_USD", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MIN_FUNDING_RATE_INTERVAL", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "MIN_LEVERAGE", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "PRICE_PRECISION", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "USDG_DECIMALS", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "adjustForDecimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allWhitelistedTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allWhitelistedTokensLength", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approvedRouters", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "bufferAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "buyUSDG", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "clearTokenConfig", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cumulativeFundingRates", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "directPoolDeposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "errorController", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "errors", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "feeReserves", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "fundingInterval", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "fundingRateFactor", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getDelta", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getEntryFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getFundingFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGlobalShortDelta", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMaxPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMinPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getNextAveragePrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getNextFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getNextGlobalShortAveragePrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionDelta", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionKey", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPositionLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getRedemptionAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getRedemptionCollateral", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getRedemptionCollateralUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTargetUsdgAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getUtilisation", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "globalShortAveragePrices", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "globalShortSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "guaranteedUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasDynamicFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inManagerMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "inPrivateLiquidationMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "includeAmmPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increasePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isLeverageEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isLiquidator", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isManager", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isSwapEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lastFundingTimes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "liquidatePosition", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "liquidationFeeUsd", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "marginFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxGasPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxGlobalShortSizes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxUsdgAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minProfitBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "minProfitTime", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mintBurnFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "poolAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "positions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "priceFeed", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeRouter", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "reservedAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sellUSDG", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setBufferAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setError", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setErrorController", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFees", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInManagerMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInPrivateLiquidationMode", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIsLeverageEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setIsSwapEnabled", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setLiquidator", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setManager", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxGasPrice", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxGlobalShortSize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setMaxLeverage", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setPriceFeed", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTokenConfig", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setUsdgAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setVaultUtils", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "shortableTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableFundingRateFactor", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableSwapFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableTaxBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stableTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "swapFeeBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "taxBasisPoints", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenBalances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenDecimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenToUsdMin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokenWeights", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalTokenWeights", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "updateCumulativeFundingRate", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "upgradeVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdToToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdToTokenMax", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdToTokenMin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdg", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "usdgAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "useSwapPricing", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "validateLiquidation", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vaultUtils", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "whitelistedTokenCount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "whitelistedTokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawFees", data: BytesLike): Result; -} - -export namespace BuyUSDGEvent { - export type InputTuple = [ - account: AddressLike, - token: AddressLike, - tokenAmount: BigNumberish, - usdgAmount: BigNumberish, - feeBasisPoints: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - token: string, - tokenAmount: bigint, - usdgAmount: bigint, - feeBasisPoints: bigint, - ]; - export interface OutputObject { - account: string; - token: string; - tokenAmount: bigint; - usdgAmount: bigint; - feeBasisPoints: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace ClosePositionEvent { - export type InputTuple = [ - key: BytesLike, - size: BigNumberish, - collateral: BigNumberish, - averagePrice: BigNumberish, - entryFundingRate: BigNumberish, - reserveAmount: BigNumberish, - realisedPnl: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - size: bigint, - collateral: bigint, - averagePrice: bigint, - entryFundingRate: bigint, - reserveAmount: bigint, - realisedPnl: bigint, - ]; - export interface OutputObject { - key: string; - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CollectMarginFeesEvent { - export type InputTuple = [token: AddressLike, feeUsd: BigNumberish, feeTokens: BigNumberish]; - export type OutputTuple = [token: string, feeUsd: bigint, feeTokens: bigint]; - export interface OutputObject { - token: string; - feeUsd: bigint; - feeTokens: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace CollectSwapFeesEvent { - export type InputTuple = [token: AddressLike, feeUsd: BigNumberish, feeTokens: BigNumberish]; - export type OutputTuple = [token: string, feeUsd: bigint, feeTokens: bigint]; - export interface OutputObject { - token: string; - feeUsd: bigint; - feeTokens: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreaseGuaranteedUsdEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreasePoolAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreasePositionEvent { - export type InputTuple = [ - key: BytesLike, - account: AddressLike, - collateralToken: AddressLike, - indexToken: AddressLike, - collateralDelta: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - price: BigNumberish, - fee: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - account: string, - collateralToken: string, - indexToken: string, - collateralDelta: bigint, - sizeDelta: bigint, - isLong: boolean, - price: bigint, - fee: bigint, - ]; - export interface OutputObject { - key: string; - account: string; - collateralToken: string; - indexToken: string; - collateralDelta: bigint; - sizeDelta: bigint; - isLong: boolean; - price: bigint; - fee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreaseReservedAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DecreaseUsdgAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DirectPoolDepositEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreaseGuaranteedUsdEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreasePoolAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreasePositionEvent { - export type InputTuple = [ - key: BytesLike, - account: AddressLike, - collateralToken: AddressLike, - indexToken: AddressLike, - collateralDelta: BigNumberish, - sizeDelta: BigNumberish, - isLong: boolean, - price: BigNumberish, - fee: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - account: string, - collateralToken: string, - indexToken: string, - collateralDelta: bigint, - sizeDelta: bigint, - isLong: boolean, - price: bigint, - fee: bigint, - ]; - export interface OutputObject { - key: string; - account: string; - collateralToken: string; - indexToken: string; - collateralDelta: bigint; - sizeDelta: bigint; - isLong: boolean; - price: bigint; - fee: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreaseReservedAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace IncreaseUsdgAmountEvent { - export type InputTuple = [token: AddressLike, amount: BigNumberish]; - export type OutputTuple = [token: string, amount: bigint]; - export interface OutputObject { - token: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace LiquidatePositionEvent { - export type InputTuple = [ - key: BytesLike, - account: AddressLike, - collateralToken: AddressLike, - indexToken: AddressLike, - isLong: boolean, - size: BigNumberish, - collateral: BigNumberish, - reserveAmount: BigNumberish, - realisedPnl: BigNumberish, - markPrice: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - account: string, - collateralToken: string, - indexToken: string, - isLong: boolean, - size: bigint, - collateral: bigint, - reserveAmount: bigint, - realisedPnl: bigint, - markPrice: bigint, - ]; - export interface OutputObject { - key: string; - account: string; - collateralToken: string; - indexToken: string; - isLong: boolean; - size: bigint; - collateral: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - markPrice: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SellUSDGEvent { - export type InputTuple = [ - account: AddressLike, - token: AddressLike, - usdgAmount: BigNumberish, - tokenAmount: BigNumberish, - feeBasisPoints: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - token: string, - usdgAmount: bigint, - tokenAmount: bigint, - feeBasisPoints: bigint, - ]; - export interface OutputObject { - account: string; - token: string; - usdgAmount: bigint; - tokenAmount: bigint; - feeBasisPoints: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace SwapEvent { - export type InputTuple = [ - account: AddressLike, - tokenIn: AddressLike, - tokenOut: AddressLike, - amountIn: BigNumberish, - amountOut: BigNumberish, - amountOutAfterFees: BigNumberish, - feeBasisPoints: BigNumberish, - ]; - export type OutputTuple = [ - account: string, - tokenIn: string, - tokenOut: string, - amountIn: bigint, - amountOut: bigint, - amountOutAfterFees: bigint, - feeBasisPoints: bigint, - ]; - export interface OutputObject { - account: string; - tokenIn: string; - tokenOut: string; - amountIn: bigint; - amountOut: bigint; - amountOutAfterFees: bigint; - feeBasisPoints: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdateFundingRateEvent { - export type InputTuple = [token: AddressLike, fundingRate: BigNumberish]; - export type OutputTuple = [token: string, fundingRate: bigint]; - export interface OutputObject { - token: string; - fundingRate: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdatePnlEvent { - export type InputTuple = [key: BytesLike, hasProfit: boolean, delta: BigNumberish]; - export type OutputTuple = [key: string, hasProfit: boolean, delta: bigint]; - export interface OutputObject { - key: string; - hasProfit: boolean; - delta: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace UpdatePositionEvent { - export type InputTuple = [ - key: BytesLike, - size: BigNumberish, - collateral: BigNumberish, - averagePrice: BigNumberish, - entryFundingRate: BigNumberish, - reserveAmount: BigNumberish, - realisedPnl: BigNumberish, - markPrice: BigNumberish, - ]; - export type OutputTuple = [ - key: string, - size: bigint, - collateral: bigint, - averagePrice: bigint, - entryFundingRate: bigint, - reserveAmount: bigint, - realisedPnl: bigint, - markPrice: bigint, - ]; - export interface OutputObject { - key: string; - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - markPrice: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface VaultV2b extends BaseContract { - connect(runner?: ContractRunner | null): VaultV2b; - waitForDeployment(): Promise; - - interface: VaultV2bInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - BASIS_POINTS_DIVISOR: TypedContractMethod<[], [bigint], "view">; - - FUNDING_RATE_PRECISION: TypedContractMethod<[], [bigint], "view">; - - MAX_FEE_BASIS_POINTS: TypedContractMethod<[], [bigint], "view">; - - MAX_FUNDING_RATE_FACTOR: TypedContractMethod<[], [bigint], "view">; - - MAX_LIQUIDATION_FEE_USD: TypedContractMethod<[], [bigint], "view">; - - MIN_FUNDING_RATE_INTERVAL: TypedContractMethod<[], [bigint], "view">; - - MIN_LEVERAGE: TypedContractMethod<[], [bigint], "view">; - - PRICE_PRECISION: TypedContractMethod<[], [bigint], "view">; - - USDG_DECIMALS: TypedContractMethod<[], [bigint], "view">; - - addRouter: TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - - adjustForDecimals: TypedContractMethod< - [_amount: BigNumberish, _tokenDiv: AddressLike, _tokenMul: AddressLike], - [bigint], - "view" - >; - - allWhitelistedTokens: TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - allWhitelistedTokensLength: TypedContractMethod<[], [bigint], "view">; - - approvedRouters: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [boolean], "view">; - - bufferAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - buyUSDG: TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - clearTokenConfig: TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - - cumulativeFundingRates: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - decreasePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - - directPoolDeposit: TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - - errorController: TypedContractMethod<[], [string], "view">; - - errors: TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - feeReserves: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - fundingInterval: TypedContractMethod<[], [bigint], "view">; - - fundingRateFactor: TypedContractMethod<[], [bigint], "view">; - - getDelta: TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _lastIncreasedTime: BigNumberish, - ], - [[boolean, bigint]], - "view" - >; - - getEntryFundingRate: TypedContractMethod< - [_collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [bigint], - "view" - >; - - getFeeBasisPoints: TypedContractMethod< - [ - _token: AddressLike, - _usdgDelta: BigNumberish, - _feeBasisPoints: BigNumberish, - _taxBasisPoints: BigNumberish, - _increment: boolean, - ], - [bigint], - "view" - >; - - getFundingFee: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _size: BigNumberish, - _entryFundingRate: BigNumberish, - ], - [bigint], - "view" - >; - - getGlobalShortDelta: TypedContractMethod<[_token: AddressLike], [[boolean, bigint]], "view">; - - getMaxPrice: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getMinPrice: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getNextAveragePrice: TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _nextPrice: BigNumberish, - _sizeDelta: BigNumberish, - _lastIncreasedTime: BigNumberish, - ], - [bigint], - "view" - >; - - getNextFundingRate: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getNextGlobalShortAveragePrice: TypedContractMethod< - [_indexToken: AddressLike, _nextPrice: BigNumberish, _sizeDelta: BigNumberish], - [bigint], - "view" - >; - - getPosition: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[bigint, bigint, bigint, bigint, bigint, bigint, boolean, bigint]], - "view" - >; - - getPositionDelta: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[boolean, bigint]], - "view" - >; - - getPositionFee: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _sizeDelta: BigNumberish, - ], - [bigint], - "view" - >; - - getPositionKey: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [string], - "view" - >; - - getPositionLeverage: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [bigint], - "view" - >; - - getRedemptionAmount: TypedContractMethod<[_token: AddressLike, _usdgAmount: BigNumberish], [bigint], "view">; - - getRedemptionCollateral: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getRedemptionCollateralUsd: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getTargetUsdgAmount: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - getUtilisation: TypedContractMethod<[_token: AddressLike], [bigint], "view">; - - globalShortAveragePrices: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - globalShortSizes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - guaranteedUsd: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - hasDynamicFees: TypedContractMethod<[], [boolean], "view">; - - inManagerMode: TypedContractMethod<[], [boolean], "view">; - - inPrivateLiquidationMode: TypedContractMethod<[], [boolean], "view">; - - includeAmmPrice: TypedContractMethod<[], [boolean], "view">; - - increasePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _isLong: boolean, - ], - [void], - "nonpayable" - >; - - initialize: TypedContractMethod< - [ - _router: AddressLike, - _usdg: AddressLike, - _priceFeed: AddressLike, - _liquidationFeeUsd: BigNumberish, - _fundingRateFactor: BigNumberish, - _stableFundingRateFactor: BigNumberish, - ], - [void], - "nonpayable" - >; - - isInitialized: TypedContractMethod<[], [boolean], "view">; - - isLeverageEnabled: TypedContractMethod<[], [boolean], "view">; - - isLiquidator: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isManager: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - isSwapEnabled: TypedContractMethod<[], [boolean], "view">; - - lastFundingTimes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - liquidatePosition: TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _feeReceiver: AddressLike, - ], - [void], - "nonpayable" - >; - - liquidationFeeUsd: TypedContractMethod<[], [bigint], "view">; - - marginFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - maxGasPrice: TypedContractMethod<[], [bigint], "view">; - - maxGlobalShortSizes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - maxLeverage: TypedContractMethod<[], [bigint], "view">; - - maxUsdgAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - minProfitBasisPoints: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - minProfitTime: TypedContractMethod<[], [bigint], "view">; - - mintBurnFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - poolAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - positions: TypedContractMethod< - [arg0: BytesLike], - [ - [bigint, bigint, bigint, bigint, bigint, bigint, bigint] & { - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - lastIncreasedTime: bigint; - }, - ], - "view" - >; - - priceFeed: TypedContractMethod<[], [string], "view">; - - removeRouter: TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - - reservedAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - router: TypedContractMethod<[], [string], "view">; - - sellUSDG: TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - setBufferAmount: TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - setError: TypedContractMethod<[_errorCode: BigNumberish, _error: string], [void], "nonpayable">; - - setErrorController: TypedContractMethod<[_errorController: AddressLike], [void], "nonpayable">; - - setFees: TypedContractMethod< - [ - _taxBasisPoints: BigNumberish, - _stableTaxBasisPoints: BigNumberish, - _mintBurnFeeBasisPoints: BigNumberish, - _swapFeeBasisPoints: BigNumberish, - _stableSwapFeeBasisPoints: BigNumberish, - _marginFeeBasisPoints: BigNumberish, - _liquidationFeeUsd: BigNumberish, - _minProfitTime: BigNumberish, - _hasDynamicFees: boolean, - ], - [void], - "nonpayable" - >; - - setFundingRate: TypedContractMethod< - [_fundingInterval: BigNumberish, _fundingRateFactor: BigNumberish, _stableFundingRateFactor: BigNumberish], - [void], - "nonpayable" - >; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setInManagerMode: TypedContractMethod<[_inManagerMode: boolean], [void], "nonpayable">; - - setInPrivateLiquidationMode: TypedContractMethod<[_inPrivateLiquidationMode: boolean], [void], "nonpayable">; - - setIsLeverageEnabled: TypedContractMethod<[_isLeverageEnabled: boolean], [void], "nonpayable">; - - setIsSwapEnabled: TypedContractMethod<[_isSwapEnabled: boolean], [void], "nonpayable">; - - setLiquidator: TypedContractMethod<[_liquidator: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setManager: TypedContractMethod<[_manager: AddressLike, _isManager: boolean], [void], "nonpayable">; - - setMaxGasPrice: TypedContractMethod<[_maxGasPrice: BigNumberish], [void], "nonpayable">; - - setMaxGlobalShortSize: TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - setMaxLeverage: TypedContractMethod<[_maxLeverage: BigNumberish], [void], "nonpayable">; - - setPriceFeed: TypedContractMethod<[_priceFeed: AddressLike], [void], "nonpayable">; - - setTokenConfig: TypedContractMethod< - [ - _token: AddressLike, - _tokenDecimals: BigNumberish, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _isStable: boolean, - _isShortable: boolean, - ], - [void], - "nonpayable" - >; - - setUsdgAmount: TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - setVaultUtils: TypedContractMethod<[_vaultUtils: AddressLike], [void], "nonpayable">; - - shortableTokens: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - stableFundingRateFactor: TypedContractMethod<[], [bigint], "view">; - - stableSwapFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - stableTaxBasisPoints: TypedContractMethod<[], [bigint], "view">; - - stableTokens: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - swap: TypedContractMethod< - [_tokenIn: AddressLike, _tokenOut: AddressLike, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - - swapFeeBasisPoints: TypedContractMethod<[], [bigint], "view">; - - taxBasisPoints: TypedContractMethod<[], [bigint], "view">; - - tokenBalances: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - tokenDecimals: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - tokenToUsdMin: TypedContractMethod<[_token: AddressLike, _tokenAmount: BigNumberish], [bigint], "view">; - - tokenWeights: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - totalTokenWeights: TypedContractMethod<[], [bigint], "view">; - - updateCumulativeFundingRate: TypedContractMethod< - [_collateralToken: AddressLike, _indexToken: AddressLike], - [void], - "nonpayable" - >; - - upgradeVault: TypedContractMethod< - [_newVault: AddressLike, _token: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - usdToToken: TypedContractMethod< - [_token: AddressLike, _usdAmount: BigNumberish, _price: BigNumberish], - [bigint], - "view" - >; - - usdToTokenMax: TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - - usdToTokenMin: TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - - usdg: TypedContractMethod<[], [string], "view">; - - usdgAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - useSwapPricing: TypedContractMethod<[], [boolean], "view">; - - validateLiquidation: TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean, _raise: boolean], - [[bigint, bigint]], - "view" - >; - - vaultUtils: TypedContractMethod<[], [string], "view">; - - whitelistedTokenCount: TypedContractMethod<[], [bigint], "view">; - - whitelistedTokens: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - withdrawFees: TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "BASIS_POINTS_DIVISOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "FUNDING_RATE_PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MAX_FEE_BASIS_POINTS"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MAX_FUNDING_RATE_FACTOR"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MAX_LIQUIDATION_FEE_USD"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MIN_FUNDING_RATE_INTERVAL"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "MIN_LEVERAGE"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "PRICE_PRECISION"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "USDG_DECIMALS"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "addRouter"): TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "adjustForDecimals" - ): TypedContractMethod<[_amount: BigNumberish, _tokenDiv: AddressLike, _tokenMul: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "allWhitelistedTokens"): TypedContractMethod<[arg0: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "allWhitelistedTokensLength"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "approvedRouters" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "bufferAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "buyUSDG" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - getFunction(nameOrSignature: "clearTokenConfig"): TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "cumulativeFundingRates"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "decreasePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _collateralDelta: BigNumberish, - _sizeDelta: BigNumberish, - _isLong: boolean, - _receiver: AddressLike, - ], - [bigint], - "nonpayable" - >; - getFunction(nameOrSignature: "directPoolDeposit"): TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "errorController"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "errors"): TypedContractMethod<[arg0: BigNumberish], [string], "view">; - getFunction(nameOrSignature: "feeReserves"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "fundingInterval"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "fundingRateFactor"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "getDelta" - ): TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _lastIncreasedTime: BigNumberish, - ], - [[boolean, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getEntryFundingRate" - ): TypedContractMethod<[_collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], [bigint], "view">; - getFunction( - nameOrSignature: "getFeeBasisPoints" - ): TypedContractMethod< - [ - _token: AddressLike, - _usdgDelta: BigNumberish, - _feeBasisPoints: BigNumberish, - _taxBasisPoints: BigNumberish, - _increment: boolean, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getFundingFee" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _size: BigNumberish, - _entryFundingRate: BigNumberish, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getGlobalShortDelta" - ): TypedContractMethod<[_token: AddressLike], [[boolean, bigint]], "view">; - getFunction(nameOrSignature: "getMaxPrice"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getMinPrice"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getNextAveragePrice" - ): TypedContractMethod< - [ - _indexToken: AddressLike, - _size: BigNumberish, - _averagePrice: BigNumberish, - _isLong: boolean, - _nextPrice: BigNumberish, - _sizeDelta: BigNumberish, - _lastIncreasedTime: BigNumberish, - ], - [bigint], - "view" - >; - getFunction(nameOrSignature: "getNextFundingRate"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getNextGlobalShortAveragePrice" - ): TypedContractMethod< - [_indexToken: AddressLike, _nextPrice: BigNumberish, _sizeDelta: BigNumberish], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getPosition" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[bigint, bigint, bigint, bigint, bigint, bigint, boolean, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getPositionDelta" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [[boolean, bigint]], - "view" - >; - getFunction( - nameOrSignature: "getPositionFee" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _sizeDelta: BigNumberish, - ], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getPositionKey" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [string], - "view" - >; - getFunction( - nameOrSignature: "getPositionLeverage" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean], - [bigint], - "view" - >; - getFunction( - nameOrSignature: "getRedemptionAmount" - ): TypedContractMethod<[_token: AddressLike, _usdgAmount: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "getRedemptionCollateral"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getRedemptionCollateralUsd" - ): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getTargetUsdgAmount"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getUtilisation"): TypedContractMethod<[_token: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "globalShortAveragePrices"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "globalShortSizes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "guaranteedUsd"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "hasDynamicFees"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "inManagerMode"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "inPrivateLiquidationMode"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "includeAmmPrice"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "increasePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _sizeDelta: BigNumberish, - _isLong: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "initialize" - ): TypedContractMethod< - [ - _router: AddressLike, - _usdg: AddressLike, - _priceFeed: AddressLike, - _liquidationFeeUsd: BigNumberish, - _fundingRateFactor: BigNumberish, - _stableFundingRateFactor: BigNumberish, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "isInitialized"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isLeverageEnabled"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isLiquidator"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isManager"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "isSwapEnabled"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "lastFundingTimes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "liquidatePosition" - ): TypedContractMethod< - [ - _account: AddressLike, - _collateralToken: AddressLike, - _indexToken: AddressLike, - _isLong: boolean, - _feeReceiver: AddressLike, - ], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "liquidationFeeUsd"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "marginFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxGasPrice"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxGlobalShortSizes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "maxLeverage"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "maxUsdgAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "minProfitBasisPoints"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "minProfitTime"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "mintBurnFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "poolAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "positions"): TypedContractMethod< - [arg0: BytesLike], - [ - [bigint, bigint, bigint, bigint, bigint, bigint, bigint] & { - size: bigint; - collateral: bigint; - averagePrice: bigint; - entryFundingRate: bigint; - reserveAmount: bigint; - realisedPnl: bigint; - lastIncreasedTime: bigint; - }, - ], - "view" - >; - getFunction(nameOrSignature: "priceFeed"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "removeRouter"): TypedContractMethod<[_router: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "reservedAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "router"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "sellUSDG" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "setBufferAmount" - ): TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setError" - ): TypedContractMethod<[_errorCode: BigNumberish, _error: string], [void], "nonpayable">; - getFunction( - nameOrSignature: "setErrorController" - ): TypedContractMethod<[_errorController: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setFees" - ): TypedContractMethod< - [ - _taxBasisPoints: BigNumberish, - _stableTaxBasisPoints: BigNumberish, - _mintBurnFeeBasisPoints: BigNumberish, - _swapFeeBasisPoints: BigNumberish, - _stableSwapFeeBasisPoints: BigNumberish, - _marginFeeBasisPoints: BigNumberish, - _liquidationFeeUsd: BigNumberish, - _minProfitTime: BigNumberish, - _hasDynamicFees: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setFundingRate" - ): TypedContractMethod< - [_fundingInterval: BigNumberish, _fundingRateFactor: BigNumberish, _stableFundingRateFactor: BigNumberish], - [void], - "nonpayable" - >; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInManagerMode" - ): TypedContractMethod<[_inManagerMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setInPrivateLiquidationMode" - ): TypedContractMethod<[_inPrivateLiquidationMode: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setIsLeverageEnabled" - ): TypedContractMethod<[_isLeverageEnabled: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setIsSwapEnabled" - ): TypedContractMethod<[_isSwapEnabled: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setLiquidator" - ): TypedContractMethod<[_liquidator: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setManager" - ): TypedContractMethod<[_manager: AddressLike, _isManager: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxGasPrice" - ): TypedContractMethod<[_maxGasPrice: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxGlobalShortSize" - ): TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setMaxLeverage" - ): TypedContractMethod<[_maxLeverage: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "setPriceFeed"): TypedContractMethod<[_priceFeed: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setTokenConfig" - ): TypedContractMethod< - [ - _token: AddressLike, - _tokenDecimals: BigNumberish, - _tokenWeight: BigNumberish, - _minProfitBps: BigNumberish, - _maxUsdgAmount: BigNumberish, - _isStable: boolean, - _isShortable: boolean, - ], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "setUsdgAmount" - ): TypedContractMethod<[_token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "setVaultUtils"): TypedContractMethod<[_vaultUtils: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "shortableTokens"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "stableFundingRateFactor"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "stableSwapFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "stableTaxBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "stableTokens"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "swap" - ): TypedContractMethod< - [_tokenIn: AddressLike, _tokenOut: AddressLike, _receiver: AddressLike], - [bigint], - "nonpayable" - >; - getFunction(nameOrSignature: "swapFeeBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "taxBasisPoints"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "tokenBalances"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "tokenDecimals"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "tokenToUsdMin" - ): TypedContractMethod<[_token: AddressLike, _tokenAmount: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "tokenWeights"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "totalTokenWeights"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "updateCumulativeFundingRate" - ): TypedContractMethod<[_collateralToken: AddressLike, _indexToken: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "upgradeVault" - ): TypedContractMethod<[_newVault: AddressLike, _token: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "usdToToken" - ): TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish, _price: BigNumberish], [bigint], "view">; - getFunction( - nameOrSignature: "usdToTokenMax" - ): TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - getFunction( - nameOrSignature: "usdToTokenMin" - ): TypedContractMethod<[_token: AddressLike, _usdAmount: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "usdg"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "usdgAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "useSwapPricing"): TypedContractMethod<[], [boolean], "view">; - getFunction( - nameOrSignature: "validateLiquidation" - ): TypedContractMethod< - [_account: AddressLike, _collateralToken: AddressLike, _indexToken: AddressLike, _isLong: boolean, _raise: boolean], - [[bigint, bigint]], - "view" - >; - getFunction(nameOrSignature: "vaultUtils"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "whitelistedTokenCount"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "whitelistedTokens"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "withdrawFees" - ): TypedContractMethod<[_token: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - getEvent( - key: "BuyUSDG" - ): TypedContractEvent; - getEvent( - key: "ClosePosition" - ): TypedContractEvent; - getEvent( - key: "CollectMarginFees" - ): TypedContractEvent< - CollectMarginFeesEvent.InputTuple, - CollectMarginFeesEvent.OutputTuple, - CollectMarginFeesEvent.OutputObject - >; - getEvent( - key: "CollectSwapFees" - ): TypedContractEvent< - CollectSwapFeesEvent.InputTuple, - CollectSwapFeesEvent.OutputTuple, - CollectSwapFeesEvent.OutputObject - >; - getEvent( - key: "DecreaseGuaranteedUsd" - ): TypedContractEvent< - DecreaseGuaranteedUsdEvent.InputTuple, - DecreaseGuaranteedUsdEvent.OutputTuple, - DecreaseGuaranteedUsdEvent.OutputObject - >; - getEvent( - key: "DecreasePoolAmount" - ): TypedContractEvent< - DecreasePoolAmountEvent.InputTuple, - DecreasePoolAmountEvent.OutputTuple, - DecreasePoolAmountEvent.OutputObject - >; - getEvent( - key: "DecreasePosition" - ): TypedContractEvent< - DecreasePositionEvent.InputTuple, - DecreasePositionEvent.OutputTuple, - DecreasePositionEvent.OutputObject - >; - getEvent( - key: "DecreaseReservedAmount" - ): TypedContractEvent< - DecreaseReservedAmountEvent.InputTuple, - DecreaseReservedAmountEvent.OutputTuple, - DecreaseReservedAmountEvent.OutputObject - >; - getEvent( - key: "DecreaseUsdgAmount" - ): TypedContractEvent< - DecreaseUsdgAmountEvent.InputTuple, - DecreaseUsdgAmountEvent.OutputTuple, - DecreaseUsdgAmountEvent.OutputObject - >; - getEvent( - key: "DirectPoolDeposit" - ): TypedContractEvent< - DirectPoolDepositEvent.InputTuple, - DirectPoolDepositEvent.OutputTuple, - DirectPoolDepositEvent.OutputObject - >; - getEvent( - key: "IncreaseGuaranteedUsd" - ): TypedContractEvent< - IncreaseGuaranteedUsdEvent.InputTuple, - IncreaseGuaranteedUsdEvent.OutputTuple, - IncreaseGuaranteedUsdEvent.OutputObject - >; - getEvent( - key: "IncreasePoolAmount" - ): TypedContractEvent< - IncreasePoolAmountEvent.InputTuple, - IncreasePoolAmountEvent.OutputTuple, - IncreasePoolAmountEvent.OutputObject - >; - getEvent( - key: "IncreasePosition" - ): TypedContractEvent< - IncreasePositionEvent.InputTuple, - IncreasePositionEvent.OutputTuple, - IncreasePositionEvent.OutputObject - >; - getEvent( - key: "IncreaseReservedAmount" - ): TypedContractEvent< - IncreaseReservedAmountEvent.InputTuple, - IncreaseReservedAmountEvent.OutputTuple, - IncreaseReservedAmountEvent.OutputObject - >; - getEvent( - key: "IncreaseUsdgAmount" - ): TypedContractEvent< - IncreaseUsdgAmountEvent.InputTuple, - IncreaseUsdgAmountEvent.OutputTuple, - IncreaseUsdgAmountEvent.OutputObject - >; - getEvent( - key: "LiquidatePosition" - ): TypedContractEvent< - LiquidatePositionEvent.InputTuple, - LiquidatePositionEvent.OutputTuple, - LiquidatePositionEvent.OutputObject - >; - getEvent( - key: "SellUSDG" - ): TypedContractEvent; - getEvent(key: "Swap"): TypedContractEvent; - getEvent( - key: "UpdateFundingRate" - ): TypedContractEvent< - UpdateFundingRateEvent.InputTuple, - UpdateFundingRateEvent.OutputTuple, - UpdateFundingRateEvent.OutputObject - >; - getEvent( - key: "UpdatePnl" - ): TypedContractEvent; - getEvent( - key: "UpdatePosition" - ): TypedContractEvent< - UpdatePositionEvent.InputTuple, - UpdatePositionEvent.OutputTuple, - UpdatePositionEvent.OutputObject - >; - - filters: { - "BuyUSDG(address,address,uint256,uint256,uint256)": TypedContractEvent< - BuyUSDGEvent.InputTuple, - BuyUSDGEvent.OutputTuple, - BuyUSDGEvent.OutputObject - >; - BuyUSDG: TypedContractEvent; - - "ClosePosition(bytes32,uint256,uint256,uint256,uint256,uint256,int256)": TypedContractEvent< - ClosePositionEvent.InputTuple, - ClosePositionEvent.OutputTuple, - ClosePositionEvent.OutputObject - >; - ClosePosition: TypedContractEvent< - ClosePositionEvent.InputTuple, - ClosePositionEvent.OutputTuple, - ClosePositionEvent.OutputObject - >; - - "CollectMarginFees(address,uint256,uint256)": TypedContractEvent< - CollectMarginFeesEvent.InputTuple, - CollectMarginFeesEvent.OutputTuple, - CollectMarginFeesEvent.OutputObject - >; - CollectMarginFees: TypedContractEvent< - CollectMarginFeesEvent.InputTuple, - CollectMarginFeesEvent.OutputTuple, - CollectMarginFeesEvent.OutputObject - >; - - "CollectSwapFees(address,uint256,uint256)": TypedContractEvent< - CollectSwapFeesEvent.InputTuple, - CollectSwapFeesEvent.OutputTuple, - CollectSwapFeesEvent.OutputObject - >; - CollectSwapFees: TypedContractEvent< - CollectSwapFeesEvent.InputTuple, - CollectSwapFeesEvent.OutputTuple, - CollectSwapFeesEvent.OutputObject - >; - - "DecreaseGuaranteedUsd(address,uint256)": TypedContractEvent< - DecreaseGuaranteedUsdEvent.InputTuple, - DecreaseGuaranteedUsdEvent.OutputTuple, - DecreaseGuaranteedUsdEvent.OutputObject - >; - DecreaseGuaranteedUsd: TypedContractEvent< - DecreaseGuaranteedUsdEvent.InputTuple, - DecreaseGuaranteedUsdEvent.OutputTuple, - DecreaseGuaranteedUsdEvent.OutputObject - >; - - "DecreasePoolAmount(address,uint256)": TypedContractEvent< - DecreasePoolAmountEvent.InputTuple, - DecreasePoolAmountEvent.OutputTuple, - DecreasePoolAmountEvent.OutputObject - >; - DecreasePoolAmount: TypedContractEvent< - DecreasePoolAmountEvent.InputTuple, - DecreasePoolAmountEvent.OutputTuple, - DecreasePoolAmountEvent.OutputObject - >; - - "DecreasePosition(bytes32,address,address,address,uint256,uint256,bool,uint256,uint256)": TypedContractEvent< - DecreasePositionEvent.InputTuple, - DecreasePositionEvent.OutputTuple, - DecreasePositionEvent.OutputObject - >; - DecreasePosition: TypedContractEvent< - DecreasePositionEvent.InputTuple, - DecreasePositionEvent.OutputTuple, - DecreasePositionEvent.OutputObject - >; - - "DecreaseReservedAmount(address,uint256)": TypedContractEvent< - DecreaseReservedAmountEvent.InputTuple, - DecreaseReservedAmountEvent.OutputTuple, - DecreaseReservedAmountEvent.OutputObject - >; - DecreaseReservedAmount: TypedContractEvent< - DecreaseReservedAmountEvent.InputTuple, - DecreaseReservedAmountEvent.OutputTuple, - DecreaseReservedAmountEvent.OutputObject - >; - - "DecreaseUsdgAmount(address,uint256)": TypedContractEvent< - DecreaseUsdgAmountEvent.InputTuple, - DecreaseUsdgAmountEvent.OutputTuple, - DecreaseUsdgAmountEvent.OutputObject - >; - DecreaseUsdgAmount: TypedContractEvent< - DecreaseUsdgAmountEvent.InputTuple, - DecreaseUsdgAmountEvent.OutputTuple, - DecreaseUsdgAmountEvent.OutputObject - >; - - "DirectPoolDeposit(address,uint256)": TypedContractEvent< - DirectPoolDepositEvent.InputTuple, - DirectPoolDepositEvent.OutputTuple, - DirectPoolDepositEvent.OutputObject - >; - DirectPoolDeposit: TypedContractEvent< - DirectPoolDepositEvent.InputTuple, - DirectPoolDepositEvent.OutputTuple, - DirectPoolDepositEvent.OutputObject - >; - - "IncreaseGuaranteedUsd(address,uint256)": TypedContractEvent< - IncreaseGuaranteedUsdEvent.InputTuple, - IncreaseGuaranteedUsdEvent.OutputTuple, - IncreaseGuaranteedUsdEvent.OutputObject - >; - IncreaseGuaranteedUsd: TypedContractEvent< - IncreaseGuaranteedUsdEvent.InputTuple, - IncreaseGuaranteedUsdEvent.OutputTuple, - IncreaseGuaranteedUsdEvent.OutputObject - >; - - "IncreasePoolAmount(address,uint256)": TypedContractEvent< - IncreasePoolAmountEvent.InputTuple, - IncreasePoolAmountEvent.OutputTuple, - IncreasePoolAmountEvent.OutputObject - >; - IncreasePoolAmount: TypedContractEvent< - IncreasePoolAmountEvent.InputTuple, - IncreasePoolAmountEvent.OutputTuple, - IncreasePoolAmountEvent.OutputObject - >; - - "IncreasePosition(bytes32,address,address,address,uint256,uint256,bool,uint256,uint256)": TypedContractEvent< - IncreasePositionEvent.InputTuple, - IncreasePositionEvent.OutputTuple, - IncreasePositionEvent.OutputObject - >; - IncreasePosition: TypedContractEvent< - IncreasePositionEvent.InputTuple, - IncreasePositionEvent.OutputTuple, - IncreasePositionEvent.OutputObject - >; - - "IncreaseReservedAmount(address,uint256)": TypedContractEvent< - IncreaseReservedAmountEvent.InputTuple, - IncreaseReservedAmountEvent.OutputTuple, - IncreaseReservedAmountEvent.OutputObject - >; - IncreaseReservedAmount: TypedContractEvent< - IncreaseReservedAmountEvent.InputTuple, - IncreaseReservedAmountEvent.OutputTuple, - IncreaseReservedAmountEvent.OutputObject - >; - - "IncreaseUsdgAmount(address,uint256)": TypedContractEvent< - IncreaseUsdgAmountEvent.InputTuple, - IncreaseUsdgAmountEvent.OutputTuple, - IncreaseUsdgAmountEvent.OutputObject - >; - IncreaseUsdgAmount: TypedContractEvent< - IncreaseUsdgAmountEvent.InputTuple, - IncreaseUsdgAmountEvent.OutputTuple, - IncreaseUsdgAmountEvent.OutputObject - >; - - "LiquidatePosition(bytes32,address,address,address,bool,uint256,uint256,uint256,int256,uint256)": TypedContractEvent< - LiquidatePositionEvent.InputTuple, - LiquidatePositionEvent.OutputTuple, - LiquidatePositionEvent.OutputObject - >; - LiquidatePosition: TypedContractEvent< - LiquidatePositionEvent.InputTuple, - LiquidatePositionEvent.OutputTuple, - LiquidatePositionEvent.OutputObject - >; - - "SellUSDG(address,address,uint256,uint256,uint256)": TypedContractEvent< - SellUSDGEvent.InputTuple, - SellUSDGEvent.OutputTuple, - SellUSDGEvent.OutputObject - >; - SellUSDG: TypedContractEvent; - - "Swap(address,address,address,uint256,uint256,uint256,uint256)": TypedContractEvent< - SwapEvent.InputTuple, - SwapEvent.OutputTuple, - SwapEvent.OutputObject - >; - Swap: TypedContractEvent; - - "UpdateFundingRate(address,uint256)": TypedContractEvent< - UpdateFundingRateEvent.InputTuple, - UpdateFundingRateEvent.OutputTuple, - UpdateFundingRateEvent.OutputObject - >; - UpdateFundingRate: TypedContractEvent< - UpdateFundingRateEvent.InputTuple, - UpdateFundingRateEvent.OutputTuple, - UpdateFundingRateEvent.OutputObject - >; - - "UpdatePnl(bytes32,bool,uint256)": TypedContractEvent< - UpdatePnlEvent.InputTuple, - UpdatePnlEvent.OutputTuple, - UpdatePnlEvent.OutputObject - >; - UpdatePnl: TypedContractEvent; - - "UpdatePosition(bytes32,uint256,uint256,uint256,uint256,uint256,int256,uint256)": TypedContractEvent< - UpdatePositionEvent.InputTuple, - UpdatePositionEvent.OutputTuple, - UpdatePositionEvent.OutputObject - >; - UpdatePosition: TypedContractEvent< - UpdatePositionEvent.InputTuple, - UpdatePositionEvent.OutputTuple, - UpdatePositionEvent.OutputObject - >; - }; -} diff --git a/src/typechain-types/Vester.ts b/src/typechain-types/Vester.ts deleted file mode 100644 index 3417a37caa..0000000000 --- a/src/typechain-types/Vester.ts +++ /dev/null @@ -1,575 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface VesterInterface extends Interface { - getFunction( - nameOrSignature: - | "allowance" - | "approve" - | "balanceOf" - | "balances" - | "bonusRewards" - | "claim" - | "claimForAccount" - | "claimable" - | "claimableToken" - | "claimedAmounts" - | "cumulativeClaimAmounts" - | "cumulativeRewardDeductions" - | "decimals" - | "deposit" - | "depositForAccount" - | "esToken" - | "getCombinedAverageStakedAmount" - | "getMaxVestableAmount" - | "getPairAmount" - | "getTotalVested" - | "getVestedAmount" - | "gov" - | "hasMaxVestableAmount" - | "hasPairToken" - | "hasRewardTracker" - | "isHandler" - | "lastVestingTimes" - | "name" - | "pairAmounts" - | "pairSupply" - | "pairToken" - | "rewardTracker" - | "setBonusRewards" - | "setCumulativeRewardDeductions" - | "setGov" - | "setHandler" - | "setHasMaxVestableAmount" - | "setTransferredAverageStakedAmounts" - | "setTransferredCumulativeRewards" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - | "transferStakeValues" - | "transferredAverageStakedAmounts" - | "transferredCumulativeRewards" - | "vestingDuration" - | "withdraw" - | "withdrawToken" - ): FunctionFragment; - - getEvent( - nameOrSignatureOrTopic: "Approval" | "Claim" | "Deposit" | "PairTransfer" | "Transfer" | "Withdraw" - ): EventFragment; - - encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "balances", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "bonusRewards", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "claim", values?: undefined): string; - encodeFunctionData(functionFragment: "claimForAccount", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "claimable", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "claimableToken", values?: undefined): string; - encodeFunctionData(functionFragment: "claimedAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "cumulativeClaimAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "cumulativeRewardDeductions", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "deposit", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "depositForAccount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "esToken", values?: undefined): string; - encodeFunctionData(functionFragment: "getCombinedAverageStakedAmount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getMaxVestableAmount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getPairAmount", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "getTotalVested", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "getVestedAmount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "hasMaxVestableAmount", values?: undefined): string; - encodeFunctionData(functionFragment: "hasPairToken", values?: undefined): string; - encodeFunctionData(functionFragment: "hasRewardTracker", values?: undefined): string; - encodeFunctionData(functionFragment: "isHandler", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "lastVestingTimes", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "pairAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "pairSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "pairToken", values?: undefined): string; - encodeFunctionData(functionFragment: "rewardTracker", values?: undefined): string; - encodeFunctionData(functionFragment: "setBonusRewards", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setCumulativeRewardDeductions", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setHandler", values: [AddressLike, boolean]): string; - encodeFunctionData(functionFragment: "setHasMaxVestableAmount", values: [boolean]): string; - encodeFunctionData( - functionFragment: "setTransferredAverageStakedAmounts", - values: [AddressLike, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "setTransferredCumulativeRewards", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferStakeValues", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "transferredAverageStakedAmounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "transferredCumulativeRewards", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "vestingDuration", values?: undefined): string; - encodeFunctionData(functionFragment: "withdraw", values?: undefined): string; - encodeFunctionData(functionFragment: "withdrawToken", values: [AddressLike, AddressLike, BigNumberish]): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "bonusRewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimForAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimable", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimableToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claimedAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cumulativeClaimAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cumulativeRewardDeductions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "depositForAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "esToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getCombinedAverageStakedAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getMaxVestableAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getPairAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTotalVested", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getVestedAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasMaxVestableAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasPairToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRewardTracker", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lastVestingTimes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pairAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pairSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pairToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "rewardTracker", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setBonusRewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setCumulativeRewardDeductions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setHandler", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setHasMaxVestableAmount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTransferredAverageStakedAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTransferredCumulativeRewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferStakeValues", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferredAverageStakedAmounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferredCumulativeRewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vestingDuration", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawToken", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; - export interface OutputObject { - owner: string; - spender: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace ClaimEvent { - export type InputTuple = [receiver: AddressLike, amount: BigNumberish]; - export type OutputTuple = [receiver: string, amount: bigint]; - export interface OutputObject { - receiver: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace DepositEvent { - export type InputTuple = [account: AddressLike, amount: BigNumberish]; - export type OutputTuple = [account: string, amount: bigint]; - export interface OutputObject { - account: string; - amount: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace PairTransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace WithdrawEvent { - export type InputTuple = [account: AddressLike, claimedAmount: BigNumberish, balance: BigNumberish]; - export type OutputTuple = [account: string, claimedAmount: bigint, balance: bigint]; - export interface OutputObject { - account: string; - claimedAmount: bigint; - balance: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface Vester extends BaseContract { - connect(runner?: ContractRunner | null): Vester; - waitForDeployment(): Promise; - - interface: VesterInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - allowance: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - - approve: TypedContractMethod<[arg0: AddressLike, arg1: BigNumberish], [boolean], "nonpayable">; - - balanceOf: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - balances: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - bonusRewards: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - claim: TypedContractMethod<[], [bigint], "nonpayable">; - - claimForAccount: TypedContractMethod<[_account: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - - claimable: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - claimableToken: TypedContractMethod<[], [string], "view">; - - claimedAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - cumulativeClaimAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - cumulativeRewardDeductions: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - decimals: TypedContractMethod<[], [bigint], "view">; - - deposit: TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - - depositForAccount: TypedContractMethod<[_account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - esToken: TypedContractMethod<[], [string], "view">; - - getCombinedAverageStakedAmount: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - getMaxVestableAmount: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - getPairAmount: TypedContractMethod<[_account: AddressLike, _esAmount: BigNumberish], [bigint], "view">; - - getTotalVested: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - getVestedAmount: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - hasMaxVestableAmount: TypedContractMethod<[], [boolean], "view">; - - hasPairToken: TypedContractMethod<[], [boolean], "view">; - - hasRewardTracker: TypedContractMethod<[], [boolean], "view">; - - isHandler: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - lastVestingTimes: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - name: TypedContractMethod<[], [string], "view">; - - pairAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - pairSupply: TypedContractMethod<[], [bigint], "view">; - - pairToken: TypedContractMethod<[], [string], "view">; - - rewardTracker: TypedContractMethod<[], [string], "view">; - - setBonusRewards: TypedContractMethod<[_account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - setCumulativeRewardDeductions: TypedContractMethod< - [_account: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setHandler: TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - - setHasMaxVestableAmount: TypedContractMethod<[_hasMaxVestableAmount: boolean], [void], "nonpayable">; - - setTransferredAverageStakedAmounts: TypedContractMethod< - [_account: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - setTransferredCumulativeRewards: TypedContractMethod< - [_account: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - symbol: TypedContractMethod<[], [string], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transfer: TypedContractMethod<[arg0: AddressLike, arg1: BigNumberish], [boolean], "nonpayable">; - - transferFrom: TypedContractMethod< - [arg0: AddressLike, arg1: AddressLike, arg2: BigNumberish], - [boolean], - "nonpayable" - >; - - transferStakeValues: TypedContractMethod<[_sender: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - - transferredAverageStakedAmounts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - transferredCumulativeRewards: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - vestingDuration: TypedContractMethod<[], [bigint], "view">; - - withdraw: TypedContractMethod<[], [void], "nonpayable">; - - withdrawToken: TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "allowance" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[arg0: AddressLike, arg1: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "balances"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "bonusRewards"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "claim"): TypedContractMethod<[], [bigint], "nonpayable">; - getFunction( - nameOrSignature: "claimForAccount" - ): TypedContractMethod<[_account: AddressLike, _receiver: AddressLike], [bigint], "nonpayable">; - getFunction(nameOrSignature: "claimable"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "claimableToken"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "claimedAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "cumulativeClaimAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "cumulativeRewardDeductions" - ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "deposit"): TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "depositForAccount" - ): TypedContractMethod<[_account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "esToken"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "getCombinedAverageStakedAmount" - ): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getMaxVestableAmount"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "getPairAmount" - ): TypedContractMethod<[_account: AddressLike, _esAmount: BigNumberish], [bigint], "view">; - getFunction(nameOrSignature: "getTotalVested"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "getVestedAmount"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "hasMaxVestableAmount"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "hasPairToken"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "hasRewardTracker"): TypedContractMethod<[], [boolean], "view">; - getFunction(nameOrSignature: "isHandler"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "lastVestingTimes"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "pairAmounts"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "pairSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "pairToken"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "rewardTracker"): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "setBonusRewards" - ): TypedContractMethod<[_account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setCumulativeRewardDeductions" - ): TypedContractMethod<[_account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "setHandler" - ): TypedContractMethod<[_handler: AddressLike, _isActive: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setHasMaxVestableAmount" - ): TypedContractMethod<[_hasMaxVestableAmount: boolean], [void], "nonpayable">; - getFunction( - nameOrSignature: "setTransferredAverageStakedAmounts" - ): TypedContractMethod<[_account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "setTransferredCumulativeRewards" - ): TypedContractMethod<[_account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transfer" - ): TypedContractMethod<[arg0: AddressLike, arg1: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike, arg2: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferStakeValues" - ): TypedContractMethod<[_sender: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "transferredAverageStakedAmounts" - ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "transferredCumulativeRewards" - ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "vestingDuration"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "withdraw"): TypedContractMethod<[], [void], "nonpayable">; - getFunction( - nameOrSignature: "withdrawToken" - ): TypedContractMethod<[_token: AddressLike, _account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent(key: "Claim"): TypedContractEvent; - getEvent( - key: "Deposit" - ): TypedContractEvent; - getEvent( - key: "PairTransfer" - ): TypedContractEvent; - getEvent( - key: "Transfer" - ): TypedContractEvent; - getEvent( - key: "Withdraw" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "Claim(address,uint256)": TypedContractEvent< - ClaimEvent.InputTuple, - ClaimEvent.OutputTuple, - ClaimEvent.OutputObject - >; - Claim: TypedContractEvent; - - "Deposit(address,uint256)": TypedContractEvent< - DepositEvent.InputTuple, - DepositEvent.OutputTuple, - DepositEvent.OutputObject - >; - Deposit: TypedContractEvent; - - "PairTransfer(address,address,uint256)": TypedContractEvent< - PairTransferEvent.InputTuple, - PairTransferEvent.OutputTuple, - PairTransferEvent.OutputObject - >; - PairTransfer: TypedContractEvent< - PairTransferEvent.InputTuple, - PairTransferEvent.OutputTuple, - PairTransferEvent.OutputObject - >; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - - "Withdraw(address,uint256,uint256)": TypedContractEvent< - WithdrawEvent.InputTuple, - WithdrawEvent.OutputTuple, - WithdrawEvent.OutputObject - >; - Withdraw: TypedContractEvent; - }; -} diff --git a/src/typechain-types/WETH.ts b/src/typechain-types/WETH.ts deleted file mode 100644 index cded32fca7..0000000000 --- a/src/typechain-types/WETH.ts +++ /dev/null @@ -1,220 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface WETHInterface extends Interface { - getFunction( - nameOrSignature: - | "allowance" - | "approve" - | "balanceOf" - | "decimals" - | "decreaseAllowance" - | "deposit" - | "increaseAllowance" - | "name" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - | "withdraw" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; - - encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "decreaseAllowance", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "deposit", values?: undefined): string; - encodeFunctionData(functionFragment: "increaseAllowance", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "withdraw", values: [BigNumberish]): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; - export interface OutputObject { - owner: string; - spender: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface WETH extends BaseContract { - connect(runner?: ContractRunner | null): WETH; - waitForDeployment(): Promise; - - interface: WETHInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - allowance: TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; - - approve: TypedContractMethod<[spender: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - - balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; - - decimals: TypedContractMethod<[], [bigint], "view">; - - decreaseAllowance: TypedContractMethod< - [spender: AddressLike, subtractedValue: BigNumberish], - [boolean], - "nonpayable" - >; - - deposit: TypedContractMethod<[], [void], "payable">; - - increaseAllowance: TypedContractMethod<[spender: AddressLike, addedValue: BigNumberish], [boolean], "nonpayable">; - - name: TypedContractMethod<[], [string], "view">; - - symbol: TypedContractMethod<[], [string], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transfer: TypedContractMethod<[recipient: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - - transferFrom: TypedContractMethod< - [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], - [boolean], - "nonpayable" - >; - - withdraw: TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">; - - getFunction(key: string | FunctionFragment): T; - - getFunction( - nameOrSignature: "allowance" - ): TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[spender: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "decreaseAllowance" - ): TypedContractMethod<[spender: AddressLike, subtractedValue: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "deposit"): TypedContractMethod<[], [void], "payable">; - getFunction( - nameOrSignature: "increaseAllowance" - ): TypedContractMethod<[spender: AddressLike, addedValue: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transfer" - ): TypedContractMethod<[recipient: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod<[sender: AddressLike, recipient: AddressLike, amount: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "withdraw"): TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent( - key: "Transfer" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - }; -} diff --git a/src/typechain-types/YieldFarm.ts b/src/typechain-types/YieldFarm.ts deleted file mode 100644 index 6da5145aeb..0000000000 --- a/src/typechain-types/YieldFarm.ts +++ /dev/null @@ -1,340 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface YieldFarmInterface extends Interface { - getFunction( - nameOrSignature: - | "addAdmin" - | "addNonStakingAccount" - | "admins" - | "allowance" - | "allowances" - | "approve" - | "balanceOf" - | "balances" - | "claim" - | "decimals" - | "gov" - | "name" - | "nonStakingAccounts" - | "nonStakingSupply" - | "recoverClaim" - | "removeAdmin" - | "removeNonStakingAccount" - | "setGov" - | "setInfo" - | "setYieldTrackers" - | "stake" - | "stakedBalance" - | "stakingToken" - | "symbol" - | "totalStaked" - | "totalSupply" - | "transfer" - | "transferFrom" - | "unstake" - | "withdrawToken" - | "yieldTrackers" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; - - encodeFunctionData(functionFragment: "addAdmin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "addNonStakingAccount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "admins", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "allowances", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "balances", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "claim", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nonStakingAccounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "nonStakingSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "recoverClaim", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "removeAdmin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "removeNonStakingAccount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setInfo", values: [string, string]): string; - encodeFunctionData(functionFragment: "setYieldTrackers", values: [AddressLike[]]): string; - encodeFunctionData(functionFragment: "stake", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "stakedBalance", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "stakingToken", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "totalStaked", values?: undefined): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "unstake", values: [BigNumberish]): string; - encodeFunctionData(functionFragment: "withdrawToken", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "yieldTrackers", values: [BigNumberish]): string; - - decodeFunctionResult(functionFragment: "addAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addNonStakingAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "admins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonStakingAccounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonStakingSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "recoverClaim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeNonStakingAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setYieldTrackers", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stake", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stakedBalance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stakingToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalStaked", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "unstake", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "yieldTrackers", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; - export interface OutputObject { - owner: string; - spender: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface YieldFarm extends BaseContract { - connect(runner?: ContractRunner | null): YieldFarm; - waitForDeployment(): Promise; - - interface: YieldFarmInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - addAdmin: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - addNonStakingAccount: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - admins: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - allowance: TypedContractMethod<[_owner: AddressLike, _spender: AddressLike], [bigint], "view">; - - allowances: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - - approve: TypedContractMethod<[_spender: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - - balanceOf: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - balances: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - claim: TypedContractMethod<[_receiver: AddressLike], [void], "nonpayable">; - - decimals: TypedContractMethod<[], [bigint], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - name: TypedContractMethod<[], [string], "view">; - - nonStakingAccounts: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - nonStakingSupply: TypedContractMethod<[], [bigint], "view">; - - recoverClaim: TypedContractMethod<[_account: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - - removeAdmin: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - removeNonStakingAccount: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setInfo: TypedContractMethod<[_name: string, _symbol: string], [void], "nonpayable">; - - setYieldTrackers: TypedContractMethod<[_yieldTrackers: AddressLike[]], [void], "nonpayable">; - - stake: TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - - stakedBalance: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - stakingToken: TypedContractMethod<[], [string], "view">; - - symbol: TypedContractMethod<[], [string], "view">; - - totalStaked: TypedContractMethod<[], [bigint], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transfer: TypedContractMethod<[_recipient: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - - transferFrom: TypedContractMethod< - [_sender: AddressLike, _recipient: AddressLike, _amount: BigNumberish], - [boolean], - "nonpayable" - >; - - unstake: TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - - withdrawToken: TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - yieldTrackers: TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "addAdmin"): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "addNonStakingAccount" - ): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "admins"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "allowance" - ): TypedContractMethod<[_owner: AddressLike, _spender: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "allowances" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[_spender: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "balances"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "claim"): TypedContractMethod<[_receiver: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "nonStakingAccounts"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "nonStakingSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "recoverClaim" - ): TypedContractMethod<[_account: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeAdmin"): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "removeNonStakingAccount" - ): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setInfo"): TypedContractMethod<[_name: string, _symbol: string], [void], "nonpayable">; - getFunction( - nameOrSignature: "setYieldTrackers" - ): TypedContractMethod<[_yieldTrackers: AddressLike[]], [void], "nonpayable">; - getFunction(nameOrSignature: "stake"): TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "stakedBalance"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "stakingToken"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "totalStaked"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transfer" - ): TypedContractMethod<[_recipient: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod< - [_sender: AddressLike, _recipient: AddressLike, _amount: BigNumberish], - [boolean], - "nonpayable" - >; - getFunction(nameOrSignature: "unstake"): TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">; - getFunction( - nameOrSignature: "withdrawToken" - ): TypedContractMethod<[_token: AddressLike, _account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "yieldTrackers"): TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent( - key: "Transfer" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - }; -} diff --git a/src/typechain-types/YieldToken.ts b/src/typechain-types/YieldToken.ts deleted file mode 100644 index 379a590a00..0000000000 --- a/src/typechain-types/YieldToken.ts +++ /dev/null @@ -1,322 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener, -} from "ethers"; -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod, -} from "./common"; - -export interface YieldTokenInterface extends Interface { - getFunction( - nameOrSignature: - | "addAdmin" - | "addNonStakingAccount" - | "admins" - | "allowance" - | "allowances" - | "approve" - | "balanceOf" - | "balances" - | "claim" - | "decimals" - | "gov" - | "name" - | "nonStakingAccounts" - | "nonStakingSupply" - | "recoverClaim" - | "removeAdmin" - | "removeNonStakingAccount" - | "setGov" - | "setInfo" - | "setYieldTrackers" - | "stakedBalance" - | "symbol" - | "totalStaked" - | "totalSupply" - | "transfer" - | "transferFrom" - | "withdrawToken" - | "yieldTrackers" - ): FunctionFragment; - - getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; - - encodeFunctionData(functionFragment: "addAdmin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "addNonStakingAccount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "admins", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "allowances", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "balances", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "claim", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "gov", values?: undefined): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nonStakingAccounts", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "nonStakingSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "recoverClaim", values: [AddressLike, AddressLike]): string; - encodeFunctionData(functionFragment: "removeAdmin", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "removeNonStakingAccount", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setGov", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "setInfo", values: [string, string]): string; - encodeFunctionData(functionFragment: "setYieldTrackers", values: [AddressLike[]]): string; - encodeFunctionData(functionFragment: "stakedBalance", values: [AddressLike]): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData(functionFragment: "totalStaked", values?: undefined): string; - encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; - encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "withdrawToken", values: [AddressLike, AddressLike, BigNumberish]): string; - encodeFunctionData(functionFragment: "yieldTrackers", values: [BigNumberish]): string; - - decodeFunctionResult(functionFragment: "addAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addNonStakingAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "admins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "gov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonStakingAccounts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonStakingSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "recoverClaim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeAdmin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "removeNonStakingAccount", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGov", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setInfo", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setYieldTrackers", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "stakedBalance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalStaked", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "withdrawToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "yieldTrackers", data: BytesLike): Result; -} - -export namespace ApprovalEvent { - export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; - export interface OutputObject { - owner: string; - spender: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace TransferEvent { - export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; - export type OutputTuple = [from: string, to: string, value: bigint]; - export interface OutputObject { - from: string; - to: string; - value: bigint; - } - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export interface YieldToken extends BaseContract { - connect(runner?: ContractRunner | null): YieldToken; - waitForDeployment(): Promise; - - interface: YieldTokenInterface; - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - on(event: TCEvent, listener: TypedListener): Promise; - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - once(event: TCEvent, listener: TypedListener): Promise; - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise; - - listeners(event: TCEvent): Promise>>; - listeners(eventName?: string): Promise>; - removeAllListeners(event?: TCEvent): Promise; - - addAdmin: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - addNonStakingAccount: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - admins: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - allowance: TypedContractMethod<[_owner: AddressLike, _spender: AddressLike], [bigint], "view">; - - allowances: TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - - approve: TypedContractMethod<[_spender: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - - balanceOf: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - balances: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - - claim: TypedContractMethod<[_receiver: AddressLike], [void], "nonpayable">; - - decimals: TypedContractMethod<[], [bigint], "view">; - - gov: TypedContractMethod<[], [string], "view">; - - name: TypedContractMethod<[], [string], "view">; - - nonStakingAccounts: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - - nonStakingSupply: TypedContractMethod<[], [bigint], "view">; - - recoverClaim: TypedContractMethod<[_account: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - - removeAdmin: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - removeNonStakingAccount: TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - - setGov: TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - - setInfo: TypedContractMethod<[_name: string, _symbol: string], [void], "nonpayable">; - - setYieldTrackers: TypedContractMethod<[_yieldTrackers: AddressLike[]], [void], "nonpayable">; - - stakedBalance: TypedContractMethod<[_account: AddressLike], [bigint], "view">; - - symbol: TypedContractMethod<[], [string], "view">; - - totalStaked: TypedContractMethod<[], [bigint], "view">; - - totalSupply: TypedContractMethod<[], [bigint], "view">; - - transfer: TypedContractMethod<[_recipient: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - - transferFrom: TypedContractMethod< - [_sender: AddressLike, _recipient: AddressLike, _amount: BigNumberish], - [boolean], - "nonpayable" - >; - - withdrawToken: TypedContractMethod< - [_token: AddressLike, _account: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; - - yieldTrackers: TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - getFunction(key: string | FunctionFragment): T; - - getFunction(nameOrSignature: "addAdmin"): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "addNonStakingAccount" - ): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "admins"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction( - nameOrSignature: "allowance" - ): TypedContractMethod<[_owner: AddressLike, _spender: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "allowances" - ): TypedContractMethod<[arg0: AddressLike, arg1: AddressLike], [bigint], "view">; - getFunction( - nameOrSignature: "approve" - ): TypedContractMethod<[_spender: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "balances"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "claim"): TypedContractMethod<[_receiver: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "gov"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "nonStakingAccounts"): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - getFunction(nameOrSignature: "nonStakingSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "recoverClaim" - ): TypedContractMethod<[_account: AddressLike, _receiver: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "removeAdmin"): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "removeNonStakingAccount" - ): TypedContractMethod<[_account: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setGov"): TypedContractMethod<[_gov: AddressLike], [void], "nonpayable">; - getFunction(nameOrSignature: "setInfo"): TypedContractMethod<[_name: string, _symbol: string], [void], "nonpayable">; - getFunction( - nameOrSignature: "setYieldTrackers" - ): TypedContractMethod<[_yieldTrackers: AddressLike[]], [void], "nonpayable">; - getFunction(nameOrSignature: "stakedBalance"): TypedContractMethod<[_account: AddressLike], [bigint], "view">; - getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; - getFunction(nameOrSignature: "totalStaked"): TypedContractMethod<[], [bigint], "view">; - getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "transfer" - ): TypedContractMethod<[_recipient: AddressLike, _amount: BigNumberish], [boolean], "nonpayable">; - getFunction( - nameOrSignature: "transferFrom" - ): TypedContractMethod< - [_sender: AddressLike, _recipient: AddressLike, _amount: BigNumberish], - [boolean], - "nonpayable" - >; - getFunction( - nameOrSignature: "withdrawToken" - ): TypedContractMethod<[_token: AddressLike, _account: AddressLike, _amount: BigNumberish], [void], "nonpayable">; - getFunction(nameOrSignature: "yieldTrackers"): TypedContractMethod<[arg0: BigNumberish], [string], "view">; - - getEvent( - key: "Approval" - ): TypedContractEvent; - getEvent( - key: "Transfer" - ): TypedContractEvent; - - filters: { - "Approval(address,address,uint256)": TypedContractEvent< - ApprovalEvent.InputTuple, - ApprovalEvent.OutputTuple, - ApprovalEvent.OutputObject - >; - Approval: TypedContractEvent; - - "Transfer(address,address,uint256)": TypedContractEvent< - TransferEvent.InputTuple, - TransferEvent.OutputTuple, - TransferEvent.OutputObject - >; - Transfer: TypedContractEvent; - }; -} diff --git a/src/typechain-types/common.ts b/src/typechain-types/common.ts deleted file mode 100644 index e951924406..0000000000 --- a/src/typechain-types/common.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - FunctionFragment, - Typed, - EventFragment, - ContractTransaction, - ContractTransactionResponse, - DeferredTopicFilter, - EventLog, - TransactionRequest, - LogDescription, -} from "ethers"; - -export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {} - -export interface TypedContractEvent< - InputTuple extends Array = any, - OutputTuple extends Array = any, - OutputObject = any, -> { - (...args: Partial): TypedDeferredTopicFilter>; - name: string; - fragment: EventFragment; - getFragment(...args: Partial): EventFragment; -} - -type __TypechainAOutputTuple = T extends TypedContractEvent ? W : never; -type __TypechainOutputObject = T extends TypedContractEvent ? V : never; - -export interface TypedEventLog extends Omit { - args: __TypechainAOutputTuple & __TypechainOutputObject; -} - -export interface TypedLogDescription extends Omit { - args: __TypechainAOutputTuple & __TypechainOutputObject; -} - -export type TypedListener = ( - ...listenerArg: [...__TypechainAOutputTuple, TypedEventLog, ...undefined[]] -) => void; - -export type MinEthersFactory = { - deploy(...a: ARGS[]): Promise; -}; - -export type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never; -export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; - -export type StateMutability = "nonpayable" | "payable" | "view"; - -export type BaseOverrides = Omit; -export type NonPayableOverrides = Omit; -export type PayableOverrides = Omit; -export type ViewOverrides = Omit; -export type Overrides = S extends "nonpayable" - ? NonPayableOverrides - : S extends "payable" - ? PayableOverrides - : ViewOverrides; - -export type PostfixOverrides, S extends StateMutability> = A | [...A, Overrides]; -export type ContractMethodArgs, S extends StateMutability> = PostfixOverrides< - { [I in keyof A]-?: A[I] | Typed }, - S ->; - -export type DefaultReturnType = R extends Array ? R[0] : R; - -// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { -export interface TypedContractMethod< - A extends Array = Array, - R = any, - S extends StateMutability = "payable", -> { - ( - ...args: ContractMethodArgs - ): S extends "view" ? Promise> : Promise; - - name: string; - - fragment: FunctionFragment; - - getFragment(...args: ContractMethodArgs): FunctionFragment; - - populateTransaction(...args: ContractMethodArgs): Promise; - staticCall(...args: ContractMethodArgs): Promise>; - send(...args: ContractMethodArgs): Promise; - estimateGas(...args: ContractMethodArgs): Promise; - staticCallResult(...args: ContractMethodArgs): Promise; -} diff --git a/src/typechain-types/factories/ArbitrumNodeInterface__factory.ts b/src/typechain-types/factories/ArbitrumNodeInterface__factory.ts deleted file mode 100644 index 6146ee935f..0000000000 --- a/src/typechain-types/factories/ArbitrumNodeInterface__factory.ts +++ /dev/null @@ -1,294 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { ArbitrumNodeInterface, ArbitrumNodeInterfaceInterface } from "../ArbitrumNodeInterface"; - -const _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", - }, -] as const; - -export class ArbitrumNodeInterface__factory { - static readonly abi = _abi; - static createInterface(): ArbitrumNodeInterfaceInterface { - return new Interface(_abi) as ArbitrumNodeInterfaceInterface; - } - static connect(address: string, runner?: ContractRunner | null): ArbitrumNodeInterface { - return new Contract(address, _abi, runner) as unknown as ArbitrumNodeInterface; - } -} diff --git a/src/typechain-types/factories/ClaimHandler__factory.ts b/src/typechain-types/factories/ClaimHandler__factory.ts deleted file mode 100644 index b6282a7fe1..0000000000 --- a/src/typechain-types/factories/ClaimHandler__factory.ts +++ /dev/null @@ -1,439 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { ClaimHandler, ClaimHandlerInterface } from "../ClaimHandler"; - -const _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", - }, -] as const; - -export class ClaimHandler__factory { - static readonly abi = _abi; - static createInterface(): ClaimHandlerInterface { - return new Interface(_abi) as ClaimHandlerInterface; - } - static connect(address: string, runner?: ContractRunner | null): ClaimHandler { - return new Contract(address, _abi, runner) as unknown as ClaimHandler; - } -} diff --git a/src/typechain-types/factories/CustomErrors__factory.ts b/src/typechain-types/factories/CustomErrors__factory.ts deleted file mode 100644 index ba1b9c9e55..0000000000 --- a/src/typechain-types/factories/CustomErrors__factory.ts +++ /dev/null @@ -1,4447 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { CustomErrors, CustomErrorsInterface } from "../CustomErrors"; - -const _abi = [ - { - inputs: [], - name: "ActionAlreadySignalled", - type: "error", - }, - { - inputs: [], - name: "ActionNotSignalled", - type: "error", - }, - { - inputs: [], - name: "AdlNotEnabled", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "pnlToPoolFactor", - type: "int256", - }, - { - internalType: "uint256", - name: "maxPnlFactorForAdl", - type: "uint256", - }, - ], - name: "AdlNotRequired", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes[]", - name: "values", - type: "bytes[]", - }, - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - { - internalType: "string", - name: "label", - type: "string", - }, - ], - name: "ArrayOutOfBoundsBytes", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256[]", - name: "values", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - { - internalType: "string", - name: "label", - type: "string", - }, - ], - 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: [ - { - internalType: "uint256", - name: "minOracleBlockNumber", - type: "uint256", - }, - { - internalType: "uint256", - name: "prevMinOracleBlockNumber", - type: "uint256", - }, - ], - 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: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "timestamp", - type: "uint256", - }, - { - internalType: "uint256", - name: "heartbeatDuration", - type: "uint256", - }, - ], - name: "ChainlinkPriceFeedNotUpdated", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "adjustedClaimableAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "claimedAmount", - type: "uint256", - }, - ], - name: "CollateralAlreadyClaimed", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256[]", - name: "compactedValues", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - { - internalType: "uint256", - name: "slotIndex", - type: "uint256", - }, - { - internalType: "string", - name: "label", - type: "string", - }, - ], - name: "CompactedArrayOutOfBounds", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "baseKey", - type: "bytes32", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "ConfigValueExceedsAllowedRange", - type: "error", - }, - { - inputs: [], - name: "DataListLengthExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "DataStreamIdAlreadyExistsForToken", - 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: "DepositNotFound", - 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: "uint256", - name: "existingDistributionId", - type: "uint256", - }, - ], - name: "DuplicateClaimTerms", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - { - internalType: "string", - name: "label", - type: "string", - }, - ], - name: "DuplicatedIndex", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "DuplicatedMarketInSwapPath", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "EdgeDataStreamIdAlreadyExistsForToken", - type: "error", - }, - { - inputs: [], - name: "EmptyAccount", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "EmptyAddressInMarketTokenBalanceValidation", - type: "error", - }, - { - inputs: [], - name: "EmptyAmount", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "EmptyChainlinkPriceFeed", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "EmptyChainlinkPriceFeedMultiplier", - type: "error", - }, - { - inputs: [], - name: "EmptyClaimFeesMarket", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "EmptyClaimableAmount", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "EmptyDataStreamFeedId", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "EmptyDataStreamMultiplier", - type: "error", - }, - { - inputs: [], - name: "EmptyDeposit", - type: "error", - }, - { - inputs: [], - name: "EmptyDepositAmounts", - type: "error", - }, - { - inputs: [], - name: "EmptyDepositAmountsAfterSwap", - type: "error", - }, - { - inputs: [], - name: "EmptyFundingAccount", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - ], - name: "EmptyGlv", - type: "error", - }, - { - inputs: [], - name: "EmptyGlvDeposit", - type: "error", - }, - { - inputs: [], - name: "EmptyGlvDepositAmounts", - type: "error", - }, - { - inputs: [], - name: "EmptyGlvMarketAmount", - type: "error", - }, - { - inputs: [], - name: "EmptyGlvTokenSupply", - type: "error", - }, - { - inputs: [], - name: "EmptyGlvWithdrawal", - type: "error", - }, - { - inputs: [], - name: "EmptyGlvWithdrawalAmount", - type: "error", - }, - { - inputs: [], - name: "EmptyHoldingAddress", - type: "error", - }, - { - inputs: [], - 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", - type: "error", - }, - { - inputs: [], - name: "EmptyPosition", - type: "error", - }, - { - inputs: [], - name: "EmptyPositionImpactWithdrawalAmount", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "EmptyPrimaryPrice", - type: "error", - }, - { - inputs: [], - name: "EmptyReceiver", - type: "error", - }, - { - inputs: [], - name: "EmptyReduceLentAmount", - type: "error", - }, - { - inputs: [], - name: "EmptyRelayFeeAddress", - type: "error", - }, - { - inputs: [], - name: "EmptyShift", - type: "error", - }, - { - inputs: [], - name: "EmptyShiftAmount", - type: "error", - }, - { - inputs: [], - name: "EmptySizeDeltaInTokens", - type: "error", - }, - { - inputs: [], - name: "EmptyTarget", - type: "error", - }, - { - inputs: [], - name: "EmptyToken", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "EmptyTokenTranferGasLimit", - type: "error", - }, - { - inputs: [], - name: "EmptyValidatedPrices", - type: "error", - }, - { - inputs: [], - name: "EmptyWithdrawal", - type: "error", - }, - { - inputs: [], - name: "EmptyWithdrawalAmount", - type: "error", - }, - { - inputs: [], - name: "EndOfOracleSimulation", - type: "error", - }, - { - inputs: [ - { - internalType: "string", - name: "key", - type: "string", - }, - ], - name: "EventItemNotFound", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "ExternalCallFailed", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "FeeBatchNotFound", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "address", - name: "glv", - type: "address", - }, - ], - name: "GlvAlreadyExists", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "GlvDepositNotFound", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "GlvDisabledMarket", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "GlvEnabledMarket", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "uint256", - name: "marketTokenBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "marketTokenAmount", - type: "uint256", - }, - ], - name: "GlvInsufficientMarketTokenBalance", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "address", - name: "provided", - type: "address", - }, - { - internalType: "address", - name: "expected", - type: "address", - }, - ], - name: "GlvInvalidLongToken", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "address", - name: "provided", - type: "address", - }, - { - internalType: "address", - name: "expected", - type: "address", - }, - ], - name: "GlvInvalidShortToken", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "GlvMarketAlreadyExists", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "uint256", - name: "glvMaxMarketCount", - type: "uint256", - }, - ], - name: "GlvMaxMarketCountExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "uint256", - name: "maxMarketTokenBalanceAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "marketTokenBalanceAmount", - type: "uint256", - }, - ], - name: "GlvMaxMarketTokenBalanceAmountExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "uint256", - name: "maxMarketTokenBalanceUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "marketTokenBalanceUsd", - type: "uint256", - }, - ], - name: "GlvMaxMarketTokenBalanceUsdExceeded", - type: "error", - }, - { - inputs: [], - name: "GlvNameTooLong", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "GlvNegativeMarketPoolValue", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "GlvNonZeroMarketBalance", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "key", - type: "address", - }, - ], - name: "GlvNotFound", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", - }, - { - internalType: "uint256", - name: "lastGlvShiftExecutedAt", - type: "uint256", - }, - { - internalType: "uint256", - name: "glvShiftMinInterval", - type: "uint256", - }, - ], - name: "GlvShiftIntervalNotYetPassed", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "effectivePriceImpactFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "glvMaxShiftPriceImpactFactor", - type: "uint256", - }, - ], - name: "GlvShiftMaxPriceImpactExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "GlvShiftNotFound", - type: "error", - }, - { - inputs: [], - name: "GlvSymbolTooLong", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "glv", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "GlvUnsupportedMarket", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "GlvWithdrawalNotFound", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "signerIndex", - type: "uint256", - }, - ], - name: "GmEmptySigner", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "minOracleBlockNumber", - type: "uint256", - }, - { - internalType: "uint256", - name: "currentBlockNumber", - type: "uint256", - }, - ], - name: "GmInvalidBlockNumber", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "minOracleBlockNumber", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxOracleBlockNumber", - type: "uint256", - }, - ], - name: "GmInvalidMinMaxBlockNumber", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "oracleSigners", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxOracleSigners", - type: "uint256", - }, - ], - name: "GmMaxOracleSigners", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "price", - type: "uint256", - }, - { - internalType: "uint256", - name: "prevPrice", - type: "uint256", - }, - ], - name: "GmMaxPricesNotSorted", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "signerIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxSignerIndex", - type: "uint256", - }, - ], - name: "GmMaxSignerIndex", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "oracleSigners", - type: "uint256", - }, - { - internalType: "uint256", - name: "minOracleSigners", - type: "uint256", - }, - ], - name: "GmMinOracleSigners", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "price", - type: "uint256", - }, - { - internalType: "uint256", - name: "prevPrice", - type: "uint256", - }, - ], - 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: [ - { - internalType: "uint256", - name: "collateralAmount", - type: "uint256", - }, - { - internalType: "int256", - name: "collateralDeltaAmount", - type: "int256", - }, - ], - name: "InsufficientCollateralAmount", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "remainingCollateralUsd", - type: "int256", - }, - ], - name: "InsufficientCollateralUsd", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "minExecutionFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - name: "InsufficientExecutionFee", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "startingGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "estimatedGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "minAdditionalGasForExecution", - type: "uint256", - }, - ], - name: "InsufficientExecutionGas", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "startingGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "minHandleErrorGas", - type: "uint256", - }, - ], - 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: [ - { - internalType: "uint256", - name: "remainingCostUsd", - type: "uint256", - }, - { - internalType: "string", - name: "step", - type: "string", - }, - ], - name: "InsufficientFundsToPayForCosts", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "gas", - type: "uint256", - }, - { - internalType: "uint256", - name: "minHandleExecutionErrorGas", - type: "uint256", - }, - ], - name: "InsufficientGasForAutoCancellation", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "gas", - type: "uint256", - }, - { - internalType: "uint256", - name: "minHandleExecutionErrorGas", - type: "uint256", - }, - ], - name: "InsufficientGasForCancellation", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "gas", - type: "uint256", - }, - { - internalType: "uint256", - name: "estimatedGasLimit", - type: "uint256", - }, - ], - name: "InsufficientGasLeft", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "gasToBeForwarded", - type: "uint256", - }, - { - internalType: "uint256", - name: "callbackGasLimit", - type: "uint256", - }, - ], - name: "InsufficientGasLeftForCallback", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "gas", - type: "uint256", - }, - { - internalType: "uint256", - name: "minHandleExecutionErrorGas", - type: "uint256", - }, - ], - 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: [ - { - internalType: "uint256", - name: "balance", - type: "uint256", - }, - { - internalType: "uint256", - name: "expected", - type: "uint256", - }, - ], - 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: [ - { - internalType: "uint256", - name: "outputAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "minOutputAmount", - type: "uint256", - }, - ], - name: "InsufficientOutputAmount", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "poolAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "InsufficientPoolAmount", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "requiredRelayFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "availableFeeAmount", - type: "uint256", - }, - ], - name: "InsufficientRelayFee", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "reservedUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxReservedUsd", - type: "uint256", - }, - ], - name: "InsufficientReserve", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "reservedUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxReservedUsd", - type: "uint256", - }, - ], - name: "InsufficientReserveForOpenInterest", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "outputAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "minOutputAmount", - type: "uint256", - }, - ], - name: "InsufficientSwapOutputAmount", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "wntAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - name: "InsufficientWntAmountForExecutionFee", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "nextPnlToPoolFactor", - type: "int256", - }, - { - internalType: "int256", - name: "pnlToPoolFactor", - type: "int256", - }, - ], - name: "InvalidAdl", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "remainingAmount", - type: "uint256", - }, - ], - name: "InvalidAmountInForFeeBatch", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "baseKey", - type: "bytes32", - }, - ], - name: "InvalidBaseKey", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "largestMinBlockNumber", - type: "uint256", - }, - { - internalType: "uint256", - name: "smallestMaxBlockNumber", - type: "uint256", - }, - ], - 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: [ - { - internalType: "uint256", - name: "marketsLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "tokensLength", - type: "uint256", - }, - ], - name: "InvalidClaimAffiliateRewardsInput", - 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: "marketsLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "tokensLength", - type: "uint256", - }, - ], - name: "InvalidClaimFundingFeesInput", - 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: "uint256", - name: "marketsLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "tokensLength", - type: "uint256", - }, - ], - name: "InvalidClaimUiFeesInput", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "InvalidClaimableFactor", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "InvalidClaimableReductionFactor", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "InvalidCollateralTokenForMarket", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "InvalidContributorToken", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "int192", - name: "bid", - type: "int192", - }, - { - internalType: "int192", - name: "ask", - type: "int192", - }, - ], - name: "InvalidDataStreamBidAsk", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "bytes32", - name: "feedId", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "expectedFeedId", - type: "bytes32", - }, - ], - name: "InvalidDataStreamFeedId", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "int192", - name: "bid", - type: "int192", - }, - { - internalType: "int192", - name: "ask", - type: "int192", - }, - ], - name: "InvalidDataStreamPrices", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "spreadReductionFactor", - type: "uint256", - }, - ], - name: "InvalidDataStreamSpreadReductionFactor", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "sizeDeltaUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionSizeInUsd", - type: "uint256", - }, - ], - name: "InvalidDecreaseOrderSize", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "decreasePositionSwapType", - type: "uint256", - }, - ], - 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: [ - { - internalType: "uint256", - name: "totalExecutionFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "msgValue", - type: "uint256", - }, - ], - name: "InvalidExecutionFeeForMigration", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "targetsLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "dataListLength", - type: "uint256", - }, - ], - name: "InvalidExternalCallInput", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - ], - name: "InvalidExternalCallTarget", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "sendTokensLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "sendAmountsLength", - type: "uint256", - }, - ], - name: "InvalidExternalCalls", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "refundTokensLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "refundReceiversLength", - type: "uint256", - }, - ], - name: "InvalidExternalReceiversInput", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeBatchTokensLength", - type: "uint256", - }, - ], - name: "InvalidFeeBatchTokenIndex", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - ], - name: "InvalidFeeReceiver", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "int256", - name: "price", - type: "int256", - }, - ], - name: "InvalidFeedPrice", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "totalGlpAmountToRedeem", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalGlpAmount", - type: "uint256", - }, - ], - name: "InvalidGlpAmount", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "initialLongToken", - type: "address", - }, - ], - name: "InvalidGlvDepositInitialLongToken", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "initialShortToken", - type: "address", - }, - ], - name: "InvalidGlvDepositInitialShortToken", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "longTokenSwapPathLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortTokenSwapPathLength", - type: "uint256", - }, - ], - name: "InvalidGlvDepositSwapPath", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "minPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPrice", - type: "uint256", - }, - ], - name: "InvalidGmMedianMinMaxPrice", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "InvalidGmOraclePrice", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "recoveredSigner", - type: "address", - }, - { - internalType: "address", - name: "expectedSigner", - type: "address", - }, - ], - name: "InvalidGmSignature", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "minPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPrice", - type: "uint256", - }, - ], - name: "InvalidGmSignerMinMaxPrice", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "InvalidHoldingAddress", - type: "error", - }, - { - inputs: [], - name: "InvalidInitializer", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "keeper", - type: "address", - }, - ], - name: "InvalidKeeperForFrozenOrder", - 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: "uint256", - name: "minGlvTokens", - type: "uint256", - }, - { - internalType: "uint256", - name: "expectedMinGlvTokens", - type: "uint256", - }, - ], - name: "InvalidMinGlvTokensForFirstGlvDeposit", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "minMarketTokens", - type: "uint256", - }, - { - internalType: "uint256", - name: "expectedMinMarketTokens", - type: "uint256", - }, - ], - name: "InvalidMinMarketTokensForFirstDeposit", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - 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: [ - { - internalType: "address", - name: "msgSender", - type: "address", - }, - ], - name: "InvalidNativeTokenSender", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "provider", - type: "address", - }, - ], - name: "InvalidOracleProvider", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "provider", - type: "address", - }, - { - internalType: "address", - name: "expectedProvider", - type: "address", - }, - ], - name: "InvalidOracleProviderForToken", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokensLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "dataLength", - type: "uint256", - }, - ], - name: "InvalidOracleSetPricesDataParam", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokensLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "providersLength", - type: "uint256", - }, - ], - name: "InvalidOracleSetPricesProvidersParam", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "signer", - type: "address", - }, - ], - name: "InvalidOracleSigner", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "primaryPriceMin", - type: "uint256", - }, - { - internalType: "uint256", - name: "primaryPriceMax", - type: "uint256", - }, - { - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "orderType", - type: "uint256", - }, - ], - name: "InvalidOrderPrices", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenOut", - type: "address", - }, - { - internalType: "address", - name: "expectedTokenOut", - type: "address", - }, - ], - 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: [ - { - internalType: "int256", - name: "poolValue", - type: "int256", - }, - ], - name: "InvalidPoolValueForDeposit", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "poolValue", - type: "int256", - }, - ], - name: "InvalidPoolValueForWithdrawal", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "distributionAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionImpactPoolAmount", - type: "uint256", - }, - ], - name: "InvalidPositionImpactPoolDistributionRate", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "InvalidPositionMarket", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "sizeInUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "sizeInTokens", - type: "uint256", - }, - ], - name: "InvalidPositionSizeValues", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "primaryTokensLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "primaryPricesLength", - type: "uint256", - }, - ], - name: "InvalidPrimaryPricesForSimulation", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - ], - name: "InvalidReceiver", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - { - internalType: "address", - name: "expectedReceiver", - type: "address", - }, - ], - name: "InvalidReceiverForFirstDeposit", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - { - internalType: "address", - name: "expectedReceiver", - type: "address", - }, - ], - name: "InvalidReceiverForFirstGlvDeposit", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - { - internalType: "address", - name: "expectedReceiver", - type: "address", - }, - ], - 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: [ - { - internalType: "uint256", - name: "sizeDeltaUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionSizeInUsd", - type: "uint256", - }, - ], - 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: [ - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "InvalidSwapMarket", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "outputToken", - type: "address", - }, - { - internalType: "address", - name: "expectedOutputToken", - type: "address", - }, - ], - name: "InvalidSwapOutputToken", - type: "error", - }, - { - inputs: [ - { - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - internalType: "address", - name: "bridgingToken", - type: "address", - }, - ], - name: "InvalidSwapPathForV1", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "timelockDelay", - type: "uint256", - }, - ], - name: "InvalidTimelockDelay", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "InvalidToken", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "InvalidTokenIn", - type: "error", - }, - { - inputs: [], - name: "InvalidTransferRequestsLength", - type: "error", - }, - { - inputs: [], - name: "InvalidTrustedSignerAddress", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "uiFeeFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxUiFeeFactor", - type: "uint256", - }, - ], - 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: [ - { - internalType: "string", - name: "reason", - type: "string", - }, - { - internalType: "int256", - name: "remainingCollateralUsd", - type: "int256", - }, - { - internalType: "int256", - name: "minCollateralUsd", - type: "int256", - }, - { - internalType: "int256", - name: "minCollateralUsdForLeverage", - type: "int256", - }, - ], - name: "LiquidatablePosition", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "fromMarketLongToken", - type: "address", - }, - { - internalType: "address", - name: "toMarketLongToken", - type: "address", - }, - ], - name: "LongTokensAreNotEqual", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "address", - name: "existingMarketAddress", - type: "address", - }, - ], - name: "MarketAlreadyExists", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "key", - type: "address", - }, - ], - name: "MarketNotFound", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - { - internalType: "string", - name: "label", - type: "string", - }, - ], - name: "MaskIndexOutOfBounds", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "count", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxAutoCancelOrders", - type: "uint256", - }, - ], - 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: [ - { - internalType: "uint256", - name: "callbackGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxCallbackGasLimit", - type: "uint256", - }, - ], - name: "MaxCallbackGasLimitExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "dataLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxDataLength", - type: "uint256", - }, - ], - name: "MaxDataListLengthExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "maxFundingFactorPerSecond", - type: "uint256", - }, - { - internalType: "uint256", - name: "limit", - type: "uint256", - }, - ], - 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: [ - { - internalType: "uint256", - name: "openInterest", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxOpenInterest", - type: "uint256", - }, - ], - name: "MaxOpenInterestExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "range", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxRange", - type: "uint256", - }, - ], - name: "MaxOracleTimestampRangeExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "poolAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPoolAmount", - type: "uint256", - }, - ], - name: "MaxPoolAmountExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "poolUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPoolUsdForDeposit", - type: "uint256", - }, - ], - name: "MaxPoolUsdForDepositExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "oracleTimestamp", - type: "uint256", - }, - { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", - }, - ], - name: "MaxPriceAgeExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "price", - type: "uint256", - }, - { - internalType: "uint256", - name: "refPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxRefPriceDeviationFactor", - type: "uint256", - }, - ], - name: "MaxRefPriceDeviationExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "feeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxFeeUsd", - type: "uint256", - }, - ], - name: "MaxRelayFeeSwapForSubaccountExceeded", - 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: "uint256", - name: "swapPathLengh", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxSwapPathLength", - type: "uint256", - }, - ], - name: "MaxSwapPathLengthExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "timelockDelay", - type: "uint256", - }, - ], - name: "MaxTimelockDelayExceeded", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "totalCallbackGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxTotalCallbackGasLimit", - type: "uint256", - }, - ], - 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: [ - { - internalType: "uint256", - name: "received", - type: "uint256", - }, - { - internalType: "uint256", - name: "expected", - type: "uint256", - }, - ], - name: "MinGlvTokens", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "received", - type: "uint256", - }, - { - internalType: "uint256", - name: "expected", - type: "uint256", - }, - ], - name: "MinLongTokens", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "received", - type: "uint256", - }, - { - internalType: "uint256", - name: "expected", - type: "uint256", - }, - ], - name: "MinMarketTokens", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "positionSizeInUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "minPositionSizeUsd", - type: "uint256", - }, - ], - name: "MinPositionSize", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "received", - type: "uint256", - }, - { - internalType: "uint256", - name: "expected", - type: "uint256", - }, - ], - name: "MinShortTokens", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "executionPrice", - type: "int256", - }, - { - internalType: "uint256", - name: "price", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionSizeInUsd", - type: "uint256", - }, - { - internalType: "int256", - name: "priceImpactUsd", - type: "int256", - }, - { - internalType: "uint256", - name: "sizeDeltaUsd", - type: "uint256", - }, - ], - name: "NegativeExecutionPrice", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "provider", - type: "address", - }, - ], - name: "NonAtomicOracleProvider", - type: "error", - }, - { - inputs: [], - name: "NonEmptyExternalCallsForSubaccountOrder", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokensWithPricesLength", - type: "uint256", - }, - ], - name: "NonEmptyTokensWithPrices", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "OpenInterestCannotBeUpdatedForSwapOnlyMarket", - type: "error", - }, - { - inputs: [], - name: "OraclePriceOutdated", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "oracle", - type: "address", - }, - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "OracleProviderAlreadyExistsForToken", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "address", - name: "provider", - type: "address", - }, - ], - name: "OracleProviderMinChangeDelayNotYetPassed", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "maxOracleTimestamp", - type: "uint256", - }, - { - internalType: "uint256", - name: "requestTimestamp", - type: "uint256", - }, - { - internalType: "uint256", - name: "requestExpirationTime", - type: "uint256", - }, - ], - name: "OracleTimestampsAreLargerThanRequestExpirationTime", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "minOracleTimestamp", - type: "uint256", - }, - { - internalType: "uint256", - name: "expectedTimestamp", - type: "uint256", - }, - ], - name: "OracleTimestampsAreSmallerThanRequired", - type: "error", - }, - { - inputs: [], - name: "OrderAlreadyFrozen", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "OrderNotFound", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "price", - type: "uint256", - }, - { - internalType: "uint256", - name: "acceptablePrice", - type: "uint256", - }, - ], - name: "OrderNotFulfillableAtAcceptablePrice", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "orderType", - type: "uint256", - }, - ], - name: "OrderNotUpdatable", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "orderType", - type: "uint256", - }, - ], - name: "OrderTypeCannotBeCreated", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "validFromTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", - }, - ], - name: "OrderValidFromTimeNotReached", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "pnlToPoolFactor", - type: "int256", - }, - { - internalType: "uint256", - name: "maxPnlFactor", - type: "uint256", - }, - ], - name: "PnlFactorExceededForLongs", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "pnlToPoolFactor", - type: "int256", - }, - { - internalType: "uint256", - name: "maxPnlFactor", - type: "uint256", - }, - ], - name: "PnlFactorExceededForShorts", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "nextPnlToPoolFactor", - type: "int256", - }, - { - internalType: "uint256", - name: "minPnlFactorForAdl", - type: "uint256", - }, - ], - name: "PnlOvercorrected", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "PositionNotFound", - type: "error", - }, - { - inputs: [ - { - internalType: "string", - name: "reason", - type: "string", - }, - { - internalType: "int256", - name: "remainingCollateralUsd", - type: "int256", - }, - { - internalType: "int256", - name: "minCollateralUsd", - type: "int256", - }, - { - internalType: "int256", - name: "minCollateralUsdForLeverage", - type: "int256", - }, - ], - name: "PositionShouldNotBeLiquidated", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "minPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPrice", - type: "uint256", - }, - ], - name: "PriceAlreadySet", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "PriceFeedAlreadyExistsForToken", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "priceImpactUsd", - type: "int256", - }, - { - internalType: "uint256", - name: "sizeDeltaUsd", - type: "uint256", - }, - ], - 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: [ - { - internalType: "uint256", - name: "requestAge", - type: "uint256", - }, - { - internalType: "uint256", - name: "requestExpirationAge", - type: "uint256", - }, - { - internalType: "string", - name: "requestType", - type: "string", - }, - ], - name: "RequestNotYetCancellable", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - ], - name: "SelfTransferNotSupported", - type: "error", - }, - { - inputs: [], - name: "SequencerDown", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "timeSinceUp", - type: "uint256", - }, - { - internalType: "uint256", - name: "sequencerGraceDuration", - type: "uint256", - }, - ], - name: "SequencerGraceDurationNotYetPassed", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "ShiftFromAndToMarketAreEqual", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "ShiftNotFound", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "fromMarketLongToken", - type: "address", - }, - { - internalType: "address", - name: "toMarketLongToken", - type: "address", - }, - ], - name: "ShortTokensAreNotEqual", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "signalTime", - type: "uint256", - }, - ], - 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: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "subaccount", - type: "address", - }, - ], - name: "SubaccountNotAuthorized", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amountAfterFees", - type: "uint256", - }, - { - internalType: "int256", - name: "negativeImpactAmount", - type: "int256", - }, - ], - name: "SwapPriceImpactExceedsAmountIn", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "longTokenSwapPathLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortTokenSwapPathLength", - type: "uint256", - }, - ], - 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", - type: "error", - }, - { - inputs: [], - name: "ThereMustBeAtLeastOneTimelockMultiSig", - 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: "uint256", - name: "length", - type: "uint256", - }, - ], - name: "Uint256AsBytesLengthExceeds32Bytes", - type: "error", - }, - { - inputs: [], - name: "UnableToGetBorrowingFactorEmptyPoolUsd", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "UnableToGetCachedTokenPrice", - type: "error", - }, - { - inputs: [], - name: "UnableToGetFundingFactorEmptyOpenInterest", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "inputToken", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "UnableToGetOppositeToken", - type: "error", - }, - { - inputs: [], - name: "UnableToPayOrderFee", - type: "error", - }, - { - inputs: [], - name: "UnableToPayOrderFeeFromCollateral", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "estimatedRemainingCollateralUsd", - type: "int256", - }, - ], - name: "UnableToWithdrawCollateral", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "msgSender", - type: "address", - }, - { - internalType: "string", - name: "role", - type: "string", - }, - ], - name: "Unauthorized", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "positionBorrowingFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "cumulativeBorrowingFactor", - type: "uint256", - }, - ], - name: "UnexpectedBorrowingFactor", - type: "error", - }, - { - inputs: [], - name: "UnexpectedMarket", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "poolValue", - type: "int256", - }, - ], - name: "UnexpectedPoolValue", - type: "error", - }, - { - inputs: [], - 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: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - ], - name: "UnexpectedTokenForVirtualInventory", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "orderType", - type: "uint256", - }, - ], - name: "UnexpectedValidFromTime", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "orderType", - type: "uint256", - }, - ], - 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: [ - { - internalType: "int256", - name: "usdDelta", - type: "int256", - }, - { - internalType: "uint256", - name: "longOpenInterest", - type: "uint256", - }, - ], - name: "UsdDeltaExceedsLongOpenInterest", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "usdDelta", - type: "int256", - }, - { - internalType: "uint256", - name: "poolUsd", - type: "uint256", - }, - ], - name: "UsdDeltaExceedsPoolValue", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "usdDelta", - type: "int256", - }, - { - internalType: "uint256", - name: "shortOpenInterest", - type: "uint256", - }, - ], - name: "UsdDeltaExceedsShortOpenInterest", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "WithdrawalNotFound", - type: "error", - }, -] as const; - -export class CustomErrors__factory { - static readonly abi = _abi; - static createInterface(): CustomErrorsInterface { - return new Interface(_abi) as CustomErrorsInterface; - } - static connect(address: string, runner?: ContractRunner | null): CustomErrors { - return new Contract(address, _abi, runner) as unknown as CustomErrors; - } -} diff --git a/src/typechain-types/factories/DataStore__factory.ts b/src/typechain-types/factories/DataStore__factory.ts deleted file mode 100644 index b6fd611725..0000000000 --- a/src/typechain-types/factories/DataStore__factory.ts +++ /dev/null @@ -1,1474 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { DataStore, DataStoreInterface } from "../DataStore"; - -const _abi = [ - { - inputs: [ - { - internalType: "contract RoleStore", - name: "_roleStore", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "msgSender", - type: "address", - }, - { - internalType: "string", - name: "role", - type: "string", - }, - ], - name: "Unauthorized", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "address", - name: "value", - type: "address", - }, - ], - name: "addAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "value", - type: "bytes32", - }, - ], - name: "addBytes32", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "addUint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "addressArrayValues", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "addressValues", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - ], - name: "applyBoundedDeltaToUint", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - ], - name: "applyDeltaToInt", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - { - internalType: "string", - name: "errorMessage", - type: "string", - }, - ], - name: "applyDeltaToUint", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - 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: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "boolArrayValues", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "boolValues", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "bytes32ArrayValues", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "bytes32Values", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "address", - name: "value", - type: "address", - }, - ], - name: "containsAddress", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "value", - type: "bytes32", - }, - ], - name: "containsBytes32", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "containsUint", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - ], - name: "decrementInt", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "decrementUint", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getAddressArray", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - ], - name: "getAddressCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - name: "getAddressValuesAt", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getBool", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getBoolArray", - outputs: [ - { - internalType: "bool[]", - name: "", - type: "bool[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getBytes32", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getBytes32Array", - outputs: [ - { - internalType: "bytes32[]", - name: "", - type: "bytes32[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - ], - name: "getBytes32Count", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - name: "getBytes32ValuesAt", - outputs: [ - { - internalType: "bytes32[]", - name: "", - type: "bytes32[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getInt", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getIntArray", - outputs: [ - { - internalType: "int256[]", - name: "", - type: "int256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getString", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getStringArray", - outputs: [ - { - internalType: "string[]", - name: "", - type: "string[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getUint", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getUintArray", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - ], - name: "getUintCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - name: "getUintValuesAt", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - ], - name: "incrementInt", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "incrementUint", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "intArrayValues", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "intValues", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "address", - name: "value", - type: "address", - }, - ], - name: "removeAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeAddressArray", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeBool", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeBoolArray", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "value", - type: "bytes32", - }, - ], - name: "removeBytes32", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeBytes32", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeBytes32Array", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeInt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeIntArray", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeString", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeStringArray", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeUint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "setKey", - type: "bytes32", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "removeUint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "removeUintArray", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "roleStore", - outputs: [ - { - internalType: "contract RoleStore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "address", - name: "value", - type: "address", - }, - ], - name: "setAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "address[]", - name: "value", - type: "address[]", - }, - ], - name: "setAddressArray", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "bool", - name: "value", - type: "bool", - }, - ], - name: "setBool", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "bool[]", - name: "value", - type: "bool[]", - }, - ], - name: "setBoolArray", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "value", - type: "bytes32", - }, - ], - name: "setBytes32", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "bytes32[]", - name: "value", - type: "bytes32[]", - }, - ], - name: "setBytes32Array", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - ], - name: "setInt", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "int256[]", - name: "value", - type: "int256[]", - }, - ], - name: "setIntArray", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "string", - name: "value", - type: "string", - }, - ], - name: "setString", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "string[]", - name: "value", - type: "string[]", - }, - ], - name: "setStringArray", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "setUint", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - internalType: "uint256[]", - name: "value", - type: "uint256[]", - }, - ], - name: "setUintArray", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "stringArrayValues", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "stringValues", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "uintArrayValues", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "uintValues", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class DataStore__factory { - static readonly abi = _abi; - static createInterface(): DataStoreInterface { - return new Interface(_abi) as DataStoreInterface; - } - static connect(address: string, runner?: ContractRunner | null): DataStore { - return new Contract(address, _abi, runner) as unknown as DataStore; - } -} diff --git a/src/typechain-types/factories/ERC20PermitInterface__factory.ts b/src/typechain-types/factories/ERC20PermitInterface__factory.ts deleted file mode 100644 index 5d87128943..0000000000 --- a/src/typechain-types/factories/ERC20PermitInterface__factory.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { ERC20PermitInterface, ERC20PermitInterfaceInterface } from "../ERC20PermitInterface"; - -const _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", - }, -] as const; - -export class ERC20PermitInterface__factory { - static readonly abi = _abi; - static createInterface(): ERC20PermitInterfaceInterface { - return new Interface(_abi) as ERC20PermitInterfaceInterface; - } - static connect(address: string, runner?: ContractRunner | null): ERC20PermitInterface { - return new Contract(address, _abi, runner) as unknown as ERC20PermitInterface; - } -} diff --git a/src/typechain-types/factories/ERC721__factory.ts b/src/typechain-types/factories/ERC721__factory.ts deleted file mode 100644 index 9458dedada..0000000000 --- a/src/typechain-types/factories/ERC721__factory.ts +++ /dev/null @@ -1,452 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { ERC721, ERC721Interface } from "../ERC721"; - -const _abi = [ - { - inputs: [ - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "symbol", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "approved", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "operator", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "approved", - type: "bool", - }, - ], - name: "ApprovalForAll", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "approve", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "baseURI", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "getApproved", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "operator", - type: "address", - }, - ], - name: "isApprovedForAll", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "ownerOf", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "operator", - type: "address", - }, - { - internalType: "bool", - name: "approved", - type: "bool", - }, - ], - name: "setApprovalForAll", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - ], - name: "tokenByIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - ], - name: "tokenOfOwnerByIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "tokenURI", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class ERC721__factory { - static readonly abi = _abi; - static createInterface(): ERC721Interface { - return new Interface(_abi) as ERC721Interface; - } - static connect(address: string, runner?: ContractRunner | null): ERC721 { - return new Contract(address, _abi, runner) as unknown as ERC721; - } -} diff --git a/src/typechain-types/factories/EventEmitter__factory.ts b/src/typechain-types/factories/EventEmitter__factory.ts deleted file mode 100644 index 6b71f18558..0000000000 --- a/src/typechain-types/factories/EventEmitter__factory.ts +++ /dev/null @@ -1,2075 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { EventEmitter, EventEmitterInterface } from "../EventEmitter"; - -const _abi = [ - { - inputs: [ - { - internalType: "contract RoleStore", - name: "_roleStore", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "msgSender", - type: "address", - }, - { - internalType: "string", - name: "role", - type: "string", - }, - ], - name: "Unauthorized", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "msgSender", - type: "address", - }, - { - indexed: false, - internalType: "string", - name: "eventName", - type: "string", - }, - { - indexed: true, - internalType: "string", - name: "eventNameHash", - type: "string", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address", - name: "value", - type: "address", - }, - ], - internalType: "struct EventUtils.AddressKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address[]", - name: "value", - type: "address[]", - }, - ], - internalType: "struct EventUtils.AddressArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.AddressItems", - name: "addressItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - internalType: "struct EventUtils.UintKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256[]", - name: "value", - type: "uint256[]", - }, - ], - internalType: "struct EventUtils.UintArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.UintItems", - name: "uintItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - ], - internalType: "struct EventUtils.IntKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256[]", - name: "value", - type: "int256[]", - }, - ], - internalType: "struct EventUtils.IntArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.IntItems", - name: "intItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool", - name: "value", - type: "bool", - }, - ], - internalType: "struct EventUtils.BoolKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool[]", - name: "value", - type: "bool[]", - }, - ], - internalType: "struct EventUtils.BoolArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BoolItems", - name: "boolItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32", - name: "value", - type: "bytes32", - }, - ], - internalType: "struct EventUtils.Bytes32KeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32[]", - name: "value", - type: "bytes32[]", - }, - ], - internalType: "struct EventUtils.Bytes32ArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.Bytes32Items", - name: "bytes32Items", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes", - name: "value", - type: "bytes", - }, - ], - internalType: "struct EventUtils.BytesKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes[]", - name: "value", - type: "bytes[]", - }, - ], - internalType: "struct EventUtils.BytesArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BytesItems", - name: "bytesItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string", - name: "value", - type: "string", - }, - ], - internalType: "struct EventUtils.StringKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string[]", - name: "value", - type: "string[]", - }, - ], - internalType: "struct EventUtils.StringArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.StringItems", - name: "stringItems", - type: "tuple", - }, - ], - indexed: false, - internalType: "struct EventUtils.EventLogData", - name: "eventData", - type: "tuple", - }, - ], - name: "EventLog", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "msgSender", - type: "address", - }, - { - indexed: false, - internalType: "string", - name: "eventName", - type: "string", - }, - { - indexed: true, - internalType: "string", - name: "eventNameHash", - type: "string", - }, - { - indexed: true, - internalType: "bytes32", - name: "topic1", - type: "bytes32", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address", - name: "value", - type: "address", - }, - ], - internalType: "struct EventUtils.AddressKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address[]", - name: "value", - type: "address[]", - }, - ], - internalType: "struct EventUtils.AddressArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.AddressItems", - name: "addressItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - internalType: "struct EventUtils.UintKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256[]", - name: "value", - type: "uint256[]", - }, - ], - internalType: "struct EventUtils.UintArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.UintItems", - name: "uintItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - ], - internalType: "struct EventUtils.IntKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256[]", - name: "value", - type: "int256[]", - }, - ], - internalType: "struct EventUtils.IntArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.IntItems", - name: "intItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool", - name: "value", - type: "bool", - }, - ], - internalType: "struct EventUtils.BoolKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool[]", - name: "value", - type: "bool[]", - }, - ], - internalType: "struct EventUtils.BoolArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BoolItems", - name: "boolItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32", - name: "value", - type: "bytes32", - }, - ], - internalType: "struct EventUtils.Bytes32KeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32[]", - name: "value", - type: "bytes32[]", - }, - ], - internalType: "struct EventUtils.Bytes32ArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.Bytes32Items", - name: "bytes32Items", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes", - name: "value", - type: "bytes", - }, - ], - internalType: "struct EventUtils.BytesKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes[]", - name: "value", - type: "bytes[]", - }, - ], - internalType: "struct EventUtils.BytesArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BytesItems", - name: "bytesItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string", - name: "value", - type: "string", - }, - ], - internalType: "struct EventUtils.StringKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string[]", - name: "value", - type: "string[]", - }, - ], - internalType: "struct EventUtils.StringArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.StringItems", - name: "stringItems", - type: "tuple", - }, - ], - indexed: false, - internalType: "struct EventUtils.EventLogData", - name: "eventData", - type: "tuple", - }, - ], - name: "EventLog1", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "msgSender", - type: "address", - }, - { - indexed: false, - internalType: "string", - name: "eventName", - type: "string", - }, - { - indexed: true, - internalType: "string", - name: "eventNameHash", - type: "string", - }, - { - indexed: true, - internalType: "bytes32", - name: "topic1", - type: "bytes32", - }, - { - indexed: true, - internalType: "bytes32", - name: "topic2", - type: "bytes32", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address", - name: "value", - type: "address", - }, - ], - internalType: "struct EventUtils.AddressKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address[]", - name: "value", - type: "address[]", - }, - ], - internalType: "struct EventUtils.AddressArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.AddressItems", - name: "addressItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - internalType: "struct EventUtils.UintKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256[]", - name: "value", - type: "uint256[]", - }, - ], - internalType: "struct EventUtils.UintArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.UintItems", - name: "uintItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - ], - internalType: "struct EventUtils.IntKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256[]", - name: "value", - type: "int256[]", - }, - ], - internalType: "struct EventUtils.IntArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.IntItems", - name: "intItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool", - name: "value", - type: "bool", - }, - ], - internalType: "struct EventUtils.BoolKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool[]", - name: "value", - type: "bool[]", - }, - ], - internalType: "struct EventUtils.BoolArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BoolItems", - name: "boolItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32", - name: "value", - type: "bytes32", - }, - ], - internalType: "struct EventUtils.Bytes32KeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32[]", - name: "value", - type: "bytes32[]", - }, - ], - internalType: "struct EventUtils.Bytes32ArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.Bytes32Items", - name: "bytes32Items", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes", - name: "value", - type: "bytes", - }, - ], - internalType: "struct EventUtils.BytesKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes[]", - name: "value", - type: "bytes[]", - }, - ], - internalType: "struct EventUtils.BytesArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BytesItems", - name: "bytesItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string", - name: "value", - type: "string", - }, - ], - internalType: "struct EventUtils.StringKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string[]", - name: "value", - type: "string[]", - }, - ], - internalType: "struct EventUtils.StringArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.StringItems", - name: "stringItems", - type: "tuple", - }, - ], - indexed: false, - internalType: "struct EventUtils.EventLogData", - name: "eventData", - type: "tuple", - }, - ], - name: "EventLog2", - type: "event", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "topic1", - type: "bytes32", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "emitDataLog1", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "topic1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "topic2", - type: "bytes32", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "emitDataLog2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "topic1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "topic2", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "topic3", - type: "bytes32", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "emitDataLog3", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "topic1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "topic2", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "topic3", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "topic4", - type: "bytes32", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "emitDataLog4", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "eventName", - type: "string", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address", - name: "value", - type: "address", - }, - ], - internalType: "struct EventUtils.AddressKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address[]", - name: "value", - type: "address[]", - }, - ], - internalType: "struct EventUtils.AddressArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.AddressItems", - name: "addressItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - internalType: "struct EventUtils.UintKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256[]", - name: "value", - type: "uint256[]", - }, - ], - internalType: "struct EventUtils.UintArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.UintItems", - name: "uintItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - ], - internalType: "struct EventUtils.IntKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256[]", - name: "value", - type: "int256[]", - }, - ], - internalType: "struct EventUtils.IntArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.IntItems", - name: "intItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool", - name: "value", - type: "bool", - }, - ], - internalType: "struct EventUtils.BoolKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool[]", - name: "value", - type: "bool[]", - }, - ], - internalType: "struct EventUtils.BoolArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BoolItems", - name: "boolItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32", - name: "value", - type: "bytes32", - }, - ], - internalType: "struct EventUtils.Bytes32KeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32[]", - name: "value", - type: "bytes32[]", - }, - ], - internalType: "struct EventUtils.Bytes32ArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.Bytes32Items", - name: "bytes32Items", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes", - name: "value", - type: "bytes", - }, - ], - internalType: "struct EventUtils.BytesKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes[]", - name: "value", - type: "bytes[]", - }, - ], - internalType: "struct EventUtils.BytesArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BytesItems", - name: "bytesItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string", - name: "value", - type: "string", - }, - ], - internalType: "struct EventUtils.StringKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string[]", - name: "value", - type: "string[]", - }, - ], - internalType: "struct EventUtils.StringArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.StringItems", - name: "stringItems", - type: "tuple", - }, - ], - internalType: "struct EventUtils.EventLogData", - name: "eventData", - type: "tuple", - }, - ], - name: "emitEventLog", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "eventName", - type: "string", - }, - { - internalType: "bytes32", - name: "topic1", - type: "bytes32", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address", - name: "value", - type: "address", - }, - ], - internalType: "struct EventUtils.AddressKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address[]", - name: "value", - type: "address[]", - }, - ], - internalType: "struct EventUtils.AddressArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.AddressItems", - name: "addressItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - internalType: "struct EventUtils.UintKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256[]", - name: "value", - type: "uint256[]", - }, - ], - internalType: "struct EventUtils.UintArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.UintItems", - name: "uintItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - ], - internalType: "struct EventUtils.IntKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256[]", - name: "value", - type: "int256[]", - }, - ], - internalType: "struct EventUtils.IntArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.IntItems", - name: "intItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool", - name: "value", - type: "bool", - }, - ], - internalType: "struct EventUtils.BoolKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool[]", - name: "value", - type: "bool[]", - }, - ], - internalType: "struct EventUtils.BoolArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BoolItems", - name: "boolItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32", - name: "value", - type: "bytes32", - }, - ], - internalType: "struct EventUtils.Bytes32KeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32[]", - name: "value", - type: "bytes32[]", - }, - ], - internalType: "struct EventUtils.Bytes32ArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.Bytes32Items", - name: "bytes32Items", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes", - name: "value", - type: "bytes", - }, - ], - internalType: "struct EventUtils.BytesKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes[]", - name: "value", - type: "bytes[]", - }, - ], - internalType: "struct EventUtils.BytesArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BytesItems", - name: "bytesItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string", - name: "value", - type: "string", - }, - ], - internalType: "struct EventUtils.StringKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string[]", - name: "value", - type: "string[]", - }, - ], - internalType: "struct EventUtils.StringArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.StringItems", - name: "stringItems", - type: "tuple", - }, - ], - internalType: "struct EventUtils.EventLogData", - name: "eventData", - type: "tuple", - }, - ], - name: "emitEventLog1", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "eventName", - type: "string", - }, - { - internalType: "bytes32", - name: "topic1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "topic2", - type: "bytes32", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address", - name: "value", - type: "address", - }, - ], - internalType: "struct EventUtils.AddressKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "address[]", - name: "value", - type: "address[]", - }, - ], - internalType: "struct EventUtils.AddressArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.AddressItems", - name: "addressItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - internalType: "struct EventUtils.UintKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint256[]", - name: "value", - type: "uint256[]", - }, - ], - internalType: "struct EventUtils.UintArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.UintItems", - name: "uintItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256", - name: "value", - type: "int256", - }, - ], - internalType: "struct EventUtils.IntKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "int256[]", - name: "value", - type: "int256[]", - }, - ], - internalType: "struct EventUtils.IntArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.IntItems", - name: "intItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool", - name: "value", - type: "bool", - }, - ], - internalType: "struct EventUtils.BoolKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bool[]", - name: "value", - type: "bool[]", - }, - ], - internalType: "struct EventUtils.BoolArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BoolItems", - name: "boolItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32", - name: "value", - type: "bytes32", - }, - ], - internalType: "struct EventUtils.Bytes32KeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes32[]", - name: "value", - type: "bytes32[]", - }, - ], - internalType: "struct EventUtils.Bytes32ArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.Bytes32Items", - name: "bytes32Items", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes", - name: "value", - type: "bytes", - }, - ], - internalType: "struct EventUtils.BytesKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "bytes[]", - name: "value", - type: "bytes[]", - }, - ], - internalType: "struct EventUtils.BytesArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.BytesItems", - name: "bytesItems", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string", - name: "value", - type: "string", - }, - ], - internalType: "struct EventUtils.StringKeyValue[]", - name: "items", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string[]", - name: "value", - type: "string[]", - }, - ], - internalType: "struct EventUtils.StringArrayKeyValue[]", - name: "arrayItems", - type: "tuple[]", - }, - ], - internalType: "struct EventUtils.StringItems", - name: "stringItems", - type: "tuple", - }, - ], - internalType: "struct EventUtils.EventLogData", - name: "eventData", - type: "tuple", - }, - ], - name: "emitEventLog2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "roleStore", - outputs: [ - { - internalType: "contract RoleStore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class EventEmitter__factory { - static readonly abi = _abi; - static createInterface(): EventEmitterInterface { - return new Interface(_abi) as EventEmitterInterface; - } - static connect(address: string, runner?: ContractRunner | null): EventEmitter { - return new Contract(address, _abi, runner) as unknown as EventEmitter; - } -} diff --git a/src/typechain-types/factories/ExchangeRouter__factory.ts b/src/typechain-types/factories/ExchangeRouter__factory.ts deleted file mode 100644 index bbef3dc8a5..0000000000 --- a/src/typechain-types/factories/ExchangeRouter__factory.ts +++ /dev/null @@ -1,1721 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { ExchangeRouter, ExchangeRouterInterface } from "../ExchangeRouter"; - -const _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 IDepositHandler", - name: "_depositHandler", - type: "address", - }, - { - internalType: "contract IWithdrawalHandler", - name: "_withdrawalHandler", - type: "address", - }, - { - internalType: "contract IShiftHandler", - name: "_shiftHandler", - type: "address", - }, - { - internalType: "contract IOrderHandler", - name: "_orderHandler", - type: "address", - }, - { - internalType: "contract IExternalHandler", - name: "_externalHandler", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "uint256", - name: "adjustedClaimableAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "claimedAmount", - type: "uint256", - }, - ], - name: "CollateralAlreadyClaimed", - 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: "EmptyDeposit", - type: "error", - }, - { - inputs: [], - name: "EmptyHoldingAddress", - type: "error", - }, - { - inputs: [], - name: "EmptyMarket", - 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: "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: "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: "uint256", - name: "uiFeeFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxUiFeeFactor", - type: "uint256", - }, - ], - name: "InvalidUiFeeFactor", - 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: "cancelDeposit", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "cancelOrder", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "cancelShift", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "cancelWithdrawal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - 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: "payable", - type: "function", - }, - { - inputs: [ - { - 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: "payable", - type: "function", - }, - { - inputs: [ - { - 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: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "markets", - type: "address[]", - }, - { - internalType: "address[]", - name: "tokens", - type: "address[]", - }, - { - internalType: "address", - name: "receiver", - type: "address", - }, - ], - name: "claimUiFees", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - 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: "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: "payable", - type: "function", - }, - { - inputs: [ - { - 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: "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: "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: "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: "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: "payable", - 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: "eventEmitter", - outputs: [ - { - internalType: "contract EventEmitter", - name: "", - type: "address", - }, - ], - stateMutability: "view", - 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: "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", - }, - { - 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", - }, - ], - name: "executeAtomicWithdrawal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "externalHandler", - outputs: [ - { - internalType: "contract IExternalHandler", - 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: "orderHandler", - outputs: [ - { - internalType: "contract IOrderHandler", - 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: [ - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "address", - name: "callbackContract", - type: "address", - }, - ], - name: "setSavedCallbackContract", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "uiFeeFactor", - type: "uint256", - }, - ], - name: "setUiFeeFactor", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "shiftHandler", - outputs: [ - { - internalType: "contract IShiftHandler", - name: "", - type: "address", - }, - ], - stateMutability: "view", - 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: "simulateExecuteDeposit", - 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: "simulateExecuteLatestDeposit", - 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: "simulateExecuteLatestOrder", - 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: "simulateExecuteLatestShift", - 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", - }, - { - internalType: "enum ISwapPricingUtils.SwapPricingType", - name: "swapPricingType", - type: "uint8", - }, - ], - name: "simulateExecuteLatestWithdrawal", - 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: "simulateExecuteOrder", - 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: "simulateExecuteShift", - 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", - }, - { - internalType: "enum ISwapPricingUtils.SwapPricingType", - name: "swapPricingType", - type: "uint8", - }, - ], - name: "simulateExecuteWithdrawal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - 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", - }, - ], - name: "updateOrder", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "withdrawalHandler", - outputs: [ - { - internalType: "contract IWithdrawalHandler", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class ExchangeRouter__factory { - static readonly abi = _abi; - static createInterface(): ExchangeRouterInterface { - return new Interface(_abi) as ExchangeRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): ExchangeRouter { - return new Contract(address, _abi, runner) as unknown as ExchangeRouter; - } -} diff --git a/src/typechain-types/factories/GMT__factory.ts b/src/typechain-types/factories/GMT__factory.ts deleted file mode 100644 index d38a2a8465..0000000000 --- a/src/typechain-types/factories/GMT__factory.ts +++ /dev/null @@ -1,532 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { GMT, GMTInterface } from "../GMT"; - -const _abi = [ - { - inputs: [ - { - internalType: "uint256", - name: "_initialSupply", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - 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: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "addAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_recipient", - type: "address", - }, - ], - name: "addBlockedRecipient", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_msgSender", - type: "address", - }, - ], - name: "addMsgSender", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "admins", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - 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: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "allowances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "allowedMsgSenders", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "balances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "beginMigration", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "blockedRecipients", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "endMigration", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "hasActiveMigration", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "migrationTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "removeAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_recipient", - type: "address", - }, - ], - name: "removeBlockedRecipient", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_msgSender", - type: "address", - }, - ], - name: "removeMsgSender", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_migrationTime", - type: "uint256", - }, - ], - name: "setNextMigrationTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_recipient", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_sender", - type: "address", - }, - { - internalType: "address", - name: "_recipient", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "withdrawToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class GMT__factory { - static readonly abi = _abi; - static createInterface(): GMTInterface { - return new Interface(_abi) as GMTInterface; - } - static connect(address: string, runner?: ContractRunner | null): GMT { - return new Contract(address, _abi, runner) as unknown as GMT; - } -} diff --git a/src/typechain-types/factories/GelatoRelayRouter__factory.ts b/src/typechain-types/factories/GelatoRelayRouter__factory.ts deleted file mode 100644 index 34e8a3d8dd..0000000000 --- a/src/typechain-types/factories/GelatoRelayRouter__factory.ts +++ /dev/null @@ -1,1594 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { GelatoRelayRouter, GelatoRelayRouterInterface } from "../GelatoRelayRouter"; - -const _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", - }, -] as const; - -export class GelatoRelayRouter__factory { - static readonly abi = _abi; - static createInterface(): GelatoRelayRouterInterface { - return new Interface(_abi) as GelatoRelayRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): GelatoRelayRouter { - return new Contract(address, _abi, runner) as unknown as GelatoRelayRouter; - } -} diff --git a/src/typechain-types/factories/GlpManager__factory.ts b/src/typechain-types/factories/GlpManager__factory.ts deleted file mode 100644 index 70cdc47ae7..0000000000 --- a/src/typechain-types/factories/GlpManager__factory.ts +++ /dev/null @@ -1,601 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { GlpManager, GlpManagerInterface } from "../GlpManager"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_usdg", - type: "address", - }, - { - internalType: "address", - name: "_glp", - type: "address", - }, - { - internalType: "uint256", - name: "_cooldownDuration", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "aumInUsdg", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "glpSupply", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "usdgAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "mintAmount", - type: "uint256", - }, - ], - name: "AddLiquidity", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "glpAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "aumInUsdg", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "glpSupply", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "usdgAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "RemoveLiquidity", - type: "event", - }, - { - inputs: [], - name: "MAX_COOLDOWN_DURATION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "PRICE_PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "USDG_DECIMALS", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minUsdg", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minGlp", - type: "uint256", - }, - ], - name: "addLiquidity", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_fundingAccount", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minUsdg", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minGlp", - type: "uint256", - }, - ], - name: "addLiquidityForAccount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "aumAddition", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "aumDeduction", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "cooldownDuration", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "maximise", - type: "bool", - }, - ], - name: "getAum", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "maximise", - type: "bool", - }, - ], - name: "getAumInUsdg", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getAums", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "glp", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inPrivateMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isHandler", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "lastAddedAt", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_tokenOut", - type: "address", - }, - { - internalType: "uint256", - name: "_glpAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "removeLiquidity", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_tokenOut", - type: "address", - }, - { - internalType: "uint256", - name: "_glpAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "removeLiquidityForAccount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_aumAddition", - type: "uint256", - }, - { - internalType: "uint256", - name: "_aumDeduction", - type: "uint256", - }, - ], - name: "setAumAdjustment", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_cooldownDuration", - type: "uint256", - }, - ], - name: "setCooldownDuration", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_handler", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setHandler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inPrivateMode", - type: "bool", - }, - ], - name: "setInPrivateMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "usdg", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "vault", - outputs: [ - { - internalType: "contract IVault", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class GlpManager__factory { - static readonly abi = _abi; - static createInterface(): GlpManagerInterface { - return new Interface(_abi) as GlpManagerInterface; - } - static connect(address: string, runner?: ContractRunner | null): GlpManager { - return new Contract(address, _abi, runner) as unknown as GlpManager; - } -} diff --git a/src/typechain-types/factories/GlvReader__factory.ts b/src/typechain-types/factories/GlvReader__factory.ts deleted file mode 100644 index 7022c64f1f..0000000000 --- a/src/typechain-types/factories/GlvReader__factory.ts +++ /dev/null @@ -1,1486 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { GlvReader, GlvReaderInterface } from "../GlvReader"; - -const _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", - }, -] as const; - -export class GlvReader__factory { - static readonly abi = _abi; - static createInterface(): GlvReaderInterface { - return new Interface(_abi) as GlvReaderInterface; - } - static connect(address: string, runner?: ContractRunner | null): GlvReader { - return new Contract(address, _abi, runner) as unknown as GlvReader; - } -} diff --git a/src/typechain-types/factories/GlvRouter__factory.ts b/src/typechain-types/factories/GlvRouter__factory.ts deleted file mode 100644 index 963e73284c..0000000000 --- a/src/typechain-types/factories/GlvRouter__factory.ts +++ /dev/null @@ -1,779 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { GlvRouter, GlvRouterInterface } from "../GlvRouter"; - -const _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", - }, -] as const; - -export class GlvRouter__factory { - static readonly abi = _abi; - static createInterface(): GlvRouterInterface { - return new Interface(_abi) as GlvRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): GlvRouter { - return new Contract(address, _abi, runner) as unknown as GlvRouter; - } -} diff --git a/src/typechain-types/factories/GmxMigrator__factory.ts b/src/typechain-types/factories/GmxMigrator__factory.ts deleted file mode 100644 index 22795bea9b..0000000000 --- a/src/typechain-types/factories/GmxMigrator__factory.ts +++ /dev/null @@ -1,667 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { GmxMigrator, GmxMigratorInterface } from "../GmxMigrator"; - -const _abi = [ - { - inputs: [ - { - internalType: "uint256", - name: "_minAuthorizations", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - ], - name: "ClearAction", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - ], - name: "SignAction", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - ], - name: "SignalApprove", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - ], - name: "SignalPendingAction", - type: "event", - }, - { - inputs: [], - name: "actionsNonce", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "admin", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ammRouter", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "approve", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "caps", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "endMigration", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getIouToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getTokenAmounts", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getTokenPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gmxPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_ammRouter", - type: "address", - }, - { - internalType: "uint256", - name: "_gmxPrice", - type: "uint256", - }, - { - internalType: "address[]", - name: "_signers", - type: "address[]", - }, - { - internalType: "address[]", - name: "_whitelistedTokens", - type: "address[]", - }, - { - internalType: "address[]", - name: "_iouTokens", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "_prices", - type: "uint256[]", - }, - { - internalType: "uint256[]", - name: "_caps", - type: "uint256[]", - }, - { - internalType: "address[]", - name: "_lpTokens", - type: "address[]", - }, - { - internalType: "address[]", - name: "_lpTokenAs", - type: "address[]", - }, - { - internalType: "address[]", - name: "_lpTokenBs", - type: "address[]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "iouTokens", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isInitialized", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isMigrationActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isSigner", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "lpTokenAs", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "lpTokenBs", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "lpTokens", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenAmount", - type: "uint256", - }, - ], - name: "migrate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "minAuthorizations", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "pendingActions", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "prices", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "signApprove", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "signalApprove", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "signedActions", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "signers", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "tokenAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "whitelistedTokens", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class GmxMigrator__factory { - static readonly abi = _abi; - static createInterface(): GmxMigratorInterface { - return new Interface(_abi) as GmxMigratorInterface; - } - static connect(address: string, runner?: ContractRunner | null): GmxMigrator { - return new Contract(address, _abi, runner) as unknown as GmxMigrator; - } -} diff --git a/src/typechain-types/factories/GovToken__factory.ts b/src/typechain-types/factories/GovToken__factory.ts deleted file mode 100644 index 78120d3c38..0000000000 --- a/src/typechain-types/factories/GovToken__factory.ts +++ /dev/null @@ -1,783 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { GovToken, GovTokenInterface } from "../GovToken"; - -const _abi = [ - { - inputs: [ - { - internalType: "contract RoleStore", - name: "roleStore_", - type: "address", - }, - { - internalType: "string", - name: "name_", - type: "string", - }, - { - internalType: "string", - name: "symbol_", - type: "string", - }, - { - internalType: "uint8", - name: "decimals_", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "InvalidShortString", - type: "error", - }, - { - inputs: [ - { - internalType: "string", - name: "str", - type: "string", - }, - ], - name: "StringTooLong", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "msgSender", - type: "address", - }, - { - internalType: "string", - name: "role", - type: "string", - }, - ], - name: "Unauthorized", - 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: "delegator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "fromDelegate", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "toDelegate", - type: "address", - }, - ], - name: "DelegateChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegate", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "previousBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "DelegateVotesChanged", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "EIP712DomainChanged", - 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", - }, - { - inputs: [], - name: "CLOCK_MODE", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - 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", - }, - { - 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: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint32", - name: "pos", - type: "uint32", - }, - ], - name: "checkpoints", - outputs: [ - { - components: [ - { - internalType: "uint32", - name: "fromBlock", - type: "uint32", - }, - { - internalType: "uint224", - name: "votes", - type: "uint224", - }, - ], - internalType: "struct ERC20Votes.Checkpoint", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "clock", - outputs: [ - { - internalType: "uint48", - name: "", - type: "uint48", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - ], - name: "delegate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiry", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "delegateBySig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "delegates", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "eip712Domain", - outputs: [ - { - internalType: "bytes1", - name: "fields", - type: "bytes1", - }, - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - { - internalType: "uint256", - name: "chainId", - type: "uint256", - }, - { - internalType: "address", - name: "verifyingContract", - type: "address", - }, - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "uint256[]", - name: "extensions", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastTotalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "getVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - 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: "account", - type: "address", - }, - ], - name: "numCheckpoints", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - 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: "roleStore", - outputs: [ - { - internalType: "contract RoleStore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - 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: "amount", - 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: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class GovToken__factory { - static readonly abi = _abi; - static createInterface(): GovTokenInterface { - return new Interface(_abi) as GovTokenInterface; - } - static connect(address: string, runner?: ContractRunner | null): GovToken { - return new Contract(address, _abi, runner) as unknown as GovToken; - } -} diff --git a/src/typechain-types/factories/LayerZeroProvider__factory.ts b/src/typechain-types/factories/LayerZeroProvider__factory.ts deleted file mode 100644 index c6a434a2a8..0000000000 --- a/src/typechain-types/factories/LayerZeroProvider__factory.ts +++ /dev/null @@ -1,387 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { LayerZeroProvider, LayerZeroProviderInterface } from "../LayerZeroProvider"; - -const _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", - }, -] as const; - -export class LayerZeroProvider__factory { - static readonly abi = _abi; - static createInterface(): LayerZeroProviderInterface { - return new Interface(_abi) as LayerZeroProviderInterface; - } - static connect(address: string, runner?: ContractRunner | null): LayerZeroProvider { - return new Contract(address, _abi, runner) as unknown as LayerZeroProvider; - } -} diff --git a/src/typechain-types/factories/MintableBaseToken__factory.ts b/src/typechain-types/factories/MintableBaseToken__factory.ts deleted file mode 100644 index a7c359aab4..0000000000 --- a/src/typechain-types/factories/MintableBaseToken__factory.ts +++ /dev/null @@ -1,706 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { MintableBaseToken, MintableBaseTokenInterface } from "../MintableBaseToken"; - -const _abi = [ - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - { - internalType: "uint256", - name: "_initialSupply", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - 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: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "addAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "addNonStakingAccount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "admins", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - 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: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "allowances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "balances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "claim", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inPrivateTransferMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isHandler", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isMinter", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "nonStakingAccounts", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "nonStakingSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "recoverClaim", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "removeAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "removeNonStakingAccount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_handler", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setHandler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inPrivateTransferMode", - type: "bool", - }, - ], - name: "setInPrivateTransferMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - ], - name: "setInfo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_minter", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setMinter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_yieldTrackers", - type: "address[]", - }, - ], - name: "setYieldTrackers", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "stakedBalance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - 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: "_recipient", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_sender", - type: "address", - }, - { - internalType: "address", - name: "_recipient", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "withdrawToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "yieldTrackers", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class MintableBaseToken__factory { - static readonly abi = _abi; - static createInterface(): MintableBaseTokenInterface { - return new Interface(_abi) as MintableBaseTokenInterface; - } - static connect(address: string, runner?: ContractRunner | null): MintableBaseToken { - return new Contract(address, _abi, runner) as unknown as MintableBaseToken; - } -} diff --git a/src/typechain-types/factories/Multicall__factory.ts b/src/typechain-types/factories/Multicall__factory.ts deleted file mode 100644 index b14978276b..0000000000 --- a/src/typechain-types/factories/Multicall__factory.ts +++ /dev/null @@ -1,444 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { Multicall, MulticallInterface } from "../Multicall"; - -const _abi = [ - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "target", - type: "address", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - ], - internalType: "struct Multicall3.Call[]", - name: "calls", - type: "tuple[]", - }, - ], - name: "aggregate", - outputs: [ - { - internalType: "uint256", - name: "blockNumber", - type: "uint256", - }, - { - internalType: "bytes[]", - name: "returnData", - type: "bytes[]", - }, - ], - 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", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "target", - type: "address", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - ], - internalType: "struct Multicall3.Call[]", - name: "calls", - type: "tuple[]", - }, - ], - name: "blockAndAggregate", - outputs: [ - { - internalType: "uint256", - name: "blockNumber", - type: "uint256", - }, - { - internalType: "bytes32", - name: "blockHash", - type: "bytes32", - }, - { - 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: [], - name: "getBasefee", - outputs: [ - { - internalType: "uint256", - name: "basefee", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "blockNumber", - type: "uint256", - }, - ], - name: "getBlockHash", - outputs: [ - { - internalType: "bytes32", - name: "blockHash", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getBlockNumber", - outputs: [ - { - internalType: "uint256", - name: "blockNumber", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getChainId", - outputs: [ - { - internalType: "uint256", - name: "chainid", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getCurrentBlockCoinbase", - outputs: [ - { - internalType: "address", - name: "coinbase", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getCurrentBlockGasLimit", - outputs: [ - { - internalType: "uint256", - name: "gaslimit", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getCurrentBlockTimestamp", - outputs: [ - { - internalType: "uint256", - name: "timestamp", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "addr", - type: "address", - }, - ], - name: "getEthBalance", - outputs: [ - { - internalType: "uint256", - name: "balance", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getLastBlockHash", - outputs: [ - { - internalType: "bytes32", - name: "blockHash", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "requireSuccess", - type: "bool", - }, - { - components: [ - { - internalType: "address", - name: "target", - type: "address", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - ], - internalType: "struct Multicall3.Call[]", - name: "calls", - type: "tuple[]", - }, - ], - name: "tryAggregate", - 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: [ - { - internalType: "bool", - name: "requireSuccess", - type: "bool", - }, - { - components: [ - { - internalType: "address", - name: "target", - type: "address", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - ], - internalType: "struct Multicall3.Call[]", - name: "calls", - type: "tuple[]", - }, - ], - name: "tryBlockAndAggregate", - outputs: [ - { - internalType: "uint256", - name: "blockNumber", - type: "uint256", - }, - { - internalType: "bytes32", - name: "blockHash", - type: "bytes32", - }, - { - 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", - }, -] as const; - -export class Multicall__factory { - static readonly abi = _abi; - static createInterface(): MulticallInterface { - return new Interface(_abi) as MulticallInterface; - } - static connect(address: string, runner?: ContractRunner | null): Multicall { - return new Contract(address, _abi, runner) as unknown as Multicall; - } -} diff --git a/src/typechain-types/factories/MultichainClaimsRouter__factory.ts b/src/typechain-types/factories/MultichainClaimsRouter__factory.ts deleted file mode 100644 index 72418d9137..0000000000 --- a/src/typechain-types/factories/MultichainClaimsRouter__factory.ts +++ /dev/null @@ -1,1285 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { - MultichainClaimsRouter, - MultichainClaimsRouterInterface, - MultichainRouter, -} from "../MultichainClaimsRouter"; - -const _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", - }, -] as const; - -export class MultichainClaimsRouter__factory { - static readonly abi = _abi; - static createInterface(): MultichainClaimsRouterInterface { - return new Interface(_abi) as MultichainClaimsRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): MultichainClaimsRouter { - return new Contract(address, _abi, runner) as unknown as MultichainClaimsRouter; - } -} diff --git a/src/typechain-types/factories/MultichainGlvRouter__factory.ts b/src/typechain-types/factories/MultichainGlvRouter__factory.ts deleted file mode 100644 index fd19c5c43e..0000000000 --- a/src/typechain-types/factories/MultichainGlvRouter__factory.ts +++ /dev/null @@ -1,1165 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { MultichainGlvRouter, MultichainGlvRouterInterface, MultichainRouter } from "../MultichainGlvRouter"; - -const _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", - }, -] as const; - -export class MultichainGlvRouter__factory { - static readonly abi = _abi; - static createInterface(): MultichainGlvRouterInterface { - return new Interface(_abi) as MultichainGlvRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): MultichainGlvRouter { - return new Contract(address, _abi, runner) as unknown as MultichainGlvRouter; - } -} diff --git a/src/typechain-types/factories/MultichainGmRouter__factory.ts b/src/typechain-types/factories/MultichainGmRouter__factory.ts deleted file mode 100644 index 3095c7fb33..0000000000 --- a/src/typechain-types/factories/MultichainGmRouter__factory.ts +++ /dev/null @@ -1,1464 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { MultichainGmRouter, MultichainGmRouterInterface, MultichainRouter } from "../MultichainGmRouter"; - -const _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", - }, -] as const; - -export class MultichainGmRouter__factory { - static readonly abi = _abi; - static createInterface(): MultichainGmRouterInterface { - return new Interface(_abi) as MultichainGmRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): MultichainGmRouter { - return new Contract(address, _abi, runner) as unknown as MultichainGmRouter; - } -} diff --git a/src/typechain-types/factories/MultichainOrderRouter__factory.ts b/src/typechain-types/factories/MultichainOrderRouter__factory.ts deleted file mode 100644 index 04b55da7d1..0000000000 --- a/src/typechain-types/factories/MultichainOrderRouter__factory.ts +++ /dev/null @@ -1,1835 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { MultichainOrderRouter, MultichainOrderRouterInterface, MultichainRouter } from "../MultichainOrderRouter"; - -const _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", - }, -] as const; - -export class MultichainOrderRouter__factory { - static readonly abi = _abi; - static createInterface(): MultichainOrderRouterInterface { - return new Interface(_abi) as MultichainOrderRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): MultichainOrderRouter { - return new Contract(address, _abi, runner) as unknown as MultichainOrderRouter; - } -} diff --git a/src/typechain-types/factories/MultichainSubaccountRouter__factory.ts b/src/typechain-types/factories/MultichainSubaccountRouter__factory.ts deleted file mode 100644 index 972f99f9b0..0000000000 --- a/src/typechain-types/factories/MultichainSubaccountRouter__factory.ts +++ /dev/null @@ -1,2088 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { - MultichainSubaccountRouter, - MultichainSubaccountRouterInterface, - MultichainRouter, -} from "../MultichainSubaccountRouter"; - -const _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", - }, -] as const; - -export class MultichainSubaccountRouter__factory { - static readonly abi = _abi; - static createInterface(): MultichainSubaccountRouterInterface { - return new Interface(_abi) as MultichainSubaccountRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): MultichainSubaccountRouter { - return new Contract(address, _abi, runner) as unknown as MultichainSubaccountRouter; - } -} diff --git a/src/typechain-types/factories/MultichainTransferRouter__factory.ts b/src/typechain-types/factories/MultichainTransferRouter__factory.ts deleted file mode 100644 index 5c85b398e1..0000000000 --- a/src/typechain-types/factories/MultichainTransferRouter__factory.ts +++ /dev/null @@ -1,934 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { - MultichainTransferRouter, - MultichainTransferRouterInterface, - MultichainRouter, -} from "../MultichainTransferRouter"; - -const _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", - }, -] as const; - -export class MultichainTransferRouter__factory { - static readonly abi = _abi; - static createInterface(): MultichainTransferRouterInterface { - return new Interface(_abi) as MultichainTransferRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): MultichainTransferRouter { - return new Contract(address, _abi, runner) as unknown as MultichainTransferRouter; - } -} diff --git a/src/typechain-types/factories/MultichainUtils__factory.ts b/src/typechain-types/factories/MultichainUtils__factory.ts deleted file mode 100644 index 7c737bd85f..0000000000 --- a/src/typechain-types/factories/MultichainUtils__factory.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { MultichainUtils, MultichainUtilsInterface } from "../MultichainUtils"; - -const _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", - }, -] as const; - -export class MultichainUtils__factory { - static readonly abi = _abi; - static createInterface(): MultichainUtilsInterface { - return new Interface(_abi) as MultichainUtilsInterface; - } - static connect(address: string, runner?: ContractRunner | null): MultichainUtils { - return new Contract(address, _abi, runner) as unknown as MultichainUtils; - } -} diff --git a/src/typechain-types/factories/MultichainVault__factory.ts b/src/typechain-types/factories/MultichainVault__factory.ts deleted file mode 100644 index 70a704ad0b..0000000000 --- a/src/typechain-types/factories/MultichainVault__factory.ts +++ /dev/null @@ -1,290 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { MultichainVault, MultichainVaultInterface } from "../MultichainVault"; - -const _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", - }, -] as const; - -export class MultichainVault__factory { - static readonly abi = _abi; - static createInterface(): MultichainVaultInterface { - return new Interface(_abi) as MultichainVaultInterface; - } - static connect(address: string, runner?: ContractRunner | null): MultichainVault { - return new Contract(address, _abi, runner) as unknown as MultichainVault; - } -} diff --git a/src/typechain-types/factories/OrderBookReader__factory.ts b/src/typechain-types/factories/OrderBookReader__factory.ts deleted file mode 100644 index 7548c1b87d..0000000000 --- a/src/typechain-types/factories/OrderBookReader__factory.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { OrderBookReader, OrderBookReaderInterface } from "../OrderBookReader"; - -const _abi = [ - { - inputs: [ - { - internalType: "address payable", - name: "_orderBookAddress", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256[]", - name: "_indices", - type: "uint256[]", - }, - ], - name: "getDecreaseOrders", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_orderBookAddress", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256[]", - name: "_indices", - type: "uint256[]", - }, - ], - name: "getIncreaseOrders", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_orderBookAddress", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256[]", - name: "_indices", - type: "uint256[]", - }, - ], - name: "getSwapOrders", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class OrderBookReader__factory { - static readonly abi = _abi; - static createInterface(): OrderBookReaderInterface { - return new Interface(_abi) as OrderBookReaderInterface; - } - static connect(address: string, runner?: ContractRunner | null): OrderBookReader { - return new Contract(address, _abi, runner) as unknown as OrderBookReader; - } -} diff --git a/src/typechain-types/factories/OrderBook__factory.ts b/src/typechain-types/factories/OrderBook__factory.ts deleted file mode 100644 index 55826168f7..0000000000 --- a/src/typechain-types/factories/OrderBook__factory.ts +++ /dev/null @@ -1,2007 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { OrderBook, OrderBookInterface } from "../OrderBook"; - -const _abi = [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "orderIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - name: "CancelDecreaseOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "orderIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "purchaseToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "purchaseTokenAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - name: "CancelIncreaseOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "orderIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerRatio", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "shouldUnwrap", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - name: "CancelSwapOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "orderIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - name: "CreateDecreaseOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "orderIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "purchaseToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "purchaseTokenAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - name: "CreateIncreaseOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "orderIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerRatio", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "shouldUnwrap", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - name: "CreateSwapOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "orderIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "executionPrice", - type: "uint256", - }, - ], - name: "ExecuteDecreaseOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "orderIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "purchaseToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "purchaseTokenAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "executionPrice", - type: "uint256", - }, - ], - name: "ExecuteIncreaseOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "orderIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerRatio", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "shouldUnwrap", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - name: "ExecuteSwapOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "router", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "vault", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "weth", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "usdg", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "minExecutionFee", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minPurchaseTokenAmountUsd", - type: "uint256", - }, - ], - name: "Initialize", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "orderIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - ], - name: "UpdateDecreaseOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "gov", - type: "address", - }, - ], - name: "UpdateGov", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "orderIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - ], - name: "UpdateIncreaseOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "minExecutionFee", - type: "uint256", - }, - ], - name: "UpdateMinExecutionFee", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "minPurchaseTokenAmountUsd", - type: "uint256", - }, - ], - name: "UpdateMinPurchaseTokenAmountUsd", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "ordexIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "triggerRatio", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "shouldUnwrap", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - name: "UpdateSwapOrder", - type: "event", - }, - { - inputs: [], - name: "PRICE_PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "USDG_PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - ], - name: "cancelDecreaseOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - ], - name: "cancelIncreaseOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256[]", - name: "_swapOrderIndexes", - type: "uint256[]", - }, - { - internalType: "uint256[]", - name: "_increaseOrderIndexes", - type: "uint256[]", - }, - { - internalType: "uint256[]", - name: "_decreaseOrderIndexes", - type: "uint256[]", - }, - ], - name: "cancelMultiple", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - ], - name: "cancelSwapOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_triggerPrice", - type: "uint256", - }, - { - internalType: "bool", - name: "_triggerAboveThreshold", - type: "bool", - }, - ], - name: "createDecreaseOrder", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_triggerPrice", - type: "uint256", - }, - { - internalType: "bool", - name: "_triggerAboveThreshold", - type: "bool", - }, - { - internalType: "uint256", - name: "_executionFee", - type: "uint256", - }, - { - internalType: "bool", - name: "_shouldWrap", - type: "bool", - }, - ], - name: "createIncreaseOrder", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_triggerRatio", - type: "uint256", - }, - { - internalType: "bool", - name: "_triggerAboveThreshold", - type: "bool", - }, - { - internalType: "uint256", - name: "_executionFee", - type: "uint256", - }, - { - internalType: "bool", - name: "_shouldWrap", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldUnwrap", - type: "bool", - }, - ], - name: "createSwapOrder", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "decreaseOrders", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "decreaseOrdersIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_address", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "address payable", - name: "_feeReceiver", - type: "address", - }, - ], - name: "executeDecreaseOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_address", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "address payable", - name: "_feeReceiver", - type: "address", - }, - ], - name: "executeIncreaseOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "address payable", - name: "_feeReceiver", - type: "address", - }, - ], - name: "executeSwapOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - ], - name: "getDecreaseOrder", - outputs: [ - { - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - ], - name: "getIncreaseOrder", - outputs: [ - { - internalType: "address", - name: "purchaseToken", - type: "address", - }, - { - internalType: "uint256", - name: "purchaseTokenAmount", - type: "uint256", - }, - { - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - ], - name: "getSwapOrder", - outputs: [ - { - internalType: "address", - name: "path0", - type: "address", - }, - { - internalType: "address", - name: "path1", - type: "address", - }, - { - internalType: "address", - name: "path2", - type: "address", - }, - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "triggerRatio", - type: "uint256", - }, - { - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - internalType: "bool", - name: "shouldUnwrap", - type: "bool", - }, - { - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_otherToken", - type: "address", - }, - ], - name: "getUsdgMinPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "increaseOrders", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "purchaseToken", - type: "address", - }, - { - internalType: "uint256", - name: "purchaseTokenAmount", - type: "uint256", - }, - { - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "triggerPrice", - type: "uint256", - }, - { - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "increaseOrdersIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_router", - type: "address", - }, - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - { - internalType: "address", - name: "_usdg", - type: "address", - }, - { - internalType: "uint256", - name: "_minExecutionFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minPurchaseTokenAmountUsd", - type: "uint256", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "isInitialized", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minExecutionFee", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minPurchaseTokenAmountUsd", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "router", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_minExecutionFee", - type: "uint256", - }, - ], - name: "setMinExecutionFee", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_minPurchaseTokenAmountUsd", - type: "uint256", - }, - ], - name: "setMinPurchaseTokenAmountUsd", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "swapOrders", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "triggerRatio", - type: "uint256", - }, - { - internalType: "bool", - name: "triggerAboveThreshold", - type: "bool", - }, - { - internalType: "bool", - name: "shouldUnwrap", - type: "bool", - }, - { - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "swapOrdersIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_triggerPrice", - type: "uint256", - }, - { - internalType: "bool", - name: "_triggerAboveThreshold", - type: "bool", - }, - ], - name: "updateDecreaseOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_triggerPrice", - type: "uint256", - }, - { - internalType: "bool", - name: "_triggerAboveThreshold", - type: "bool", - }, - ], - name: "updateIncreaseOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_triggerRatio", - type: "uint256", - }, - { - internalType: "bool", - name: "_triggerAboveThreshold", - type: "bool", - }, - ], - name: "updateSwapOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "usdg", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_triggerAboveThreshold", - type: "bool", - }, - { - internalType: "uint256", - name: "_triggerPrice", - type: "uint256", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_maximizePrice", - type: "bool", - }, - { - internalType: "bool", - name: "_raise", - type: "bool", - }, - ], - name: "validatePositionOrderPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "uint256", - name: "_triggerRatio", - type: "uint256", - }, - ], - name: "validateSwapOrderPriceWithTriggerAboveThreshold", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "vault", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "weth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -] as const; - -export class OrderBook__factory { - static readonly abi = _abi; - static createInterface(): OrderBookInterface { - return new Interface(_abi) as OrderBookInterface; - } - static connect(address: string, runner?: ContractRunner | null): OrderBook { - return new Contract(address, _abi, runner) as unknown as OrderBook; - } -} diff --git a/src/typechain-types/factories/OrderExecutor__factory.ts b/src/typechain-types/factories/OrderExecutor__factory.ts deleted file mode 100644 index ab56458ab3..0000000000 --- a/src/typechain-types/factories/OrderExecutor__factory.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { OrderExecutor, OrderExecutorInterface } from "../OrderExecutor"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_orderBook", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "_address", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "address payable", - name: "_feeReceiver", - type: "address", - }, - ], - name: "executeDecreaseOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_address", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "address payable", - name: "_feeReceiver", - type: "address", - }, - ], - name: "executeIncreaseOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "address payable", - name: "_feeReceiver", - type: "address", - }, - ], - name: "executeSwapOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "orderBook", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "vault", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class OrderExecutor__factory { - static readonly abi = _abi; - static createInterface(): OrderExecutorInterface { - return new Interface(_abi) as OrderExecutorInterface; - } - static connect(address: string, runner?: ContractRunner | null): OrderExecutor { - return new Contract(address, _abi, runner) as unknown as OrderExecutor; - } -} diff --git a/src/typechain-types/factories/PositionManager__factory.ts b/src/typechain-types/factories/PositionManager__factory.ts deleted file mode 100644 index 9ffcf4c2c5..0000000000 --- a/src/typechain-types/factories/PositionManager__factory.ts +++ /dev/null @@ -1,1175 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { PositionManager, PositionManagerInterface } from "../PositionManager"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_router", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - { - internalType: "uint256", - name: "_depositFee", - type: "uint256", - }, - { - internalType: "address", - name: "_orderBook", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "marginFeeBasisPoints", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "referralCode", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "referrer", - type: "address", - }, - ], - name: "DecreasePositionReferral", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "marginFeeBasisPoints", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "referralCode", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "referrer", - type: "address", - }, - ], - name: "IncreasePositionReferral", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "admin", - type: "address", - }, - ], - name: "SetAdmin", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "depositFee", - type: "uint256", - }, - ], - name: "SetDepositFee", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bool", - name: "inLegacyMode", - type: "bool", - }, - ], - name: "SetInLegacyMode", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "increasePositionBufferBps", - type: "uint256", - }, - ], - name: "SetIncreasePositionBufferBps", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "isActive", - type: "bool", - }, - ], - name: "SetLiquidator", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address[]", - name: "tokens", - type: "address[]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "longSizes", - type: "uint256[]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "shortSizes", - type: "uint256[]", - }, - ], - name: "SetMaxGlobalSizes", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "isActive", - type: "bool", - }, - ], - name: "SetOrderKeeper", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "isActive", - type: "bool", - }, - ], - name: "SetPartner", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "referralStorage", - type: "address", - }, - ], - name: "SetReferralStorage", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bool", - name: "shouldValidateIncreaseOrder", - type: "bool", - }, - ], - name: "SetShouldValidateIncreaseOrder", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "receiver", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "WithdrawFees", - type: "event", - }, - { - inputs: [], - name: "BASIS_POINTS_DIVISOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "admin", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "decreasePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - ], - name: "decreasePositionAndSwap", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address payable", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - ], - name: "decreasePositionAndSwapETH", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address payable", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "decreasePositionETH", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "depositFee", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "address payable", - name: "_feeReceiver", - type: "address", - }, - ], - name: "executeDecreaseOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "address payable", - name: "_feeReceiver", - type: "address", - }, - ], - name: "executeIncreaseOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_orderIndex", - type: "uint256", - }, - { - internalType: "address payable", - name: "_feeReceiver", - type: "address", - }, - ], - name: "executeSwapOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "feeReserves", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inLegacyMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "increasePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "increasePositionBufferBps", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "increasePositionETH", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isLiquidator", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isOrderKeeper", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isPartner", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_feeReceiver", - type: "address", - }, - ], - name: "liquidatePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "maxGlobalLongSizes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "maxGlobalShortSizes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "orderBook", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "referralStorage", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "router", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "sendValue", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_admin", - type: "address", - }, - ], - name: "setAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_depositFee", - type: "uint256", - }, - ], - name: "setDepositFee", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inLegacyMode", - type: "bool", - }, - ], - name: "setInLegacyMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_increasePositionBufferBps", - type: "uint256", - }, - ], - name: "setIncreasePositionBufferBps", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setLiquidator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "_longSizes", - type: "uint256[]", - }, - { - internalType: "uint256[]", - name: "_shortSizes", - type: "uint256[]", - }, - ], - name: "setMaxGlobalSizes", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setOrderKeeper", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setPartner", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_referralStorage", - type: "address", - }, - ], - name: "setReferralStorage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_shouldValidateIncreaseOrder", - type: "bool", - }, - ], - name: "setShouldValidateIncreaseOrder", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "shouldValidateIncreaseOrder", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "vault", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "weth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "withdrawFees", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -] as const; - -export class PositionManager__factory { - static readonly abi = _abi; - static createInterface(): PositionManagerInterface { - return new Interface(_abi) as PositionManagerInterface; - } - static connect(address: string, runner?: ContractRunner | null): PositionManager { - return new Contract(address, _abi, runner) as unknown as PositionManager; - } -} diff --git a/src/typechain-types/factories/PositionRouter__factory.ts b/src/typechain-types/factories/PositionRouter__factory.ts deleted file mode 100644 index f811752815..0000000000 --- a/src/typechain-types/factories/PositionRouter__factory.ts +++ /dev/null @@ -1,2040 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { PositionRouter, PositionRouterInterface } from "../PositionRouter"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_router", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - { - internalType: "address", - name: "_shortsTracker", - type: "address", - }, - { - internalType: "uint256", - name: "_depositFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minExecutionFee", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "callbackTarget", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "success", - type: "bool", - }, - ], - name: "Callback", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "address", - name: "receiver", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "acceptablePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "blockGap", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "timeGap", - type: "uint256", - }, - ], - name: "CancelDecreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "acceptablePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "blockGap", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "timeGap", - type: "uint256", - }, - ], - name: "CancelIncreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "address", - name: "receiver", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "acceptablePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "index", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "queueIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "blockNumber", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "blockTime", - type: "uint256", - }, - ], - name: "CreateDecreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "acceptablePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "index", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "queueIndex", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "blockNumber", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "blockTime", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - ], - name: "CreateIncreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "marginFeeBasisPoints", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "referralCode", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "referrer", - type: "address", - }, - ], - name: "DecreasePositionReferral", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "address", - name: "receiver", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "acceptablePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "blockGap", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "timeGap", - type: "uint256", - }, - ], - name: "ExecuteDecreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address[]", - name: "path", - type: "address[]", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "acceptablePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "blockGap", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "timeGap", - type: "uint256", - }, - ], - name: "ExecuteIncreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "marginFeeBasisPoints", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "referralCode", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "referrer", - type: "address", - }, - ], - name: "IncreasePositionReferral", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "admin", - type: "address", - }, - ], - name: "SetAdmin", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "callbackGasLimit", - type: "uint256", - }, - ], - name: "SetCallbackGasLimit", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "minBlockDelayKeeper", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minTimeDelayPublic", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "maxTimeDelay", - type: "uint256", - }, - ], - name: "SetDelayValues", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "depositFee", - type: "uint256", - }, - ], - name: "SetDepositFee", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "increasePositionBufferBps", - type: "uint256", - }, - ], - name: "SetIncreasePositionBufferBps", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bool", - name: "isLeverageEnabled", - type: "bool", - }, - ], - name: "SetIsLeverageEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address[]", - name: "tokens", - type: "address[]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "longSizes", - type: "uint256[]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "shortSizes", - type: "uint256[]", - }, - ], - name: "SetMaxGlobalSizes", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "minExecutionFee", - type: "uint256", - }, - ], - name: "SetMinExecutionFee", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "isActive", - type: "bool", - }, - ], - name: "SetPositionKeeper", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "referralStorage", - type: "address", - }, - ], - name: "SetReferralStorage", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "increasePositionRequestKeysStart", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "decreasePositionRequestKeysStart", - type: "uint256", - }, - ], - name: "SetRequestKeysStartValues", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "receiver", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "WithdrawFees", - type: "event", - }, - { - inputs: [], - name: "BASIS_POINTS_DIVISOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "admin", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "callbackGasLimit", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "address payable", - name: "_executionFeeReceiver", - type: "address", - }, - ], - name: "cancelDecreasePosition", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "address payable", - name: "_executionFeeReceiver", - type: "address", - }, - ], - name: "cancelIncreasePosition", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_acceptablePrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_executionFee", - type: "uint256", - }, - { - internalType: "bool", - name: "_withdrawETH", - type: "bool", - }, - { - internalType: "address", - name: "_callbackTarget", - type: "address", - }, - ], - name: "createDecreasePosition", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_acceptablePrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_executionFee", - type: "uint256", - }, - { - internalType: "bytes32", - name: "_referralCode", - type: "bytes32", - }, - { - internalType: "address", - name: "_callbackTarget", - type: "address", - }, - ], - name: "createIncreasePosition", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_acceptablePrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_executionFee", - type: "uint256", - }, - { - internalType: "bytes32", - name: "_referralCode", - type: "bytes32", - }, - { - internalType: "address", - name: "_callbackTarget", - type: "address", - }, - ], - name: "createIncreasePositionETH", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "decreasePositionRequestKeys", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decreasePositionRequestKeysStart", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "decreasePositionRequests", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - internalType: "address", - name: "receiver", - type: "address", - }, - { - internalType: "uint256", - name: "acceptablePrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "blockNumber", - type: "uint256", - }, - { - internalType: "uint256", - name: "blockTime", - type: "uint256", - }, - { - internalType: "bool", - name: "withdrawETH", - type: "bool", - }, - { - internalType: "address", - name: "callbackTarget", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "decreasePositionsIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "depositFee", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "address payable", - name: "_executionFeeReceiver", - type: "address", - }, - ], - name: "executeDecreasePosition", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_endIndex", - type: "uint256", - }, - { - internalType: "address payable", - name: "_executionFeeReceiver", - type: "address", - }, - ], - name: "executeDecreasePositions", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "address payable", - name: "_executionFeeReceiver", - type: "address", - }, - ], - name: "executeIncreasePosition", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_endIndex", - type: "uint256", - }, - { - internalType: "address payable", - name: "_executionFeeReceiver", - type: "address", - }, - ], - name: "executeIncreasePositions", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "feeReserves", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - ], - name: "getDecreasePositionRequestPath", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - ], - name: "getIncreasePositionRequestPath", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_index", - type: "uint256", - }, - ], - name: "getRequestKey", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [], - name: "getRequestQueueLengths", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "increasePositionBufferBps", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "increasePositionRequestKeys", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "increasePositionRequestKeysStart", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "increasePositionRequests", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "acceptablePrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "executionFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "blockNumber", - type: "uint256", - }, - { - internalType: "uint256", - name: "blockTime", - type: "uint256", - }, - { - internalType: "bool", - name: "hasCollateralInETH", - type: "bool", - }, - { - internalType: "address", - name: "callbackTarget", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "increasePositionsIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isLeverageEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isPositionKeeper", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "maxGlobalLongSizes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "maxGlobalShortSizes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxTimeDelay", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minBlockDelayKeeper", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minExecutionFee", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minTimeDelayPublic", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "referralStorage", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "router", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "sendValue", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_admin", - type: "address", - }, - ], - name: "setAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_callbackGasLimit", - type: "uint256", - }, - ], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_minBlockDelayKeeper", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minTimeDelayPublic", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxTimeDelay", - type: "uint256", - }, - ], - name: "setDelayValues", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_depositFee", - type: "uint256", - }, - ], - name: "setDepositFee", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_increasePositionBufferBps", - type: "uint256", - }, - ], - name: "setIncreasePositionBufferBps", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_isLeverageEnabled", - type: "bool", - }, - ], - name: "setIsLeverageEnabled", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "_longSizes", - type: "uint256[]", - }, - { - internalType: "uint256[]", - name: "_shortSizes", - type: "uint256[]", - }, - ], - name: "setMaxGlobalSizes", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_minExecutionFee", - type: "uint256", - }, - ], - name: "setMinExecutionFee", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setPositionKeeper", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_referralStorage", - type: "address", - }, - ], - name: "setReferralStorage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_increasePositionRequestKeysStart", - type: "uint256", - }, - { - internalType: "uint256", - name: "_decreasePositionRequestKeysStart", - type: "uint256", - }, - ], - name: "setRequestKeysStartValues", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "shortsTracker", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "vault", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "weth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "withdrawFees", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -] as const; - -export class PositionRouter__factory { - static readonly abi = _abi; - static createInterface(): PositionRouterInterface { - return new Interface(_abi) as PositionRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): PositionRouter { - return new Contract(address, _abi, runner) as unknown as PositionRouter; - } -} diff --git a/src/typechain-types/factories/ReaderV2__factory.ts b/src/typechain-types/factories/ReaderV2__factory.ts deleted file mode 100644 index 060eb17756..0000000000 --- a/src/typechain-types/factories/ReaderV2__factory.ts +++ /dev/null @@ -1,640 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { ReaderV2, ReaderV2Interface } from "../ReaderV2"; - -const _abi = [ - { - inputs: [], - name: "BASIS_POINTS_DIVISOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "POSITION_PROPS_LENGTH", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "PRICE_PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "USDG_DECIMALS", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IVault", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_tokenIn", - type: "address", - }, - { - internalType: "address", - name: "_tokenOut", - type: "address", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - ], - name: "getAmountOut", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IVault", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_tokenIn", - type: "address", - }, - { - internalType: "address", - name: "_tokenOut", - type: "address", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - ], - name: "getFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getFees", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgAmount", - type: "uint256", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getFullVaultTokenInfo", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getFundingRates", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IVault", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_tokenIn", - type: "address", - }, - { - internalType: "address", - name: "_tokenOut", - type: "address", - }, - ], - name: "getMaxAmountIn", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_factory", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getPairInfo", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_collateralTokens", - type: "address[]", - }, - { - internalType: "address[]", - name: "_indexTokens", - type: "address[]", - }, - { - internalType: "bool[]", - name: "_isLong", - type: "bool[]", - }, - ], - name: "getPositions", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IVaultPriceFeed", - name: "_priceFeed", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getPrices", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_yieldTrackers", - type: "address[]", - }, - ], - name: "getStakingInfo", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getTokenBalances", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getTokenBalancesWithSupplies", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - internalType: "address[]", - name: "_excludedAccounts", - type: "address[]", - }, - ], - name: "getTokenSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - internalType: "address[]", - name: "_accounts", - type: "address[]", - }, - ], - name: "getTotalBalance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_yieldTokens", - type: "address[]", - }, - ], - name: "getTotalStaked", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgAmount", - type: "uint256", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getVaultTokenInfo", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgAmount", - type: "uint256", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getVaultTokenInfoV2", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_vesters", - type: "address[]", - }, - ], - name: "getVestingInfo", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "hasMaxGlobalShortSizes", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_hasMaxGlobalShortSizes", - type: "bool", - }, - ], - name: "setConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class ReaderV2__factory { - static readonly abi = _abi; - static createInterface(): ReaderV2Interface { - return new Interface(_abi) as ReaderV2Interface; - } - static connect(address: string, runner?: ContractRunner | null): ReaderV2 { - return new Contract(address, _abi, runner) as unknown as ReaderV2; - } -} diff --git a/src/typechain-types/factories/Reader__factory.ts b/src/typechain-types/factories/Reader__factory.ts deleted file mode 100644 index 28cc3b2336..0000000000 --- a/src/typechain-types/factories/Reader__factory.ts +++ /dev/null @@ -1,365 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { Reader, ReaderInterface } from "../Reader"; - -const _abi = [ - { - inputs: [], - name: "BASIS_POINTS_DIVISOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IVault", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_tokenIn", - type: "address", - }, - { - internalType: "address", - name: "_tokenOut", - type: "address", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - ], - name: "getAmountOut", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getFees", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getFundingRates", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IVault", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_tokenIn", - type: "address", - }, - { - internalType: "address", - name: "_tokenOut", - type: "address", - }, - ], - name: "getMaxAmountIn", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_factory", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getPairInfo", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_collateralTokens", - type: "address[]", - }, - { - internalType: "address[]", - name: "_indexTokens", - type: "address[]", - }, - { - internalType: "bool[]", - name: "_isLong", - type: "bool[]", - }, - ], - name: "getPositions", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_yieldTrackers", - type: "address[]", - }, - ], - name: "getStakingInfo", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getTokenBalances", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getTokenBalancesWithSupplies", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - internalType: "address[]", - name: "_excludedAccounts", - type: "address[]", - }, - ], - name: "getTokenSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_yieldTokens", - type: "address[]", - }, - ], - name: "getTotalStaked", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgAmount", - type: "uint256", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getVaultTokenInfo", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class Reader__factory { - static readonly abi = _abi; - static createInterface(): ReaderInterface { - return new Interface(_abi) as ReaderInterface; - } - static connect(address: string, runner?: ContractRunner | null): Reader { - return new Contract(address, _abi, runner) as unknown as Reader; - } -} diff --git a/src/typechain-types/factories/ReferralStorage__factory.ts b/src/typechain-types/factories/ReferralStorage__factory.ts deleted file mode 100644 index 208397afbd..0000000000 --- a/src/typechain-types/factories/ReferralStorage__factory.ts +++ /dev/null @@ -1,572 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { ReferralStorage, ReferralStorageInterface } from "../ReferralStorage"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "msgSender", - type: "address", - }, - { - internalType: "string", - name: "role", - type: "string", - }, - ], - name: "Unauthorized", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "code", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "newAccount", - type: "address", - }, - ], - name: "GovSetCodeOwner", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "bytes32", - name: "code", - type: "bytes32", - }, - ], - name: "RegisterCode", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newAccount", - type: "address", - }, - { - indexed: false, - internalType: "bytes32", - name: "code", - type: "bytes32", - }, - ], - 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: [ - { - indexed: false, - internalType: "address", - name: "handler", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "isActive", - type: "bool", - }, - ], - name: "SetHandler", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "referrer", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "discountShare", - type: "uint256", - }, - ], - name: "SetReferrerDiscountShare", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "referrer", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "tierId", - type: "uint256", - }, - ], - name: "SetReferrerTier", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "tierId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "totalRebate", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "discountShare", - type: "uint256", - }, - ], - name: "SetTier", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "bytes32", - name: "code", - type: "bytes32", - }, - ], - name: "SetTraderReferralCode", - type: "event", - }, - { - inputs: [], - name: "BASIS_POINTS", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "codeOwners", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "getTraderReferralInfo", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_code", - type: "bytes32", - }, - { - internalType: "address", - name: "_newAccount", - type: "address", - }, - ], - name: "govSetCodeOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isHandler", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pendingGov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "referrerDiscountShares", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "referrerTiers", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_code", - type: "bytes32", - }, - ], - name: "registerCode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_code", - type: "bytes32", - }, - { - internalType: "address", - name: "_newAccount", - type: "address", - }, - ], - name: "setCodeOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_handler", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setHandler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_discountShare", - type: "uint256", - }, - ], - name: "setReferrerDiscountShare", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_referrer", - type: "address", - }, - { - internalType: "uint256", - name: "_tierId", - type: "uint256", - }, - ], - name: "setReferrerTier", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_tierId", - type: "uint256", - }, - { - internalType: "uint256", - name: "_totalRebate", - type: "uint256", - }, - { - internalType: "uint256", - name: "_discountShare", - type: "uint256", - }, - ], - name: "setTier", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "bytes32", - name: "_code", - type: "bytes32", - }, - ], - name: "setTraderReferralCode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_code", - type: "bytes32", - }, - ], - name: "setTraderReferralCodeByUser", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "tiers", - outputs: [ - { - internalType: "uint256", - name: "totalRebate", - type: "uint256", - }, - { - internalType: "uint256", - name: "discountShare", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "traderReferralCodes", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_newGov", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class ReferralStorage__factory { - static readonly abi = _abi; - static createInterface(): ReferralStorageInterface { - return new Interface(_abi) as ReferralStorageInterface; - } - static connect(address: string, runner?: ContractRunner | null): ReferralStorage { - return new Contract(address, _abi, runner) as unknown as ReferralStorage; - } -} diff --git a/src/typechain-types/factories/RelayParams__factory.ts b/src/typechain-types/factories/RelayParams__factory.ts deleted file mode 100644 index 14f850683c..0000000000 --- a/src/typechain-types/factories/RelayParams__factory.ts +++ /dev/null @@ -1,162 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { RelayParams, RelayParamsInterface } from "../RelayParams"; - -const _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", - }, -] as const; - -export class RelayParams__factory { - static readonly abi = _abi; - static createInterface(): RelayParamsInterface { - return new Interface(_abi) as RelayParamsInterface; - } - static connect(address: string, runner?: ContractRunner | null): RelayParams { - return new Contract(address, _abi, runner) as unknown as RelayParams; - } -} diff --git a/src/typechain-types/factories/RewardReader__factory.ts b/src/typechain-types/factories/RewardReader__factory.ts deleted file mode 100644 index 51b0938e21..0000000000 --- a/src/typechain-types/factories/RewardReader__factory.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { RewardReader, RewardReaderInterface } from "../RewardReader"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_depositTokens", - type: "address[]", - }, - { - internalType: "address[]", - name: "_rewardTrackers", - type: "address[]", - }, - ], - name: "getDepositBalances", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_rewardTrackers", - type: "address[]", - }, - ], - name: "getStakingInfo", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address[]", - name: "_vesters", - type: "address[]", - }, - ], - name: "getVestingInfoV2", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class RewardReader__factory { - static readonly abi = _abi; - static createInterface(): RewardReaderInterface { - return new Interface(_abi) as RewardReaderInterface; - } - static connect(address: string, runner?: ContractRunner | null): RewardReader { - return new Contract(address, _abi, runner) as unknown as RewardReader; - } -} diff --git a/src/typechain-types/factories/RewardRouter__factory.ts b/src/typechain-types/factories/RewardRouter__factory.ts deleted file mode 100644 index 64eb3d38c9..0000000000 --- a/src/typechain-types/factories/RewardRouter__factory.ts +++ /dev/null @@ -1,1034 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { RewardRouter, RewardRouterInterface } from "../RewardRouter"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "StakeGlp", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "StakeGmx", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "UnstakeGlp", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "UnstakeGmx", - type: "event", - }, - { - inputs: [], - name: "BASIS_POINTS_DIVISOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_sender", - type: "address", - }, - ], - name: "acceptTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_accounts", - type: "address[]", - }, - ], - name: "batchCompoundForAccounts", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_accounts", - type: "address[]", - }, - ], - name: "batchRestakeForAccounts", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_accounts", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "_amounts", - type: "uint256[]", - }, - ], - name: "batchStakeGmxForAccounts", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "bnGmx", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "bonusGmxTracker", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "claim", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "claimEsGmx", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "claimFees", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "compound", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "esGmx", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "extendedGmxTracker", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "externalHandler", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "feeGlpTracker", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "feeGmxTracker", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "glp", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "glpManager", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "glpVester", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gmx", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gmxVester", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "govToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_shouldClaimGmx", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldStakeGmx", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldClaimEsGmx", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldStakeEsGmx", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldStakeMultiplierPoints", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldClaimWeth", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldConvertWethToEth", - type: "bool", - }, - ], - name: "handleRewards", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gmxReceiver", - type: "address", - }, - { - internalType: "bool", - name: "_shouldClaimGmx", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldStakeGmx", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldClaimEsGmx", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldStakeEsGmx", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldStakeMultiplierPoints", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldClaimWeth", - type: "bool", - }, - { - internalType: "bool", - name: "_shouldConvertWethToEth", - type: "bool", - }, - ], - name: "handleRewardsV2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "inRestakingMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inStrictTransferMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "weth", - type: "address", - }, - { - internalType: "address", - name: "gmx", - type: "address", - }, - { - internalType: "address", - name: "esGmx", - type: "address", - }, - { - internalType: "address", - name: "bnGmx", - type: "address", - }, - { - internalType: "address", - name: "glp", - type: "address", - }, - { - internalType: "address", - name: "stakedGmxTracker", - type: "address", - }, - { - internalType: "address", - name: "bonusGmxTracker", - type: "address", - }, - { - internalType: "address", - name: "extendedGmxTracker", - type: "address", - }, - { - internalType: "address", - name: "feeGmxTracker", - type: "address", - }, - { - internalType: "address", - name: "feeGlpTracker", - type: "address", - }, - { - internalType: "address", - name: "stakedGlpTracker", - type: "address", - }, - { - internalType: "address", - name: "glpManager", - type: "address", - }, - { - internalType: "address", - name: "gmxVester", - type: "address", - }, - { - internalType: "address", - name: "glpVester", - type: "address", - }, - { - internalType: "address", - name: "externalHandler", - type: "address", - }, - { - internalType: "address", - name: "govToken", - type: "address", - }, - ], - internalType: "struct RewardRouterV2.InitializeParams", - name: "_initializeParams", - type: "tuple", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "isInitialized", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - 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: [], - name: "maxBoostBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minUsdg", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minGlp", - type: "uint256", - }, - ], - name: "mintAndStakeGlp", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_minUsdg", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minGlp", - type: "uint256", - }, - ], - name: "mintAndStakeGlpETH", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes[]", - name: "data", - type: "bytes[]", - }, - ], - name: "multicall", - outputs: [ - { - internalType: "bytes[]", - name: "results", - type: "bytes[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "pendingReceivers", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_govToken", - type: "address", - }, - ], - name: "setGovToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inRestakingMode", - type: "bool", - }, - ], - name: "setInRestakingMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inStrictTransferMode", - type: "bool", - }, - ], - name: "setInStrictTransferMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxBoostBasisPoints", - type: "uint256", - }, - ], - name: "setMaxBoostBasisPoints", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "enum RewardRouterV2.VotingPowerType", - name: "_votingPowerType", - type: "uint8", - }, - ], - name: "setVotingPowerType", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "signalTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "stakeEsGmx", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "stakeGmx", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "stakedGlpTracker", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stakedGmxTracker", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_tokenOut", - type: "address", - }, - { - internalType: "uint256", - name: "_glpAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "unstakeAndRedeemGlp", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_glpAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "address payable", - name: "_receiver", - type: "address", - }, - ], - name: "unstakeAndRedeemGlpETH", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "unstakeEsGmx", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "unstakeGmx", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "votingPowerType", - outputs: [ - { - internalType: "enum RewardRouterV2.VotingPowerType", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "weth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "withdrawToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -] as const; - -export class RewardRouter__factory { - static readonly abi = _abi; - static createInterface(): RewardRouterInterface { - return new Interface(_abi) as RewardRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): RewardRouter { - return new Contract(address, _abi, runner) as unknown as RewardRouter; - } -} diff --git a/src/typechain-types/factories/RewardTracker__factory.ts b/src/typechain-types/factories/RewardTracker__factory.ts deleted file mode 100644 index 240fd89348..0000000000 --- a/src/typechain-types/factories/RewardTracker__factory.ts +++ /dev/null @@ -1,928 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { RewardTracker, RewardTrackerInterface } from "../RewardTracker"; - -const _abi = [ - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - 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: false, - internalType: "address", - name: "receiver", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "Claim", - 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", - }, - { - inputs: [], - name: "BASIS_POINTS_DIVISOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - 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: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "allowances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "averageStakedAmounts", - 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: "address", - name: "", - type: "address", - }, - ], - name: "balances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "claim", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "claimForAccount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "claimable", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "claimableReward", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "cumulativeRewardPerToken", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "cumulativeRewards", - 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: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "depositBalances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "distributor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inPrivateClaimingMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inPrivateStakingMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inPrivateTransferMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_depositTokens", - type: "address[]", - }, - { - internalType: "address", - name: "_distributor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isDepositToken", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isHandler", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isInitialized", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "previousCumulatedRewardPerToken", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rewardToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_depositToken", - type: "address", - }, - { - internalType: "bool", - name: "_isDepositToken", - type: "bool", - }, - ], - name: "setDepositToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_handler", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setHandler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inPrivateClaimingMode", - type: "bool", - }, - ], - name: "setInPrivateClaimingMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inPrivateStakingMode", - type: "bool", - }, - ], - name: "setInPrivateStakingMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inPrivateTransferMode", - type: "bool", - }, - ], - name: "setInPrivateTransferMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_depositToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "stake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_fundingAccount", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_depositToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "stakeForAccount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "stakedAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "tokensPerInterval", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "totalDepositSupply", - 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: "_recipient", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_sender", - type: "address", - }, - { - internalType: "address", - name: "_recipient", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_depositToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "unstake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_depositToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "unstakeForAccount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "updateRewards", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "withdrawToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class RewardTracker__factory { - static readonly abi = _abi; - static createInterface(): RewardTrackerInterface { - return new Interface(_abi) as RewardTrackerInterface; - } - static connect(address: string, runner?: ContractRunner | null): RewardTracker { - return new Contract(address, _abi, runner) as unknown as RewardTracker; - } -} diff --git a/src/typechain-types/factories/RouterV2__factory.ts b/src/typechain-types/factories/RouterV2__factory.ts deleted file mode 100644 index 6061784e4e..0000000000 --- a/src/typechain-types/factories/RouterV2__factory.ts +++ /dev/null @@ -1,615 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { RouterV2, RouterV2Interface } from "../RouterV2"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_usdg", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tokenOut", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "Swap", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_plugin", - type: "address", - }, - ], - name: "addPlugin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_plugin", - type: "address", - }, - ], - name: "approvePlugin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "approvedPlugins", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "decreasePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address payable", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "decreasePositionETH", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_plugin", - type: "address", - }, - ], - name: "denyPlugin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "directPoolDeposit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "increasePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "increasePositionETH", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "pluginDecreasePosition", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "pluginIncreasePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "pluginTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "plugins", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_plugin", - type: "address", - }, - ], - name: "removePlugin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "swap", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "swapETHToTokens", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "address payable", - name: "_receiver", - type: "address", - }, - ], - name: "swapTokensToETH", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "usdg", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "vault", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "weth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -] as const; - -export class RouterV2__factory { - static readonly abi = _abi; - static createInterface(): RouterV2Interface { - return new Interface(_abi) as RouterV2Interface; - } - static connect(address: string, runner?: ContractRunner | null): RouterV2 { - return new Contract(address, _abi, runner) as unknown as RouterV2; - } -} diff --git a/src/typechain-types/factories/Router__factory.ts b/src/typechain-types/factories/Router__factory.ts deleted file mode 100644 index 819909be03..0000000000 --- a/src/typechain-types/factories/Router__factory.ts +++ /dev/null @@ -1,615 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { Router, RouterInterface } from "../Router"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_usdg", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tokenOut", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - ], - name: "Swap", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_plugin", - type: "address", - }, - ], - name: "addPlugin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_plugin", - type: "address", - }, - ], - name: "approvePlugin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "approvedPlugins", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "decreasePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address payable", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "decreasePositionETH", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_plugin", - type: "address", - }, - ], - name: "denyPlugin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "directPoolDeposit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "increasePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "increasePositionETH", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "pluginDecreasePosition", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "pluginIncreasePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "pluginTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "plugins", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_plugin", - type: "address", - }, - ], - name: "removePlugin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "swap", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "swapETHToTokens", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_path", - type: "address[]", - }, - { - internalType: "uint256", - name: "_amountIn", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minOut", - type: "uint256", - }, - { - internalType: "address payable", - name: "_receiver", - type: "address", - }, - ], - name: "swapTokensToETH", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "usdg", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "vault", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "weth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -] as const; - -export class Router__factory { - static readonly abi = _abi; - static createInterface(): RouterInterface { - return new Interface(_abi) as RouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): Router { - return new Contract(address, _abi, runner) as unknown as Router; - } -} diff --git a/src/typechain-types/factories/SmartAccount__factory.ts b/src/typechain-types/factories/SmartAccount__factory.ts deleted file mode 100644 index f750c05a4c..0000000000 --- a/src/typechain-types/factories/SmartAccount__factory.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { SmartAccount, SmartAccountInterface } from "../SmartAccount"; - -const _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", - }, -] as const; - -export class SmartAccount__factory { - static readonly abi = _abi; - static createInterface(): SmartAccountInterface { - return new Interface(_abi) as SmartAccountInterface; - } - static connect(address: string, runner?: ContractRunner | null): SmartAccount { - return new Contract(address, _abi, runner) as unknown as SmartAccount; - } -} diff --git a/src/typechain-types/factories/StBTC__factory.ts b/src/typechain-types/factories/StBTC__factory.ts deleted file mode 100644 index 868edb12be..0000000000 --- a/src/typechain-types/factories/StBTC__factory.ts +++ /dev/null @@ -1,1235 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { StBTC, StBTCInterface } from "../StBTC"; - -const _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", - }, -] as const; - -export class StBTC__factory { - static readonly abi = _abi; - static createInterface(): StBTCInterface { - return new Interface(_abi) as StBTCInterface; - } - static connect(address: string, runner?: ContractRunner | null): StBTC { - return new Contract(address, _abi, runner) as unknown as StBTC; - } -} diff --git a/src/typechain-types/factories/SubaccountApproval__factory.ts b/src/typechain-types/factories/SubaccountApproval__factory.ts deleted file mode 100644 index 836602332d..0000000000 --- a/src/typechain-types/factories/SubaccountApproval__factory.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { SubaccountApproval, SubaccountApprovalInterface } from "../SubaccountApproval"; - -const _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", - }, - ], - }, -] as const; - -export class SubaccountApproval__factory { - static readonly abi = _abi; - static createInterface(): SubaccountApprovalInterface { - return new Interface(_abi) as SubaccountApprovalInterface; - } - static connect(address: string, runner?: ContractRunner | null): SubaccountApproval { - return new Contract(address, _abi, runner) as unknown as SubaccountApproval; - } -} diff --git a/src/typechain-types/factories/SubaccountGelatoRelayRouter__factory.ts b/src/typechain-types/factories/SubaccountGelatoRelayRouter__factory.ts deleted file mode 100644 index a6230e907f..0000000000 --- a/src/typechain-types/factories/SubaccountGelatoRelayRouter__factory.ts +++ /dev/null @@ -1,2034 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { SubaccountGelatoRelayRouter, SubaccountGelatoRelayRouterInterface } from "../SubaccountGelatoRelayRouter"; - -const _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", - }, -] as const; - -export class SubaccountGelatoRelayRouter__factory { - static readonly abi = _abi; - static createInterface(): SubaccountGelatoRelayRouterInterface { - return new Interface(_abi) as SubaccountGelatoRelayRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): SubaccountGelatoRelayRouter { - return new Contract(address, _abi, runner) as unknown as SubaccountGelatoRelayRouter; - } -} diff --git a/src/typechain-types/factories/SubaccountRouter__factory.ts b/src/typechain-types/factories/SubaccountRouter__factory.ts deleted file mode 100644 index 8dba6fb672..0000000000 --- a/src/typechain-types/factories/SubaccountRouter__factory.ts +++ /dev/null @@ -1,617 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { SubaccountRouter, SubaccountRouterInterface } from "../SubaccountRouter"; - -const _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 IOrderHandler", - name: "_orderHandler", - type: "address", - }, - { - internalType: "contract OrderVault", - name: "_orderVault", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - 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: "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", - }, - { - 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: "subaccount", - type: "address", - }, - ], - name: "addSubaccount", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "cancelOrder", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - 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: "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: [ - { - internalType: "bytes[]", - name: "data", - type: "bytes[]", - }, - ], - name: "multicall", - outputs: [ - { - internalType: "bytes[]", - name: "results", - type: "bytes[]", - }, - ], - stateMutability: "payable", - 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: [ - { - internalType: "address", - name: "subaccount", - type: "address", - }, - ], - name: "removeSubaccount", - outputs: [], - 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: "address", - name: "subaccount", - type: "address", - }, - { - internalType: "bytes32", - name: "integrationId", - type: "bytes32", - }, - ], - name: "setIntegrationId", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "subaccount", - type: "address", - }, - { - internalType: "bytes32", - name: "actionType", - type: "bytes32", - }, - { - internalType: "uint256", - name: "maxAllowedCount", - type: "uint256", - }, - ], - name: "setMaxAllowedSubaccountActionCount", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "subaccount", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "setSubaccountAutoTopUpAmount", - outputs: [], - 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: [ - { - 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", - }, - ], - name: "updateOrder", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -] as const; - -export class SubaccountRouter__factory { - static readonly abi = _abi; - static createInterface(): SubaccountRouterInterface { - return new Interface(_abi) as SubaccountRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): SubaccountRouter { - return new Contract(address, _abi, runner) as unknown as SubaccountRouter; - } -} diff --git a/src/typechain-types/factories/SyntheticsReader__factory.ts b/src/typechain-types/factories/SyntheticsReader__factory.ts deleted file mode 100644 index a4383064c9..0000000000 --- a/src/typechain-types/factories/SyntheticsReader__factory.ts +++ /dev/null @@ -1,4920 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { SyntheticsReader, SyntheticsReaderInterface } from "../SyntheticsReader"; - -const _abi = [ - { - 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: "getAccountOrders", - outputs: [ - { - components: [ - { - internalType: "bytes32", - name: "orderKey", - type: "bytes32", - }, - { - 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", - }, - { - 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", - }, - { - 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: "bytes32[]", - name: "_dataList", - type: "bytes32[]", - }, - ], - internalType: "struct Order.Props", - name: "order", - type: "tuple", - }, - ], - internalType: "struct ReaderUtils.OrderInfo[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "contract IReferralStorage", - name: "referralStorage", - type: "address", - }, - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address[]", - name: "markets", - type: "address[]", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices[]", - name: "marketPrices", - type: "tuple[]", - }, - { - internalType: "address", - name: "uiFeeReceiver", - type: "address", - }, - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - name: "getAccountPositionInfoList", - outputs: [ - { - components: [ - { - internalType: "bytes32", - name: "positionKey", - type: "bytes32", - }, - { - components: [ - { - components: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "address", - name: "collateralToken", - type: "address", - }, - ], - internalType: "struct Position.Addresses", - name: "addresses", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "sizeInUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "sizeInTokens", - type: "uint256", - }, - { - internalType: "uint256", - name: "collateralAmount", - type: "uint256", - }, - { - internalType: "int256", - name: "pendingImpactAmount", - type: "int256", - }, - { - internalType: "uint256", - name: "borrowingFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "fundingFeeAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "longTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "increasedAtTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "decreasedAtTime", - type: "uint256", - }, - ], - internalType: "struct Position.Numbers", - name: "numbers", - type: "tuple", - }, - { - components: [ - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - ], - internalType: "struct Position.Flags", - name: "flags", - type: "tuple", - }, - ], - internalType: "struct Position.Props", - name: "position", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "bytes32", - name: "referralCode", - type: "bytes32", - }, - { - internalType: "address", - name: "affiliate", - type: "address", - }, - { - internalType: "address", - name: "trader", - type: "address", - }, - { - internalType: "uint256", - name: "totalRebateFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "affiliateRewardFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "adjustedAffiliateRewardFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalRebateAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "affiliateRewardAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionReferralFees", - name: "referral", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "traderTier", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionProFees", - name: "pro", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "fundingFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "claimableLongTokenAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "claimableShortTokenAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "latestFundingFeeAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "latestLongTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "latestShortTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionFundingFees", - name: "funding", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "borrowingFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFeeAmountForFeeReceiver", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionBorrowingFees", - name: "borrowing", - type: "tuple", - }, - { - components: [ - { - internalType: "address", - name: "uiFeeReceiver", - type: "address", - }, - { - internalType: "uint256", - name: "uiFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "uiFeeAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionUiFees", - name: "ui", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "liquidationFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidationFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidationFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidationFeeAmountForFeeReceiver", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionLiquidationFees", - name: "liquidation", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "collateralTokenPrice", - type: "tuple", - }, - { - internalType: "uint256", - name: "positionFeeFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "protocolFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeReceiverAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeAmountForPool", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionFeeAmountForPool", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCostAmountExcludingFunding", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCostAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalDiscountAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionFees", - name: "fees", - type: "tuple", - }, - { - components: [ - { - internalType: "int256", - name: "priceImpactUsd", - type: "int256", - }, - { - internalType: "uint256", - 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: "priceImpactDiffUsd", - type: "uint256", - }, - ], - internalType: "struct ReaderPricingUtils.ExecutionPriceResult", - name: "executionPriceResult", - type: "tuple", - }, - { - internalType: "int256", - name: "basePnlUsd", - type: "int256", - }, - { - internalType: "int256", - name: "uncappedBasePnlUsd", - type: "int256", - }, - { - internalType: "int256", - name: "pnlAfterPriceImpactUsd", - type: "int256", - }, - ], - internalType: "struct ReaderPositionUtils.PositionInfo[]", - 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: "getAccountPositions", - outputs: [ - { - components: [ - { - components: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "address", - name: "collateralToken", - type: "address", - }, - ], - internalType: "struct Position.Addresses", - name: "addresses", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "sizeInUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "sizeInTokens", - type: "uint256", - }, - { - internalType: "uint256", - name: "collateralAmount", - type: "uint256", - }, - { - internalType: "int256", - name: "pendingImpactAmount", - type: "int256", - }, - { - internalType: "uint256", - name: "borrowingFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "fundingFeeAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "longTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "increasedAtTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "decreasedAtTime", - type: "uint256", - }, - ], - internalType: "struct Position.Numbers", - name: "numbers", - type: "tuple", - }, - { - components: [ - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - ], - internalType: "struct Position.Flags", - name: "flags", - type: "tuple", - }, - ], - internalType: "struct Position.Props[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices", - name: "prices", - type: "tuple", - }, - ], - name: "getAdlState", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "int256", - name: "", - type: "int256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getDeposit", - outputs: [ - { - components: [ - { - components: [ - { - 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 Deposit.Addresses", - name: "addresses", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "initialLongTokenAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "initialShortTokenAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "minMarketTokens", - 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 Deposit.Numbers", - name: "numbers", - type: "tuple", - }, - { - components: [ - { - internalType: "bool", - name: "shouldUnwrapNativeToken", - type: "bool", - }, - ], - internalType: "struct Deposit.Flags", - name: "flags", - type: "tuple", - }, - { - internalType: "bytes32[]", - name: "_dataList", - type: "bytes32[]", - }, - ], - internalType: "struct Deposit.Props", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "market", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices", - name: "prices", - type: "tuple", - }, - { - internalType: "uint256", - name: "longTokenAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortTokenAmount", - type: "uint256", - }, - { - internalType: "address", - name: "uiFeeReceiver", - type: "address", - }, - { - internalType: "enum ISwapPricingUtils.SwapPricingType", - name: "swapPricingType", - type: "uint8", - }, - { - internalType: "bool", - name: "includeVirtualInventoryImpact", - type: "bool", - }, - ], - name: "getDepositAmountOut", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "address", - name: "marketKey", - type: "address", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices", - name: "prices", - type: "tuple", - }, - { - internalType: "uint256", - name: "positionSizeInUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionSizeInTokens", - type: "uint256", - }, - { - internalType: "int256", - name: "sizeDeltaUsd", - type: "int256", - }, - { - internalType: "int256", - name: "pendingImpactAmount", - type: "int256", - }, - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - ], - name: "getExecutionPrice", - outputs: [ - { - components: [ - { - internalType: "int256", - name: "priceImpactUsd", - type: "int256", - }, - { - internalType: "uint256", - 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: "priceImpactDiffUsd", - type: "uint256", - }, - ], - internalType: "struct ReaderPricingUtils.ExecutionPriceResult", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "address", - name: "key", - type: "address", - }, - ], - name: "getMarket", - outputs: [ - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - ], - name: "getMarketBySalt", - outputs: [ - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices", - name: "prices", - type: "tuple", - }, - { - internalType: "address", - name: "marketKey", - type: "address", - }, - ], - name: "getMarketInfo", - outputs: [ - { - components: [ - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "market", - type: "tuple", - }, - { - internalType: "uint256", - name: "borrowingFactorPerSecondForLongs", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFactorPerSecondForShorts", - type: "uint256", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "long", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "short", - type: "tuple", - }, - ], - internalType: "struct MarketUtils.PositionType", - name: "fundingFeeAmountPerSize", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "long", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "short", - type: "tuple", - }, - ], - internalType: "struct MarketUtils.PositionType", - name: "claimableFundingAmountPerSize", - type: "tuple", - }, - ], - internalType: "struct ReaderUtils.BaseFundingValues", - name: "baseFunding", - type: "tuple", - }, - { - components: [ - { - internalType: "bool", - name: "longsPayShorts", - type: "bool", - }, - { - internalType: "uint256", - name: "fundingFactorPerSecond", - type: "uint256", - }, - { - internalType: "int256", - name: "nextSavedFundingFactorPerSecond", - type: "int256", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "long", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "short", - type: "tuple", - }, - ], - internalType: "struct MarketUtils.PositionType", - name: "fundingFeeAmountPerSizeDelta", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "long", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "short", - type: "tuple", - }, - ], - internalType: "struct MarketUtils.PositionType", - name: "claimableFundingAmountPerSizeDelta", - type: "tuple", - }, - ], - internalType: "struct MarketUtils.GetNextFundingAmountPerSizeResult", - name: "nextFunding", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "virtualPoolAmountForLongToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "virtualPoolAmountForShortToken", - type: "uint256", - }, - { - internalType: "int256", - name: "virtualInventoryForPositions", - type: "int256", - }, - ], - internalType: "struct ReaderUtils.VirtualInventory", - name: "virtualInventory", - type: "tuple", - }, - { - internalType: "bool", - name: "isDisabled", - type: "bool", - }, - ], - internalType: "struct ReaderUtils.MarketInfo", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices[]", - name: "marketPricesList", - type: "tuple[]", - }, - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - name: "getMarketInfoList", - outputs: [ - { - components: [ - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "market", - type: "tuple", - }, - { - internalType: "uint256", - name: "borrowingFactorPerSecondForLongs", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFactorPerSecondForShorts", - type: "uint256", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "long", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "short", - type: "tuple", - }, - ], - internalType: "struct MarketUtils.PositionType", - name: "fundingFeeAmountPerSize", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "long", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "short", - type: "tuple", - }, - ], - internalType: "struct MarketUtils.PositionType", - name: "claimableFundingAmountPerSize", - type: "tuple", - }, - ], - internalType: "struct ReaderUtils.BaseFundingValues", - name: "baseFunding", - type: "tuple", - }, - { - components: [ - { - internalType: "bool", - name: "longsPayShorts", - type: "bool", - }, - { - internalType: "uint256", - name: "fundingFactorPerSecond", - type: "uint256", - }, - { - internalType: "int256", - name: "nextSavedFundingFactorPerSecond", - type: "int256", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "long", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "short", - type: "tuple", - }, - ], - internalType: "struct MarketUtils.PositionType", - name: "fundingFeeAmountPerSizeDelta", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "long", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "longToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortToken", - type: "uint256", - }, - ], - internalType: "struct MarketUtils.CollateralType", - name: "short", - type: "tuple", - }, - ], - internalType: "struct MarketUtils.PositionType", - name: "claimableFundingAmountPerSizeDelta", - type: "tuple", - }, - ], - internalType: "struct MarketUtils.GetNextFundingAmountPerSizeResult", - name: "nextFunding", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "virtualPoolAmountForLongToken", - type: "uint256", - }, - { - internalType: "uint256", - name: "virtualPoolAmountForShortToken", - type: "uint256", - }, - { - internalType: "int256", - name: "virtualInventoryForPositions", - type: "int256", - }, - ], - internalType: "struct ReaderUtils.VirtualInventory", - name: "virtualInventory", - type: "tuple", - }, - { - internalType: "bool", - name: "isDisabled", - type: "bool", - }, - ], - internalType: "struct ReaderUtils.MarketInfo[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "market", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "bytes32", - name: "pnlFactorType", - type: "bytes32", - }, - { - internalType: "bool", - name: "maximize", - type: "bool", - }, - ], - name: "getMarketTokenPrice", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - { - components: [ - { - internalType: "int256", - name: "poolValue", - type: "int256", - }, - { - internalType: "int256", - name: "longPnl", - type: "int256", - }, - { - internalType: "int256", - name: "shortPnl", - type: "int256", - }, - { - internalType: "int256", - name: "netPnl", - type: "int256", - }, - { - internalType: "uint256", - name: "longTokenAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortTokenAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "longTokenUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortTokenUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalBorrowingFees", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFeePoolFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "impactPoolAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "lentImpactPoolAmount", - type: "uint256", - }, - ], - internalType: "struct MarketPoolValueInfo.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: "getMarkets", - outputs: [ - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "market", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - type: "tuple", - }, - { - internalType: "bool", - name: "maximize", - type: "bool", - }, - ], - name: "getNetPnl", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "market", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - type: "tuple", - }, - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - internalType: "bool", - name: "maximize", - type: "bool", - }, - ], - name: "getOpenInterestWithPnl", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getOrder", - outputs: [ - { - 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", - }, - { - 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", - }, - { - 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: "bytes32[]", - name: "_dataList", - type: "bytes32[]", - }, - ], - internalType: "struct Order.Props", - name: "", - type: "tuple", - }, - ], - 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: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "market", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - type: "tuple", - }, - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - internalType: "bool", - name: "maximize", - type: "bool", - }, - ], - name: "getPnl", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "address", - name: "marketAddress", - type: "address", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices", - name: "prices", - type: "tuple", - }, - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - internalType: "bool", - name: "maximize", - type: "bool", - }, - ], - name: "getPnlToPoolFactor", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getPosition", - outputs: [ - { - components: [ - { - components: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "address", - name: "collateralToken", - type: "address", - }, - ], - internalType: "struct Position.Addresses", - name: "addresses", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "sizeInUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "sizeInTokens", - type: "uint256", - }, - { - internalType: "uint256", - name: "collateralAmount", - type: "uint256", - }, - { - internalType: "int256", - name: "pendingImpactAmount", - type: "int256", - }, - { - internalType: "uint256", - name: "borrowingFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "fundingFeeAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "longTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "increasedAtTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "decreasedAtTime", - type: "uint256", - }, - ], - internalType: "struct Position.Numbers", - name: "numbers", - type: "tuple", - }, - { - components: [ - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - ], - internalType: "struct Position.Flags", - name: "flags", - type: "tuple", - }, - ], - internalType: "struct Position.Props", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "contract IReferralStorage", - name: "referralStorage", - type: "address", - }, - { - internalType: "bytes32", - name: "positionKey", - type: "bytes32", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices", - name: "prices", - type: "tuple", - }, - { - internalType: "uint256", - name: "sizeDeltaUsd", - type: "uint256", - }, - { - internalType: "address", - name: "uiFeeReceiver", - type: "address", - }, - { - internalType: "bool", - name: "usePositionSizeAsSizeDeltaUsd", - type: "bool", - }, - ], - name: "getPositionInfo", - outputs: [ - { - components: [ - { - internalType: "bytes32", - name: "positionKey", - type: "bytes32", - }, - { - components: [ - { - components: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "address", - name: "collateralToken", - type: "address", - }, - ], - internalType: "struct Position.Addresses", - name: "addresses", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "sizeInUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "sizeInTokens", - type: "uint256", - }, - { - internalType: "uint256", - name: "collateralAmount", - type: "uint256", - }, - { - internalType: "int256", - name: "pendingImpactAmount", - type: "int256", - }, - { - internalType: "uint256", - name: "borrowingFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "fundingFeeAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "longTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "increasedAtTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "decreasedAtTime", - type: "uint256", - }, - ], - internalType: "struct Position.Numbers", - name: "numbers", - type: "tuple", - }, - { - components: [ - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - ], - internalType: "struct Position.Flags", - name: "flags", - type: "tuple", - }, - ], - internalType: "struct Position.Props", - name: "position", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "bytes32", - name: "referralCode", - type: "bytes32", - }, - { - internalType: "address", - name: "affiliate", - type: "address", - }, - { - internalType: "address", - name: "trader", - type: "address", - }, - { - internalType: "uint256", - name: "totalRebateFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "affiliateRewardFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "adjustedAffiliateRewardFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalRebateAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "affiliateRewardAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionReferralFees", - name: "referral", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "traderTier", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionProFees", - name: "pro", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "fundingFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "claimableLongTokenAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "claimableShortTokenAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "latestFundingFeeAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "latestLongTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "latestShortTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionFundingFees", - name: "funding", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "borrowingFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFeeAmountForFeeReceiver", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionBorrowingFees", - name: "borrowing", - type: "tuple", - }, - { - components: [ - { - internalType: "address", - name: "uiFeeReceiver", - type: "address", - }, - { - internalType: "uint256", - name: "uiFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "uiFeeAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionUiFees", - name: "ui", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "liquidationFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidationFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidationFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidationFeeAmountForFeeReceiver", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionLiquidationFees", - name: "liquidation", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "collateralTokenPrice", - type: "tuple", - }, - { - internalType: "uint256", - name: "positionFeeFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "protocolFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeReceiverAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeAmountForPool", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionFeeAmountForPool", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCostAmountExcludingFunding", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCostAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalDiscountAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionFees", - name: "fees", - type: "tuple", - }, - { - components: [ - { - internalType: "int256", - name: "priceImpactUsd", - type: "int256", - }, - { - internalType: "uint256", - 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: "priceImpactDiffUsd", - type: "uint256", - }, - ], - internalType: "struct ReaderPricingUtils.ExecutionPriceResult", - name: "executionPriceResult", - type: "tuple", - }, - { - internalType: "int256", - name: "basePnlUsd", - type: "int256", - }, - { - internalType: "int256", - name: "uncappedBasePnlUsd", - type: "int256", - }, - { - internalType: "int256", - name: "pnlAfterPriceImpactUsd", - type: "int256", - }, - ], - internalType: "struct ReaderPositionUtils.PositionInfo", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "contract IReferralStorage", - name: "referralStorage", - type: "address", - }, - { - internalType: "bytes32[]", - name: "positionKeys", - type: "bytes32[]", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices[]", - name: "prices", - type: "tuple[]", - }, - { - internalType: "address", - name: "uiFeeReceiver", - type: "address", - }, - ], - name: "getPositionInfoList", - outputs: [ - { - components: [ - { - internalType: "bytes32", - name: "positionKey", - type: "bytes32", - }, - { - components: [ - { - components: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "market", - type: "address", - }, - { - internalType: "address", - name: "collateralToken", - type: "address", - }, - ], - internalType: "struct Position.Addresses", - name: "addresses", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "sizeInUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "sizeInTokens", - type: "uint256", - }, - { - internalType: "uint256", - name: "collateralAmount", - type: "uint256", - }, - { - internalType: "int256", - name: "pendingImpactAmount", - type: "int256", - }, - { - internalType: "uint256", - name: "borrowingFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "fundingFeeAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "longTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "shortTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "increasedAtTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "decreasedAtTime", - type: "uint256", - }, - ], - internalType: "struct Position.Numbers", - name: "numbers", - type: "tuple", - }, - { - components: [ - { - internalType: "bool", - name: "isLong", - type: "bool", - }, - ], - internalType: "struct Position.Flags", - name: "flags", - type: "tuple", - }, - ], - internalType: "struct Position.Props", - name: "position", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "bytes32", - name: "referralCode", - type: "bytes32", - }, - { - internalType: "address", - name: "affiliate", - type: "address", - }, - { - internalType: "address", - name: "trader", - type: "address", - }, - { - internalType: "uint256", - name: "totalRebateFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "affiliateRewardFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "adjustedAffiliateRewardFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalRebateAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "affiliateRewardAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionReferralFees", - name: "referral", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "traderTier", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "traderDiscountAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionProFees", - name: "pro", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "fundingFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "claimableLongTokenAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "claimableShortTokenAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "latestFundingFeeAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "latestLongTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - { - internalType: "uint256", - name: "latestShortTokenClaimableFundingAmountPerSize", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionFundingFees", - name: "funding", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "borrowingFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "borrowingFeeAmountForFeeReceiver", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionBorrowingFees", - name: "borrowing", - type: "tuple", - }, - { - components: [ - { - internalType: "address", - name: "uiFeeReceiver", - type: "address", - }, - { - internalType: "uint256", - name: "uiFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "uiFeeAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionUiFees", - name: "ui", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "liquidationFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidationFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidationFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "liquidationFeeAmountForFeeReceiver", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionLiquidationFees", - name: "liquidation", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "collateralTokenPrice", - type: "tuple", - }, - { - internalType: "uint256", - name: "positionFeeFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "protocolFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeReceiverAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeAmountForPool", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionFeeAmountForPool", - type: "uint256", - }, - { - internalType: "uint256", - name: "positionFeeAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCostAmountExcludingFunding", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCostAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalDiscountAmount", - type: "uint256", - }, - ], - internalType: "struct PositionPricingUtils.PositionFees", - name: "fees", - type: "tuple", - }, - { - components: [ - { - internalType: "int256", - name: "priceImpactUsd", - type: "int256", - }, - { - internalType: "uint256", - 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: "priceImpactDiffUsd", - type: "uint256", - }, - ], - internalType: "struct ReaderPricingUtils.ExecutionPriceResult", - name: "executionPriceResult", - type: "tuple", - }, - { - internalType: "int256", - name: "basePnlUsd", - type: "int256", - }, - { - internalType: "int256", - name: "uncappedBasePnlUsd", - type: "int256", - }, - { - internalType: "int256", - name: "pnlAfterPriceImpactUsd", - type: "int256", - }, - ], - internalType: "struct ReaderPositionUtils.PositionInfo[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "market", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices", - name: "prices", - type: "tuple", - }, - { - internalType: "bytes32", - name: "positionKey", - type: "bytes32", - }, - { - internalType: "uint256", - name: "sizeDeltaUsd", - type: "uint256", - }, - ], - name: "getPositionPnlUsd", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - { - internalType: "int256", - name: "", - type: "int256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getShift", - outputs: [ - { - components: [ - { - components: [ - { - 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: "fromMarket", - type: "address", - }, - { - internalType: "address", - name: "toMarket", - type: "address", - }, - ], - internalType: "struct Shift.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: "uint256", - name: "executionFee", - type: "uint256", - }, - { - 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", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "market", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices", - name: "prices", - type: "tuple", - }, - { - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - internalType: "address", - name: "uiFeeReceiver", - type: "address", - }, - ], - name: "getSwapAmountOut", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "int256", - name: "", - type: "int256", - }, - { - components: [ - { - internalType: "uint256", - name: "feeReceiverAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeAmountForPool", - type: "uint256", - }, - { - internalType: "uint256", - name: "amountAfterFees", - type: "uint256", - }, - { - internalType: "address", - name: "uiFeeReceiver", - type: "address", - }, - { - internalType: "uint256", - name: "uiFeeReceiverFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "uiFeeAmount", - type: "uint256", - }, - ], - internalType: "struct SwapPricingUtils.SwapFees", - name: "fees", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "address", - name: "marketKey", - type: "address", - }, - { - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - internalType: "address", - name: "tokenOut", - type: "address", - }, - { - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "tokenInPrice", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "tokenOutPrice", - type: "tuple", - }, - ], - name: "getSwapPriceImpact", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - { - internalType: "int256", - name: "", - type: "int256", - }, - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - ], - name: "getWithdrawal", - outputs: [ - { - components: [ - { - components: [ - { - 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: "longTokenSwapPath", - type: "address[]", - }, - { - internalType: "address[]", - name: "shortTokenSwapPath", - type: "address[]", - }, - ], - internalType: "struct Withdrawal.Addresses", - name: "addresses", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "marketTokenAmount", - 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 Withdrawal.Numbers", - name: "numbers", - type: "tuple", - }, - { - components: [ - { - internalType: "bool", - name: "shouldUnwrapNativeToken", - type: "bool", - }, - ], - internalType: "struct Withdrawal.Flags", - name: "flags", - type: "tuple", - }, - { - internalType: "bytes32[]", - name: "_dataList", - type: "bytes32[]", - }, - ], - internalType: "struct Withdrawal.Props", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "market", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices", - name: "prices", - type: "tuple", - }, - { - internalType: "uint256", - name: "marketTokenAmount", - type: "uint256", - }, - { - internalType: "address", - name: "uiFeeReceiver", - type: "address", - }, - { - internalType: "enum ISwapPricingUtils.SwapPricingType", - name: "swapPricingType", - type: "uint8", - }, - ], - name: "getWithdrawalAmountOut", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract DataStore", - name: "dataStore", - type: "address", - }, - { - internalType: "contract IReferralStorage", - name: "referralStorage", - type: "address", - }, - { - internalType: "bytes32", - name: "positionKey", - type: "bytes32", - }, - { - components: [ - { - internalType: "address", - name: "marketToken", - type: "address", - }, - { - internalType: "address", - name: "indexToken", - type: "address", - }, - { - internalType: "address", - name: "longToken", - type: "address", - }, - { - internalType: "address", - name: "shortToken", - type: "address", - }, - ], - internalType: "struct Market.Props", - name: "market", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "min", - type: "uint256", - }, - { - internalType: "uint256", - name: "max", - type: "uint256", - }, - ], - internalType: "struct Price.Props", - name: "indexTokenPrice", - 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: "struct MarketUtils.MarketPrices", - name: "prices", - type: "tuple", - }, - { - internalType: "bool", - name: "shouldValidateMinCollateralUsd", - type: "bool", - }, - { - internalType: "bool", - name: "forLiquidation", - type: "bool", - }, - ], - name: "isPositionLiquidatable", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "string", - name: "", - type: "string", - }, - { - components: [ - { - internalType: "int256", - name: "remainingCollateralUsd", - type: "int256", - }, - { - internalType: "int256", - name: "minCollateralUsd", - type: "int256", - }, - { - internalType: "int256", - name: "minCollateralUsdForLeverage", - type: "int256", - }, - ], - internalType: "struct PositionUtils.IsPositionLiquidatableInfo", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class SyntheticsReader__factory { - static readonly abi = _abi; - static createInterface(): SyntheticsReaderInterface { - return new Interface(_abi) as SyntheticsReaderInterface; - } - static connect(address: string, runner?: ContractRunner | null): SyntheticsReader { - return new Contract(address, _abi, runner) as unknown as SyntheticsReader; - } -} diff --git a/src/typechain-types/factories/SyntheticsRouter__factory.ts b/src/typechain-types/factories/SyntheticsRouter__factory.ts deleted file mode 100644 index 792aa4018d..0000000000 --- a/src/typechain-types/factories/SyntheticsRouter__factory.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { SyntheticsRouter, SyntheticsRouterInterface } from "../SyntheticsRouter"; - -const _abi = [ - { - inputs: [ - { - internalType: "contract RoleStore", - name: "_roleStore", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "msgSender", - type: "address", - }, - { - internalType: "string", - name: "role", - type: "string", - }, - ], - name: "Unauthorized", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "receiver", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "pluginTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "roleStore", - outputs: [ - { - internalType: "contract RoleStore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class SyntheticsRouter__factory { - static readonly abi = _abi; - static createInterface(): SyntheticsRouterInterface { - return new Interface(_abi) as SyntheticsRouterInterface; - } - static connect(address: string, runner?: ContractRunner | null): SyntheticsRouter { - return new Contract(address, _abi, runner) as unknown as SyntheticsRouter; - } -} diff --git a/src/typechain-types/factories/Timelock__factory.ts b/src/typechain-types/factories/Timelock__factory.ts deleted file mode 100644 index 97aa06585c..0000000000 --- a/src/typechain-types/factories/Timelock__factory.ts +++ /dev/null @@ -1,1747 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { Timelock, TimelockInterface } from "../Timelock"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_admin", - type: "address", - }, - { - internalType: "uint256", - name: "_buffer", - type: "uint256", - }, - { - internalType: "address", - name: "_tokenManager", - type: "address", - }, - { - internalType: "address", - name: "_mintReceiver", - type: "address", - }, - { - internalType: "address", - name: "_glpManager", - type: "address", - }, - { - internalType: "address", - name: "_rewardRouter", - type: "address", - }, - { - internalType: "uint256", - name: "_maxTokenSupply", - type: "uint256", - }, - { - internalType: "uint256", - name: "_marginFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxMarginFeeBasisPoints", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - ], - name: "ClearAction", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - ], - name: "SignalApprove", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "receiver", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - ], - name: "SignalMint", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - ], - name: "SignalPendingAction", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "vault", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "SignalRedeemUsdg", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "target", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "gov", - type: "address", - }, - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - ], - name: "SignalSetGov", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "target", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "handler", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "isActive", - type: "bool", - }, - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - ], - name: "SignalSetHandler", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "vault", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "priceFeed", - type: "address", - }, - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - ], - name: "SignalSetPriceFeed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "vault", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "tokenDecimals", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "tokenWeight", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "minProfitBps", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "maxUsdgAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isStable", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "isShortable", - type: "bool", - }, - ], - name: "SignalVaultSetTokenConfig", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "target", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "receiver", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "action", - type: "bytes32", - }, - ], - name: "SignalWithdrawToken", - type: "event", - }, - { - inputs: [], - name: "MAX_BUFFER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_FUNDING_RATE_FACTOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_LEVERAGE_VALIDATION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "PRICE_PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "admin", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vester", - type: "address", - }, - { - internalType: "address[]", - name: "_accounts", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "_amounts", - type: "uint256[]", - }, - ], - name: "batchSetBonusRewards", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "batchWithdrawFees", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "buffer", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_action", - type: "bytes32", - }, - ], - name: "cancelAction", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - ], - name: "disableLeverage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - ], - name: "enableLeverage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "glpManager", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_referralStorage", - type: "address", - }, - { - internalType: "bytes32", - name: "_code", - type: "bytes32", - }, - { - internalType: "address", - name: "_newAccount", - type: "address", - }, - ], - name: "govSetCodeOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initGlpManager", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initRewardRouter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isHandler", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isKeeper", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "marginFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxMarginFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxTokenSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "mintReceiver", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "pendingActions", - 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: "processMint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "redeemUsdg", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "removeAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "rewardRouter", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_admin", - type: "address", - }, - ], - name: "setAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_buffer", - type: "uint256", - }, - ], - name: "setBuffer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_handler", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setContractHandler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_target", - type: "address", - }, - { - internalType: "address", - name: "_admin", - type: "address", - }, - ], - name: "setExternalAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "uint256", - name: "_taxBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableTaxBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_mintBurnFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_swapFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableSwapFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_marginFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_liquidationFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minProfitTime", - type: "uint256", - }, - { - internalType: "bool", - name: "_hasDynamicFees", - type: "bool", - }, - ], - name: "setFees", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "uint256", - name: "_fundingInterval", - type: "uint256", - }, - { - internalType: "uint256", - name: "_fundingRateFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableFundingRateFactor", - type: "uint256", - }, - ], - name: "setFundingRate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_cooldownDuration", - type: "uint256", - }, - ], - name: "setGlpCooldownDuration", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_target", - type: "address", - }, - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_target", - type: "address", - }, - { - internalType: "address", - name: "_handler", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setHandler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "bool", - name: "_inPrivateLiquidationMode", - type: "bool", - }, - ], - name: "setInPrivateLiquidationMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "bool", - name: "_inPrivateTransferMode", - type: "bool", - }, - ], - name: "setInPrivateTransferMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "bool", - name: "_isLeverageEnabled", - type: "bool", - }, - ], - name: "setIsLeverageEnabled", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "bool", - name: "_isSwapEnabled", - type: "bool", - }, - ], - name: "setIsSwapEnabled", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_keeper", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setKeeper", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_liquidator", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setLiquidator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_marginFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxMarginFeeBasisPoints", - type: "uint256", - }, - ], - name: "setMarginFeeBasisPoints", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "uint256", - name: "_maxGasPrice", - type: "uint256", - }, - ], - name: "setMaxGasPrice", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setMaxGlobalShortSize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "uint256", - name: "_maxLeverage", - type: "uint256", - }, - ], - name: "setMaxLeverage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_priceFeed", - type: "address", - }, - ], - name: "setPriceFeed", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_referralStorage", - type: "address", - }, - { - internalType: "address", - name: "_referrer", - type: "address", - }, - { - internalType: "uint256", - name: "_tierId", - type: "uint256", - }, - ], - name: "setReferrerTier", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_shortsTrackerAveragePriceWeight", - type: "uint256", - }, - ], - name: "setShortsTrackerAveragePriceWeight", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_shouldToggleIsLeverageEnabled", - type: "bool", - }, - ], - name: "setShouldToggleIsLeverageEnabled", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "uint256", - name: "_taxBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableTaxBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_mintBurnFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_swapFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableSwapFeeBasisPoints", - type: "uint256", - }, - ], - name: "setSwapFees", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_referralStorage", - type: "address", - }, - { - internalType: "uint256", - name: "_tierId", - type: "uint256", - }, - { - internalType: "uint256", - name: "_totalRebate", - type: "uint256", - }, - { - internalType: "uint256", - name: "_discountShare", - type: "uint256", - }, - ], - name: "setTier", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenWeight", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minProfitBps", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxUsdgAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_bufferAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_usdgAmount", - type: "uint256", - }, - ], - name: "setTokenConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "_usdgAmounts", - type: "uint256[]", - }, - ], - name: "setUsdgAmounts", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "contract IVaultUtils", - name: "_vaultUtils", - type: "address", - }, - ], - name: "setVaultUtils", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "shouldToggleIsLeverageEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "signalApprove", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "signalMint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "signalRedeemUsdg", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_target", - type: "address", - }, - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "signalSetGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_target", - type: "address", - }, - { - internalType: "address", - name: "_handler", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "signalSetHandler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_priceFeed", - type: "address", - }, - ], - name: "signalSetPriceFeed", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenDecimals", - type: "uint256", - }, - { - internalType: "uint256", - name: "_tokenWeight", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minProfitBps", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxUsdgAmount", - type: "uint256", - }, - { - internalType: "bool", - name: "_isStable", - type: "bool", - }, - { - internalType: "bool", - name: "_isShortable", - type: "bool", - }, - ], - name: "signalVaultSetTokenConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_target", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "signalWithdrawToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "tokenManager", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_sender", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferIn", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "usdgAmount", - type: "uint256", - }, - ], - name: "updateUsdgSupply", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenDecimals", - type: "uint256", - }, - { - internalType: "uint256", - name: "_tokenWeight", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minProfitBps", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxUsdgAmount", - type: "uint256", - }, - { - internalType: "bool", - name: "_isStable", - type: "bool", - }, - { - internalType: "bool", - name: "_isShortable", - type: "bool", - }, - ], - name: "vaultSetTokenConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "withdrawFees", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_target", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "withdrawToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class Timelock__factory { - static readonly abi = _abi; - static createInterface(): TimelockInterface { - return new Interface(_abi) as TimelockInterface; - } - static connect(address: string, runner?: ContractRunner | null): Timelock { - return new Contract(address, _abi, runner) as unknown as Timelock; - } -} diff --git a/src/typechain-types/factories/Token__factory.ts b/src/typechain-types/factories/Token__factory.ts deleted file mode 100644 index 3fc86f5540..0000000000 --- a/src/typechain-types/factories/Token__factory.ts +++ /dev/null @@ -1,355 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { Token, TokenInterface } from "../Token"; - -const _abi = [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - 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: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - 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: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - 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: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "deposit", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "withdrawToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class Token__factory { - static readonly abi = _abi; - static createInterface(): TokenInterface { - return new Interface(_abi) as TokenInterface; - } - static connect(address: string, runner?: ContractRunner | null): Token { - return new Contract(address, _abi, runner) as unknown as Token; - } -} diff --git a/src/typechain-types/factories/Treasury__factory.ts b/src/typechain-types/factories/Treasury__factory.ts deleted file mode 100644 index cd12653dc9..0000000000 --- a/src/typechain-types/factories/Treasury__factory.ts +++ /dev/null @@ -1,421 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { Treasury, TreasuryInterface } from "../Treasury"; - -const _abi = [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "addLiquidity", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_accounts", - type: "address[]", - }, - ], - name: "addWhitelists", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "busd", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "busdBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "busdHardCap", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "busdReceived", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "busdSlotCap", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "endSwap", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_unlockTime", - type: "uint256", - }, - ], - name: "extendUnlockTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "fund", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gmt", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gmtListingPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gmtPresalePrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_busdBasisPoints", - type: "uint256", - }, - ], - name: "increaseBusdBasisPoints", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_addresses", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "_values", - type: "uint256[]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "isInitialized", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isLiquidityAdded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isSwapActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_accounts", - type: "address[]", - }, - ], - name: "removeWhitelists", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "router", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_fund", - type: "address", - }, - ], - name: "setFund", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_busdAmount", - type: "uint256", - }, - ], - name: "swap", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "swapAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "swapWhitelist", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "unlockTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "prevAccount", - type: "address", - }, - { - internalType: "address", - name: "nextAccount", - type: "address", - }, - ], - name: "updateWhitelist", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "withdrawToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class Treasury__factory { - static readonly abi = _abi; - static createInterface(): TreasuryInterface { - return new Interface(_abi) as TreasuryInterface; - } - static connect(address: string, runner?: ContractRunner | null): Treasury { - return new Contract(address, _abi, runner) as unknown as Treasury; - } -} diff --git a/src/typechain-types/factories/UniPool__factory.ts b/src/typechain-types/factories/UniPool__factory.ts deleted file mode 100644 index 9f97af5ff0..0000000000 --- a/src/typechain-types/factories/UniPool__factory.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { UniPool, UniPoolInterface } from "../UniPool"; - -const _abi = [ - { - inputs: [ - { - internalType: "uint32[]", - name: "", - type: "uint32[]", - }, - ], - name: "observe", - outputs: [ - { - internalType: "int56[]", - name: "tickCumulatives", - type: "int56[]", - }, - { - internalType: "uint160[]", - name: "secondsPerLiquidityCumulativeX128s", - type: "uint160[]", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [], - name: "slot0", - outputs: [ - { - internalType: "uint160", - name: "sqrtPriceX96", - type: "uint160", - }, - { - internalType: "int24", - name: "tick", - type: "int24", - }, - { - internalType: "uint16", - name: "observationIndex", - type: "uint16", - }, - { - internalType: "uint16", - name: "observationCardinality", - type: "uint16", - }, - { - internalType: "uint16", - name: "observationCardinalityNext", - type: "uint16", - }, - { - internalType: "uint8", - name: "feeProtocol", - type: "uint8", - }, - { - internalType: "bool", - name: "unlocked", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "tickSpacing", - outputs: [ - { - internalType: "int24", - name: "", - type: "int24", - }, - ], - stateMutability: "pure", - type: "function", - }, -] as const; - -export class UniPool__factory { - static readonly abi = _abi; - static createInterface(): UniPoolInterface { - return new Interface(_abi) as UniPoolInterface; - } - static connect(address: string, runner?: ContractRunner | null): UniPool { - return new Contract(address, _abi, runner) as unknown as UniPool; - } -} diff --git a/src/typechain-types/factories/UniswapV2__factory.ts b/src/typechain-types/factories/UniswapV2__factory.ts deleted file mode 100644 index 95c127ea19..0000000000 --- a/src/typechain-types/factories/UniswapV2__factory.ts +++ /dev/null @@ -1,675 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { UniswapV2, UniswapV2Interface } from "../UniswapV2"; - -const _abi = [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - 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: false, - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "Burn", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - ], - name: "Mint", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount0In", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount1In", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount0Out", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount1Out", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "Swap", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint112", - name: "reserve0", - type: "uint112", - }, - { - indexed: false, - internalType: "uint112", - name: "reserve1", - type: "uint112", - }, - ], - name: "Sync", - 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", - }, - { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MINIMUM_LIQUIDITY", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "PERMIT_TYPEHASH", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - 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: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "burn", - outputs: [ - { - internalType: "uint256", - name: "amount0", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "factory", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getReserves", - outputs: [ - { - internalType: "uint112", - name: "_reserve0", - type: "uint112", - }, - { - internalType: "uint112", - name: "_reserve1", - type: "uint112", - }, - { - internalType: "uint32", - name: "_blockTimestampLast", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token0", - type: "address", - }, - { - internalType: "address", - name: "_token1", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "kLast", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "mint", - outputs: [ - { - internalType: "uint256", - name: "liquidity", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - 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: "price0CumulativeLast", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "price1CumulativeLast", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "skim", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amount0Out", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount1Out", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "swap", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "sync", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "token0", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "token1", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - 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", - }, -] as const; - -export class UniswapV2__factory { - static readonly abi = _abi; - static createInterface(): UniswapV2Interface { - return new Interface(_abi) as UniswapV2Interface; - } - static connect(address: string, runner?: ContractRunner | null): UniswapV2 { - return new Contract(address, _abi, runner) as unknown as UniswapV2; - } -} diff --git a/src/typechain-types/factories/VaultReader__factory.ts b/src/typechain-types/factories/VaultReader__factory.ts deleted file mode 100644 index 6ab64df08c..0000000000 --- a/src/typechain-types/factories/VaultReader__factory.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { VaultReader, VaultReaderInterface } from "../VaultReader"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_positionManager", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgAmount", - type: "uint256", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getVaultTokenInfoV3", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vault", - type: "address", - }, - { - internalType: "address", - name: "_positionManager", - type: "address", - }, - { - internalType: "address", - name: "_weth", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgAmount", - type: "uint256", - }, - { - internalType: "address[]", - name: "_tokens", - type: "address[]", - }, - ], - name: "getVaultTokenInfoV4", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class VaultReader__factory { - static readonly abi = _abi; - static createInterface(): VaultReaderInterface { - return new Interface(_abi) as VaultReaderInterface; - } - static connect(address: string, runner?: ContractRunner | null): VaultReader { - return new Contract(address, _abi, runner) as unknown as VaultReader; - } -} diff --git a/src/typechain-types/factories/VaultV2__factory.ts b/src/typechain-types/factories/VaultV2__factory.ts deleted file mode 100644 index c3e23fd7a2..0000000000 --- a/src/typechain-types/factories/VaultV2__factory.ts +++ /dev/null @@ -1,3029 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { VaultV2, VaultV2Interface } from "../VaultV2"; - -const _abi = [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "tokenAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "usdgAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeBasisPoints", - type: "uint256", - }, - ], - name: "BuyUSDG", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "averagePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "entryFundingRate", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - ], - name: "ClosePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "feeUsd", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeTokens", - type: "uint256", - }, - ], - name: "CollectMarginFees", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "feeUsd", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeTokens", - type: "uint256", - }, - ], - name: "CollectSwapFees", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreaseGuaranteedUsd", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreasePoolAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "price", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "fee", - type: "uint256", - }, - ], - name: "DecreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreaseReservedAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreaseUsdgAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DirectPoolDeposit", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreaseGuaranteedUsd", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreasePoolAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "price", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "fee", - type: "uint256", - }, - ], - name: "IncreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreaseReservedAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreaseUsdgAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - { - indexed: false, - internalType: "uint256", - name: "markPrice", - type: "uint256", - }, - ], - name: "LiquidatePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "usdgAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "tokenAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeBasisPoints", - type: "uint256", - }, - ], - name: "SellUSDG", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tokenOut", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOutAfterFees", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeBasisPoints", - type: "uint256", - }, - ], - name: "Swap", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "fundingRate", - type: "uint256", - }, - ], - name: "UpdateFundingRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "bool", - name: "hasProfit", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "delta", - type: "uint256", - }, - ], - name: "UpdatePnl", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "averagePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "entryFundingRate", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - ], - name: "UpdatePosition", - type: "event", - }, - { - inputs: [], - name: "BASIS_POINTS_DIVISOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "FUNDING_RATE_PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_FEE_BASIS_POINTS", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_FUNDING_RATE_FACTOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_LIQUIDATION_FEE_USD", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MIN_FUNDING_RATE_INTERVAL", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MIN_LEVERAGE", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "PRICE_PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "USDG_DECIMALS", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_router", - type: "address", - }, - ], - name: "addRouter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "address", - name: "_tokenDiv", - type: "address", - }, - { - internalType: "address", - name: "_tokenMul", - type: "address", - }, - ], - name: "adjustForDecimals", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "allWhitelistedTokens", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "allWhitelistedTokensLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "approvedRouters", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "bufferAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "buyUSDG", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "clearTokenConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "cumulativeFundingRates", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "decreasePosition", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "directPoolDeposit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "feeReserves", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "fundingInterval", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "fundingRateFactor", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_size", - type: "uint256", - }, - { - internalType: "uint256", - name: "_averagePrice", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_lastIncreasedTime", - type: "uint256", - }, - ], - name: "getDelta", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_taxBasisPoints", - type: "uint256", - }, - { - internalType: "bool", - name: "_increment", - type: "bool", - }, - ], - name: "getFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_size", - type: "uint256", - }, - { - internalType: "uint256", - name: "_entryFundingRate", - type: "uint256", - }, - ], - name: "getFundingFee", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getGlobalShortDelta", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getMaxPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getMinPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_size", - type: "uint256", - }, - { - internalType: "uint256", - name: "_averagePrice", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_nextPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_lastIncreasedTime", - type: "uint256", - }, - ], - name: "getNextAveragePrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getNextFundingRate", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_nextPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - ], - name: "getNextGlobalShortAveragePrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPosition", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPositionDelta", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - ], - name: "getPositionFee", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPositionKey", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPositionLeverage", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgAmount", - type: "uint256", - }, - ], - name: "getRedemptionAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getRedemptionCollateral", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getRedemptionCollateralUsd", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getTargetUsdgAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getUtilisation", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "globalShortAveragePrices", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "globalShortSizes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "guaranteedUsd", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "hasDynamicFees", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inManagerMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inPrivateLiquidationMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "includeAmmPrice", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "increasePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_router", - type: "address", - }, - { - internalType: "address", - name: "_usdg", - type: "address", - }, - { - internalType: "address", - name: "_priceFeed", - type: "address", - }, - { - internalType: "uint256", - name: "_liquidationFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "_fundingRateFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableFundingRateFactor", - type: "uint256", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "isInitialized", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isLeverageEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isLiquidator", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isManager", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isSwapEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "lastFundingTimes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_feeReceiver", - type: "address", - }, - ], - name: "liquidatePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "liquidationFeeUsd", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "marginFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxGasPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxLeverage", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "maxUsdgAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "minProfitBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minProfitTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "mintBurnFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "poolAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "positions", - outputs: [ - { - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - internalType: "uint256", - name: "averagePrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "entryFundingRate", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - { - internalType: "uint256", - name: "lastIncreasedTime", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "priceFeed", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_router", - type: "address", - }, - ], - name: "removeRouter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "reservedAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "router", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "sellUSDG", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setBufferAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_taxBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableTaxBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_mintBurnFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_swapFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableSwapFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_marginFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_liquidationFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minProfitTime", - type: "uint256", - }, - { - internalType: "bool", - name: "_hasDynamicFees", - type: "bool", - }, - ], - name: "setFees", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_fundingInterval", - type: "uint256", - }, - { - internalType: "uint256", - name: "_fundingRateFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableFundingRateFactor", - type: "uint256", - }, - ], - name: "setFundingRate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inManagerMode", - type: "bool", - }, - ], - name: "setInManagerMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inPrivateLiquidationMode", - type: "bool", - }, - ], - name: "setInPrivateLiquidationMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_isLeverageEnabled", - type: "bool", - }, - ], - name: "setIsLeverageEnabled", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_isSwapEnabled", - type: "bool", - }, - ], - name: "setIsSwapEnabled", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_liquidator", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setLiquidator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_manager", - type: "address", - }, - { - internalType: "bool", - name: "_isManager", - type: "bool", - }, - ], - name: "setManager", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxGasPrice", - type: "uint256", - }, - ], - name: "setMaxGasPrice", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxLeverage", - type: "uint256", - }, - ], - name: "setMaxLeverage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_priceFeed", - type: "address", - }, - ], - name: "setPriceFeed", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenDecimals", - type: "uint256", - }, - { - internalType: "uint256", - name: "_tokenWeight", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minProfitBps", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxUsdgAmount", - type: "uint256", - }, - { - internalType: "bool", - name: "_isStable", - type: "bool", - }, - { - internalType: "bool", - name: "_isShortable", - type: "bool", - }, - ], - name: "setTokenConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setUsdgAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "shortableTokens", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stableFundingRateFactor", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stableSwapFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stableTaxBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "stableTokens", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_tokenIn", - type: "address", - }, - { - internalType: "address", - name: "_tokenOut", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "swap", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "swapFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "taxBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "tokenBalances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "tokenDecimals", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenAmount", - type: "uint256", - }, - ], - name: "tokenToUsdMin", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "tokenWeights", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalTokenWeights", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "updateCumulativeFundingRate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_newVault", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "upgradeVault", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "usdToToken", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdAmount", - type: "uint256", - }, - ], - name: "usdToTokenMax", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdAmount", - type: "uint256", - }, - ], - name: "usdToTokenMin", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "usdg", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "usdgAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "useSwapPricing", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "bool", - name: "_raise", - type: "bool", - }, - ], - name: "validateLiquidation", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "whitelistedTokenCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "whitelistedTokens", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "withdrawFees", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class VaultV2__factory { - static readonly abi = _abi; - static createInterface(): VaultV2Interface { - return new Interface(_abi) as VaultV2Interface; - } - static connect(address: string, runner?: ContractRunner | null): VaultV2 { - return new Contract(address, _abi, runner) as unknown as VaultV2; - } -} diff --git a/src/typechain-types/factories/VaultV2b__factory.ts b/src/typechain-types/factories/VaultV2b__factory.ts deleted file mode 100644 index 64e9feefac..0000000000 --- a/src/typechain-types/factories/VaultV2b__factory.ts +++ /dev/null @@ -1,3230 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { VaultV2b, VaultV2bInterface } from "../VaultV2b"; - -const _abi = [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "tokenAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "usdgAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeBasisPoints", - type: "uint256", - }, - ], - name: "BuyUSDG", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "averagePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "entryFundingRate", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - ], - name: "ClosePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "feeUsd", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeTokens", - type: "uint256", - }, - ], - name: "CollectMarginFees", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "feeUsd", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeTokens", - type: "uint256", - }, - ], - name: "CollectSwapFees", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreaseGuaranteedUsd", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreasePoolAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "price", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "fee", - type: "uint256", - }, - ], - name: "DecreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreaseReservedAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreaseUsdgAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DirectPoolDeposit", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreaseGuaranteedUsd", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreasePoolAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "price", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "fee", - type: "uint256", - }, - ], - name: "IncreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreaseReservedAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreaseUsdgAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - { - indexed: false, - internalType: "uint256", - name: "markPrice", - type: "uint256", - }, - ], - name: "LiquidatePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "usdgAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "tokenAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeBasisPoints", - type: "uint256", - }, - ], - name: "SellUSDG", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tokenOut", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOutAfterFees", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeBasisPoints", - type: "uint256", - }, - ], - name: "Swap", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "fundingRate", - type: "uint256", - }, - ], - name: "UpdateFundingRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "bool", - name: "hasProfit", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "delta", - type: "uint256", - }, - ], - name: "UpdatePnl", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "averagePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "entryFundingRate", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - { - indexed: false, - internalType: "uint256", - name: "markPrice", - type: "uint256", - }, - ], - name: "UpdatePosition", - type: "event", - }, - { - inputs: [], - name: "BASIS_POINTS_DIVISOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "FUNDING_RATE_PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_FEE_BASIS_POINTS", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_FUNDING_RATE_FACTOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_LIQUIDATION_FEE_USD", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MIN_FUNDING_RATE_INTERVAL", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MIN_LEVERAGE", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "PRICE_PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "USDG_DECIMALS", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_router", - type: "address", - }, - ], - name: "addRouter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "address", - name: "_tokenDiv", - type: "address", - }, - { - internalType: "address", - name: "_tokenMul", - type: "address", - }, - ], - name: "adjustForDecimals", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "allWhitelistedTokens", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "allWhitelistedTokensLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "approvedRouters", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "bufferAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "buyUSDG", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "clearTokenConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "cumulativeFundingRates", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "decreasePosition", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "directPoolDeposit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "errorController", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "errors", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "feeReserves", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "fundingInterval", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "fundingRateFactor", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_size", - type: "uint256", - }, - { - internalType: "uint256", - name: "_averagePrice", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_lastIncreasedTime", - type: "uint256", - }, - ], - name: "getDelta", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getEntryFundingRate", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_taxBasisPoints", - type: "uint256", - }, - { - internalType: "bool", - name: "_increment", - type: "bool", - }, - ], - name: "getFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_size", - type: "uint256", - }, - { - internalType: "uint256", - name: "_entryFundingRate", - type: "uint256", - }, - ], - name: "getFundingFee", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getGlobalShortDelta", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getMaxPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getMinPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_size", - type: "uint256", - }, - { - internalType: "uint256", - name: "_averagePrice", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_nextPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_lastIncreasedTime", - type: "uint256", - }, - ], - name: "getNextAveragePrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getNextFundingRate", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_nextPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - ], - name: "getNextGlobalShortAveragePrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPosition", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPositionDelta", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - ], - name: "getPositionFee", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPositionKey", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPositionLeverage", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgAmount", - type: "uint256", - }, - ], - name: "getRedemptionAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getRedemptionCollateral", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getRedemptionCollateralUsd", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getTargetUsdgAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getUtilisation", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "globalShortAveragePrices", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "globalShortSizes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "guaranteedUsd", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "hasDynamicFees", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inManagerMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inPrivateLiquidationMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "includeAmmPrice", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "increasePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_router", - type: "address", - }, - { - internalType: "address", - name: "_usdg", - type: "address", - }, - { - internalType: "address", - name: "_priceFeed", - type: "address", - }, - { - internalType: "uint256", - name: "_liquidationFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "_fundingRateFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableFundingRateFactor", - type: "uint256", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "isInitialized", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isLeverageEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isLiquidator", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isManager", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isSwapEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "lastFundingTimes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_feeReceiver", - type: "address", - }, - ], - name: "liquidatePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "liquidationFeeUsd", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "marginFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxGasPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "maxGlobalShortSizes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxLeverage", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "maxUsdgAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "minProfitBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minProfitTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "mintBurnFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "poolAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "positions", - outputs: [ - { - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - internalType: "uint256", - name: "averagePrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "entryFundingRate", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - { - internalType: "uint256", - name: "lastIncreasedTime", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "priceFeed", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_router", - type: "address", - }, - ], - name: "removeRouter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "reservedAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "router", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "sellUSDG", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setBufferAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_errorCode", - type: "uint256", - }, - { - internalType: "string", - name: "_error", - type: "string", - }, - ], - name: "setError", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_errorController", - type: "address", - }, - ], - name: "setErrorController", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_taxBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableTaxBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_mintBurnFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_swapFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableSwapFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_marginFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_liquidationFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minProfitTime", - type: "uint256", - }, - { - internalType: "bool", - name: "_hasDynamicFees", - type: "bool", - }, - ], - name: "setFees", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_fundingInterval", - type: "uint256", - }, - { - internalType: "uint256", - name: "_fundingRateFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableFundingRateFactor", - type: "uint256", - }, - ], - name: "setFundingRate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inManagerMode", - type: "bool", - }, - ], - name: "setInManagerMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inPrivateLiquidationMode", - type: "bool", - }, - ], - name: "setInPrivateLiquidationMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_isLeverageEnabled", - type: "bool", - }, - ], - name: "setIsLeverageEnabled", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_isSwapEnabled", - type: "bool", - }, - ], - name: "setIsSwapEnabled", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_liquidator", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setLiquidator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_manager", - type: "address", - }, - { - internalType: "bool", - name: "_isManager", - type: "bool", - }, - ], - name: "setManager", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxGasPrice", - type: "uint256", - }, - ], - name: "setMaxGasPrice", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setMaxGlobalShortSize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxLeverage", - type: "uint256", - }, - ], - name: "setMaxLeverage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_priceFeed", - type: "address", - }, - ], - name: "setPriceFeed", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenDecimals", - type: "uint256", - }, - { - internalType: "uint256", - name: "_tokenWeight", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minProfitBps", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxUsdgAmount", - type: "uint256", - }, - { - internalType: "bool", - name: "_isStable", - type: "bool", - }, - { - internalType: "bool", - name: "_isShortable", - type: "bool", - }, - ], - name: "setTokenConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setUsdgAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IVaultUtils", - name: "_vaultUtils", - type: "address", - }, - ], - name: "setVaultUtils", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "shortableTokens", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stableFundingRateFactor", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stableSwapFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stableTaxBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "stableTokens", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_tokenIn", - type: "address", - }, - { - internalType: "address", - name: "_tokenOut", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "swap", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "swapFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "taxBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "tokenBalances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "tokenDecimals", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenAmount", - type: "uint256", - }, - ], - name: "tokenToUsdMin", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "tokenWeights", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalTokenWeights", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - ], - name: "updateCumulativeFundingRate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_newVault", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "upgradeVault", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "usdToToken", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdAmount", - type: "uint256", - }, - ], - name: "usdToTokenMax", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdAmount", - type: "uint256", - }, - ], - name: "usdToTokenMin", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "usdg", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "usdgAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "useSwapPricing", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "bool", - name: "_raise", - type: "bool", - }, - ], - name: "validateLiquidation", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "vaultUtils", - outputs: [ - { - internalType: "contract IVaultUtils", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "whitelistedTokenCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "whitelistedTokens", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "withdrawFees", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class VaultV2b__factory { - static readonly abi = _abi; - static createInterface(): VaultV2bInterface { - return new Interface(_abi) as VaultV2bInterface; - } - static connect(address: string, runner?: ContractRunner | null): VaultV2b { - return new Contract(address, _abi, runner) as unknown as VaultV2b; - } -} diff --git a/src/typechain-types/factories/Vault__factory.ts b/src/typechain-types/factories/Vault__factory.ts deleted file mode 100644 index 35be683873..0000000000 --- a/src/typechain-types/factories/Vault__factory.ts +++ /dev/null @@ -1,3230 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { Vault, VaultInterface } from "../Vault"; - -const _abi = [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "tokenAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "usdgAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeBasisPoints", - type: "uint256", - }, - ], - name: "BuyUSDG", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "averagePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "entryFundingRate", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - ], - name: "ClosePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "feeUsd", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeTokens", - type: "uint256", - }, - ], - name: "CollectMarginFees", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "feeUsd", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeTokens", - type: "uint256", - }, - ], - name: "CollectSwapFees", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreaseGuaranteedUsd", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreasePoolAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "price", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "fee", - type: "uint256", - }, - ], - name: "DecreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreaseReservedAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DecreaseUsdgAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "DirectPoolDeposit", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreaseGuaranteedUsd", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreasePoolAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "collateralDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "sizeDelta", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "price", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "fee", - type: "uint256", - }, - ], - name: "IncreasePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreaseReservedAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "IncreaseUsdgAmount", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "collateralToken", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "indexToken", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "isLong", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - { - indexed: false, - internalType: "uint256", - name: "markPrice", - type: "uint256", - }, - ], - name: "LiquidatePosition", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "usdgAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "tokenAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeBasisPoints", - type: "uint256", - }, - ], - name: "SellUSDG", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tokenIn", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tokenOut", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountIn", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOut", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountOutAfterFees", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "feeBasisPoints", - type: "uint256", - }, - ], - name: "Swap", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "fundingRate", - type: "uint256", - }, - ], - name: "UpdateFundingRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "bool", - name: "hasProfit", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "delta", - type: "uint256", - }, - ], - name: "UpdatePnl", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "key", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "averagePrice", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "entryFundingRate", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - { - indexed: false, - internalType: "uint256", - name: "markPrice", - type: "uint256", - }, - ], - name: "UpdatePosition", - type: "event", - }, - { - inputs: [], - name: "BASIS_POINTS_DIVISOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "FUNDING_RATE_PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_FEE_BASIS_POINTS", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_FUNDING_RATE_FACTOR", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_LIQUIDATION_FEE_USD", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MIN_FUNDING_RATE_INTERVAL", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MIN_LEVERAGE", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "PRICE_PRECISION", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "USDG_DECIMALS", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_router", - type: "address", - }, - ], - name: "addRouter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "address", - name: "_tokenDiv", - type: "address", - }, - { - internalType: "address", - name: "_tokenMul", - type: "address", - }, - ], - name: "adjustForDecimals", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "allWhitelistedTokens", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "allWhitelistedTokensLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "approvedRouters", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "bufferAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "buyUSDG", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "clearTokenConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "cumulativeFundingRates", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_collateralDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "decreasePosition", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "directPoolDeposit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "errorController", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "errors", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "feeReserves", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "fundingInterval", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "fundingRateFactor", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_size", - type: "uint256", - }, - { - internalType: "uint256", - name: "_averagePrice", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_lastIncreasedTime", - type: "uint256", - }, - ], - name: "getDelta", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getEntryFundingRate", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_taxBasisPoints", - type: "uint256", - }, - { - internalType: "bool", - name: "_increment", - type: "bool", - }, - ], - name: "getFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_size", - type: "uint256", - }, - { - internalType: "uint256", - name: "_entryFundingRate", - type: "uint256", - }, - ], - name: "getFundingFee", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getGlobalShortDelta", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getMaxPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getMinPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_size", - type: "uint256", - }, - { - internalType: "uint256", - name: "_averagePrice", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_nextPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "uint256", - name: "_lastIncreasedTime", - type: "uint256", - }, - ], - name: "getNextAveragePrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getNextFundingRate", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_nextPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - ], - name: "getNextGlobalShortAveragePrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPosition", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPositionDelta", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - ], - name: "getPositionFee", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPositionKey", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "getPositionLeverage", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdgAmount", - type: "uint256", - }, - ], - name: "getRedemptionAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getRedemptionCollateral", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getRedemptionCollateralUsd", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getTargetUsdgAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - ], - name: "getUtilisation", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "globalShortAveragePrices", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "globalShortSizes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "guaranteedUsd", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "hasDynamicFees", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inManagerMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "inPrivateLiquidationMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "includeAmmPrice", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "uint256", - name: "_sizeDelta", - type: "uint256", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - ], - name: "increasePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_router", - type: "address", - }, - { - internalType: "address", - name: "_usdg", - type: "address", - }, - { - internalType: "address", - name: "_priceFeed", - type: "address", - }, - { - internalType: "uint256", - name: "_liquidationFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "_fundingRateFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableFundingRateFactor", - type: "uint256", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "isInitialized", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isLeverageEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isLiquidator", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isManager", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "isSwapEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "lastFundingTimes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "address", - name: "_feeReceiver", - type: "address", - }, - ], - name: "liquidatePosition", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "liquidationFeeUsd", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "marginFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxGasPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "maxGlobalShortSizes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxLeverage", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "maxUsdgAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "minProfitBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minProfitTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "mintBurnFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "poolAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "positions", - outputs: [ - { - internalType: "uint256", - name: "size", - type: "uint256", - }, - { - internalType: "uint256", - name: "collateral", - type: "uint256", - }, - { - internalType: "uint256", - name: "averagePrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "entryFundingRate", - type: "uint256", - }, - { - internalType: "uint256", - name: "reserveAmount", - type: "uint256", - }, - { - internalType: "int256", - name: "realisedPnl", - type: "int256", - }, - { - internalType: "uint256", - name: "lastIncreasedTime", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "priceFeed", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_router", - type: "address", - }, - ], - name: "removeRouter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "reservedAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "router", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "sellUSDG", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setBufferAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_errorCode", - type: "uint256", - }, - { - internalType: "string", - name: "_error", - type: "string", - }, - ], - name: "setError", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_errorController", - type: "address", - }, - ], - name: "setErrorController", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_taxBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableTaxBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_mintBurnFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_swapFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableSwapFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_marginFeeBasisPoints", - type: "uint256", - }, - { - internalType: "uint256", - name: "_liquidationFeeUsd", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minProfitTime", - type: "uint256", - }, - { - internalType: "bool", - name: "_hasDynamicFees", - type: "bool", - }, - ], - name: "setFees", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_fundingInterval", - type: "uint256", - }, - { - internalType: "uint256", - name: "_fundingRateFactor", - type: "uint256", - }, - { - internalType: "uint256", - name: "_stableFundingRateFactor", - type: "uint256", - }, - ], - name: "setFundingRate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inManagerMode", - type: "bool", - }, - ], - name: "setInManagerMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_inPrivateLiquidationMode", - type: "bool", - }, - ], - name: "setInPrivateLiquidationMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_isLeverageEnabled", - type: "bool", - }, - ], - name: "setIsLeverageEnabled", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_isSwapEnabled", - type: "bool", - }, - ], - name: "setIsSwapEnabled", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_liquidator", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setLiquidator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_manager", - type: "address", - }, - { - internalType: "bool", - name: "_isManager", - type: "bool", - }, - ], - name: "setManager", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxGasPrice", - type: "uint256", - }, - ], - name: "setMaxGasPrice", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setMaxGlobalShortSize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxLeverage", - type: "uint256", - }, - ], - name: "setMaxLeverage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_priceFeed", - type: "address", - }, - ], - name: "setPriceFeed", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenDecimals", - type: "uint256", - }, - { - internalType: "uint256", - name: "_tokenWeight", - type: "uint256", - }, - { - internalType: "uint256", - name: "_minProfitBps", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxUsdgAmount", - type: "uint256", - }, - { - internalType: "bool", - name: "_isStable", - type: "bool", - }, - { - internalType: "bool", - name: "_isShortable", - type: "bool", - }, - ], - name: "setTokenConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setUsdgAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IVaultUtils", - name: "_vaultUtils", - type: "address", - }, - ], - name: "setVaultUtils", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "shortableTokens", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stableFundingRateFactor", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stableSwapFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stableTaxBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "stableTokens", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_tokenIn", - type: "address", - }, - { - internalType: "address", - name: "_tokenOut", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "swap", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "swapFeeBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "taxBasisPoints", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "tokenBalances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "tokenDecimals", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenAmount", - type: "uint256", - }, - ], - name: "tokenToUsdMin", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "tokenWeights", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalTokenWeights", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - ], - name: "updateCumulativeFundingRate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_newVault", - type: "address", - }, - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "upgradeVault", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "_price", - type: "uint256", - }, - ], - name: "usdToToken", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdAmount", - type: "uint256", - }, - ], - name: "usdToTokenMax", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "uint256", - name: "_usdAmount", - type: "uint256", - }, - ], - name: "usdToTokenMin", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "usdg", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "usdgAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "useSwapPricing", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_collateralToken", - type: "address", - }, - { - internalType: "address", - name: "_indexToken", - type: "address", - }, - { - internalType: "bool", - name: "_isLong", - type: "bool", - }, - { - internalType: "bool", - name: "_raise", - type: "bool", - }, - ], - name: "validateLiquidation", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "vaultUtils", - outputs: [ - { - internalType: "contract IVaultUtils", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "whitelistedTokenCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "whitelistedTokens", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "withdrawFees", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class Vault__factory { - static readonly abi = _abi; - static createInterface(): VaultInterface { - return new Interface(_abi) as VaultInterface; - } - static connect(address: string, runner?: ContractRunner | null): Vault { - return new Contract(address, _abi, runner) as unknown as Vault; - } -} diff --git a/src/typechain-types/factories/Vester__factory.ts b/src/typechain-types/factories/Vester__factory.ts deleted file mode 100644 index 75c9091f45..0000000000 --- a/src/typechain-types/factories/Vester__factory.ts +++ /dev/null @@ -1,1041 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { Vester, VesterInterface } from "../Vester"; - -const _abi = [ - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - { - internalType: "uint256", - name: "_vestingDuration", - type: "uint256", - }, - { - internalType: "address", - name: "_esToken", - type: "address", - }, - { - internalType: "address", - name: "_pairToken", - type: "address", - }, - { - internalType: "address", - name: "_claimableToken", - type: "address", - }, - { - internalType: "address", - name: "_rewardTracker", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - 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: false, - internalType: "address", - name: "receiver", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "Claim", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "Deposit", - 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: "PairTransfer", - 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: false, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "claimedAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "balance", - type: "uint256", - }, - ], - name: "Withdraw", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "balances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "bonusRewards", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "claim", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "claimForAccount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "claimable", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "claimableToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "claimedAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "cumulativeClaimAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "cumulativeRewardDeductions", - 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: "_amount", - type: "uint256", - }, - ], - name: "deposit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "depositForAccount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "esToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "getCombinedAverageStakedAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "getMaxVestableAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_esAmount", - type: "uint256", - }, - ], - name: "getPairAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "getTotalVested", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "getVestedAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "hasMaxVestableAmount", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "hasPairToken", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "hasRewardTracker", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "isHandler", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "lastVestingTimes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "pairAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pairSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pairToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rewardTracker", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setBonusRewards", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setCumulativeRewardDeductions", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_handler", - type: "address", - }, - { - internalType: "bool", - name: "_isActive", - type: "bool", - }, - ], - name: "setHandler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "_hasMaxVestableAmount", - type: "bool", - }, - ], - name: "setHasMaxVestableAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setTransferredAverageStakedAmounts", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "setTransferredCumulativeRewards", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_sender", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "transferStakeValues", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "transferredAverageStakedAmounts", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "transferredCumulativeRewards", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "vestingDuration", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "withdrawToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class Vester__factory { - static readonly abi = _abi; - static createInterface(): VesterInterface { - return new Interface(_abi) as VesterInterface; - } - static connect(address: string, runner?: ContractRunner | null): Vester { - return new Contract(address, _abi, runner) as unknown as Vester; - } -} diff --git a/src/typechain-types/factories/WETH__factory.ts b/src/typechain-types/factories/WETH__factory.ts deleted file mode 100644 index 3e6422c6dd..0000000000 --- a/src/typechain-types/factories/WETH__factory.ts +++ /dev/null @@ -1,330 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { WETH, WETHInterface } from "../WETH"; - -const _abi = [ - { - inputs: [ - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "symbol", - type: "string", - }, - { - internalType: "uint8", - name: "decimals", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - 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: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - 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: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - 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: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "deposit", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; - -export class WETH__factory { - static readonly abi = _abi; - static createInterface(): WETHInterface { - return new Interface(_abi) as WETHInterface; - } - static connect(address: string, runner?: ContractRunner | null): WETH { - return new Contract(address, _abi, runner) as unknown as WETH; - } -} diff --git a/src/typechain-types/factories/YieldFarm__factory.ts b/src/typechain-types/factories/YieldFarm__factory.ts deleted file mode 100644 index ec5f03b969..0000000000 --- a/src/typechain-types/factories/YieldFarm__factory.ts +++ /dev/null @@ -1,609 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { YieldFarm, YieldFarmInterface } from "../YieldFarm"; - -const _abi = [ - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - { - internalType: "address", - name: "_stakingToken", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - 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: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "addAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "addNonStakingAccount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "admins", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - 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: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "allowances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "balances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "claim", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "nonStakingAccounts", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "nonStakingSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "recoverClaim", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "removeAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "removeNonStakingAccount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - ], - name: "setInfo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_yieldTrackers", - type: "address[]", - }, - ], - name: "setYieldTrackers", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "stake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "stakedBalance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "stakingToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - 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: "_recipient", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_sender", - type: "address", - }, - { - internalType: "address", - name: "_recipient", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "unstake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "withdrawToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "yieldTrackers", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class YieldFarm__factory { - static readonly abi = _abi; - static createInterface(): YieldFarmInterface { - return new Interface(_abi) as YieldFarmInterface; - } - static connect(address: string, runner?: ContractRunner | null): YieldFarm { - return new Contract(address, _abi, runner) as unknown as YieldFarm; - } -} diff --git a/src/typechain-types/factories/YieldToken__factory.ts b/src/typechain-types/factories/YieldToken__factory.ts deleted file mode 100644 index c3d56e90b9..0000000000 --- a/src/typechain-types/factories/YieldToken__factory.ts +++ /dev/null @@ -1,570 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Interface, type ContractRunner } from "ethers"; -import type { YieldToken, YieldTokenInterface } from "../YieldToken"; - -const _abi = [ - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - { - internalType: "uint256", - name: "_initialSupply", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - 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: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "addAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "addNonStakingAccount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "admins", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - 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: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "allowances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_spender", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "balances", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "claim", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "gov", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "nonStakingAccounts", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "nonStakingSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "address", - name: "_receiver", - type: "address", - }, - ], - name: "recoverClaim", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "removeAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "removeNonStakingAccount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_gov", - type: "address", - }, - ], - name: "setGov", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - ], - name: "setInfo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_yieldTrackers", - type: "address[]", - }, - ], - name: "setYieldTrackers", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "stakedBalance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - 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: "_recipient", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_sender", - type: "address", - }, - { - internalType: "address", - name: "_recipient", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "withdrawToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "yieldTrackers", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; - -export class YieldToken__factory { - static readonly abi = _abi; - static createInterface(): YieldTokenInterface { - return new Interface(_abi) as YieldTokenInterface; - } - static connect(address: string, runner?: ContractRunner | null): YieldToken { - return new Contract(address, _abi, runner) as unknown as YieldToken; - } -} diff --git a/src/typechain-types/factories/index.ts b/src/typechain-types/factories/index.ts deleted file mode 100644 index e87b18f36d..0000000000 --- a/src/typechain-types/factories/index.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { ArbitrumNodeInterface__factory } from "./ArbitrumNodeInterface__factory"; -export { ClaimHandler__factory } from "./ClaimHandler__factory"; -export { CustomErrors__factory } from "./CustomErrors__factory"; -export { DataStore__factory } from "./DataStore__factory"; -export { ERC20PermitInterface__factory } from "./ERC20PermitInterface__factory"; -export { ERC721__factory } from "./ERC721__factory"; -export { EventEmitter__factory } from "./EventEmitter__factory"; -export { ExchangeRouter__factory } from "./ExchangeRouter__factory"; -export { GelatoRelayRouter__factory } from "./GelatoRelayRouter__factory"; -export { GlpManager__factory } from "./GlpManager__factory"; -export { GlvReader__factory } from "./GlvReader__factory"; -export { GlvRouter__factory } from "./GlvRouter__factory"; -export { GmxMigrator__factory } from "./GmxMigrator__factory"; -export { GovToken__factory } from "./GovToken__factory"; -export { LayerZeroProvider__factory } from "./LayerZeroProvider__factory"; -export { MintableBaseToken__factory } from "./MintableBaseToken__factory"; -export { Multicall__factory } from "./Multicall__factory"; -export { MultichainClaimsRouter__factory } from "./MultichainClaimsRouter__factory"; -export { MultichainGlvRouter__factory } from "./MultichainGlvRouter__factory"; -export { MultichainGmRouter__factory } from "./MultichainGmRouter__factory"; -export { MultichainOrderRouter__factory } from "./MultichainOrderRouter__factory"; -export { MultichainSubaccountRouter__factory } from "./MultichainSubaccountRouter__factory"; -export { MultichainTransferRouter__factory } from "./MultichainTransferRouter__factory"; -export { MultichainUtils__factory } from "./MultichainUtils__factory"; -export { MultichainVault__factory } from "./MultichainVault__factory"; -export { Reader__factory } from "./Reader__factory"; -export { ReaderV2__factory } from "./ReaderV2__factory"; -export { ReferralStorage__factory } from "./ReferralStorage__factory"; -export { RelayParams__factory } from "./RelayParams__factory"; -export { RewardReader__factory } from "./RewardReader__factory"; -export { RewardRouter__factory } from "./RewardRouter__factory"; -export { RewardTracker__factory } from "./RewardTracker__factory"; -export { SmartAccount__factory } from "./SmartAccount__factory"; -export { StBTC__factory } from "./StBTC__factory"; -export { SubaccountApproval__factory } from "./SubaccountApproval__factory"; -export { SubaccountGelatoRelayRouter__factory } from "./SubaccountGelatoRelayRouter__factory"; -export { SubaccountRouter__factory } from "./SubaccountRouter__factory"; -export { SyntheticsReader__factory } from "./SyntheticsReader__factory"; -export { SyntheticsRouter__factory } from "./SyntheticsRouter__factory"; -export { Timelock__factory } from "./Timelock__factory"; -export { Token__factory } from "./Token__factory"; -export { Treasury__factory } from "./Treasury__factory"; -export { UniPool__factory } from "./UniPool__factory"; -export { UniswapV2__factory } from "./UniswapV2__factory"; -export { Vault__factory } from "./Vault__factory"; -export { VaultReader__factory } from "./VaultReader__factory"; -export { VaultV2__factory } from "./VaultV2__factory"; -export { VaultV2b__factory } from "./VaultV2b__factory"; -export { Vester__factory } from "./Vester__factory"; -export { WETH__factory } from "./WETH__factory"; diff --git a/src/typechain-types/index.ts b/src/typechain-types/index.ts deleted file mode 100644 index 6ef4e4f8b0..0000000000 --- a/src/typechain-types/index.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { ArbitrumNodeInterface } from "./ArbitrumNodeInterface"; -export type { ClaimHandler } from "./ClaimHandler"; -export type { CustomErrors } from "./CustomErrors"; -export type { DataStore } from "./DataStore"; -export type { ERC20PermitInterface } from "./ERC20PermitInterface"; -export type { ERC721 } from "./ERC721"; -export type { EventEmitter } from "./EventEmitter"; -export type { ExchangeRouter } from "./ExchangeRouter"; -export type { GelatoRelayRouter } from "./GelatoRelayRouter"; -export type { GlpManager } from "./GlpManager"; -export type { GlvReader } from "./GlvReader"; -export type { GlvRouter } from "./GlvRouter"; -export type { GmxMigrator } from "./GmxMigrator"; -export type { GovToken } from "./GovToken"; -export type { LayerZeroProvider } from "./LayerZeroProvider"; -export type { MintableBaseToken } from "./MintableBaseToken"; -export type { Multicall } from "./Multicall"; -export type { MultichainClaimsRouter } from "./MultichainClaimsRouter"; -export type { MultichainGlvRouter } from "./MultichainGlvRouter"; -export type { MultichainGmRouter } from "./MultichainGmRouter"; -export type { MultichainOrderRouter } from "./MultichainOrderRouter"; -export type { MultichainSubaccountRouter } from "./MultichainSubaccountRouter"; -export type { MultichainTransferRouter } from "./MultichainTransferRouter"; -export type { MultichainUtils } from "./MultichainUtils"; -export type { MultichainVault } from "./MultichainVault"; -export type { Reader } from "./Reader"; -export type { ReaderV2 } from "./ReaderV2"; -export type { ReferralStorage } from "./ReferralStorage"; -export type { RelayParams } from "./RelayParams"; -export type { RewardReader } from "./RewardReader"; -export type { RewardRouter } from "./RewardRouter"; -export type { RewardTracker } from "./RewardTracker"; -export type { SmartAccount } from "./SmartAccount"; -export type { StBTC } from "./StBTC"; -export type { SubaccountApproval } from "./SubaccountApproval"; -export type { SubaccountGelatoRelayRouter } from "./SubaccountGelatoRelayRouter"; -export type { SubaccountRouter } from "./SubaccountRouter"; -export type { SyntheticsReader } from "./SyntheticsReader"; -export type { SyntheticsRouter } from "./SyntheticsRouter"; -export type { Timelock } from "./Timelock"; -export type { Token } from "./Token"; -export type { Treasury } from "./Treasury"; -export type { UniPool } from "./UniPool"; -export type { UniswapV2 } from "./UniswapV2"; -export type { Vault } from "./Vault"; -export type { VaultReader } from "./VaultReader"; -export type { VaultV2 } from "./VaultV2"; -export type { VaultV2b } from "./VaultV2b"; -export type { Vester } from "./Vester"; -export type { WETH } from "./WETH"; -export * as factories from "./factories"; -export { ArbitrumNodeInterface__factory } from "./factories/ArbitrumNodeInterface__factory"; -export { ClaimHandler__factory } from "./factories/ClaimHandler__factory"; -export { CustomErrors__factory } from "./factories/CustomErrors__factory"; -export { DataStore__factory } from "./factories/DataStore__factory"; -export { ERC20PermitInterface__factory } from "./factories/ERC20PermitInterface__factory"; -export { ERC721__factory } from "./factories/ERC721__factory"; -export { EventEmitter__factory } from "./factories/EventEmitter__factory"; -export { ExchangeRouter__factory } from "./factories/ExchangeRouter__factory"; -export { GelatoRelayRouter__factory } from "./factories/GelatoRelayRouter__factory"; -export { GlpManager__factory } from "./factories/GlpManager__factory"; -export { GlvReader__factory } from "./factories/GlvReader__factory"; -export { GlvRouter__factory } from "./factories/GlvRouter__factory"; -export { GmxMigrator__factory } from "./factories/GmxMigrator__factory"; -export { GovToken__factory } from "./factories/GovToken__factory"; -export { LayerZeroProvider__factory } from "./factories/LayerZeroProvider__factory"; -export { MintableBaseToken__factory } from "./factories/MintableBaseToken__factory"; -export { Multicall__factory } from "./factories/Multicall__factory"; -export { MultichainClaimsRouter__factory } from "./factories/MultichainClaimsRouter__factory"; -export { MultichainGlvRouter__factory } from "./factories/MultichainGlvRouter__factory"; -export { MultichainGmRouter__factory } from "./factories/MultichainGmRouter__factory"; -export { MultichainOrderRouter__factory } from "./factories/MultichainOrderRouter__factory"; -export { MultichainSubaccountRouter__factory } from "./factories/MultichainSubaccountRouter__factory"; -export { MultichainTransferRouter__factory } from "./factories/MultichainTransferRouter__factory"; -export { MultichainUtils__factory } from "./factories/MultichainUtils__factory"; -export { MultichainVault__factory } from "./factories/MultichainVault__factory"; -export { Reader__factory } from "./factories/Reader__factory"; -export { ReaderV2__factory } from "./factories/ReaderV2__factory"; -export { ReferralStorage__factory } from "./factories/ReferralStorage__factory"; -export { RelayParams__factory } from "./factories/RelayParams__factory"; -export { RewardReader__factory } from "./factories/RewardReader__factory"; -export { RewardRouter__factory } from "./factories/RewardRouter__factory"; -export { RewardTracker__factory } from "./factories/RewardTracker__factory"; -export { SmartAccount__factory } from "./factories/SmartAccount__factory"; -export { StBTC__factory } from "./factories/StBTC__factory"; -export { SubaccountApproval__factory } from "./factories/SubaccountApproval__factory"; -export { SubaccountGelatoRelayRouter__factory } from "./factories/SubaccountGelatoRelayRouter__factory"; -export { SubaccountRouter__factory } from "./factories/SubaccountRouter__factory"; -export { SyntheticsReader__factory } from "./factories/SyntheticsReader__factory"; -export { SyntheticsRouter__factory } from "./factories/SyntheticsRouter__factory"; -export { Timelock__factory } from "./factories/Timelock__factory"; -export { Token__factory } from "./factories/Token__factory"; -export { Treasury__factory } from "./factories/Treasury__factory"; -export { UniPool__factory } from "./factories/UniPool__factory"; -export { UniswapV2__factory } from "./factories/UniswapV2__factory"; -export { Vault__factory } from "./factories/Vault__factory"; -export { VaultReader__factory } from "./factories/VaultReader__factory"; -export { VaultV2__factory } from "./factories/VaultV2__factory"; -export { VaultV2b__factory } from "./factories/VaultV2b__factory"; -export { Vester__factory } from "./factories/Vester__factory"; -export { WETH__factory } from "./factories/WETH__factory"; diff --git a/vite.config.ts b/vite.config.ts index f4e32ceecf..f20617b828 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -61,7 +61,6 @@ export default defineConfig(({ mode }) => { locales: path.resolve(__dirname, "src/locales"), pages: path.resolve(__dirname, "src/pages"), styles: path.resolve(__dirname, "src/styles"), - "typechain-types": path.resolve(__dirname, "src/typechain-types"), prebuilt: path.resolve(__dirname, "src/prebuilt"), sdk: path.resolve(__dirname, "sdk/src"), },