Renamed type SwapInfo to SingleSwap

This commit is contained in:
lomonoshka
2023-09-28 18:45:40 +04:00
parent 1134865abf
commit 3c183f6cff
3 changed files with 9 additions and 9 deletions

View File

@@ -1,12 +1,12 @@
import { SwapExecutor__factory, CurveRegistry__factory } from "@orionprotocol/contracts/lib/ethers-v5/index.js"
import type { BigNumberish, providers } from "ethers"
import type { SwapInfo } from "../generateSwapCalldata.js"
import type { SingleSwap } from "../generateSwapCalldata.js"
import { addCallParams } from "./utils.js"
export async function generateCurveStableSwapCall(
amount: BigNumberish,
to: string,
swap: SwapInfo,
swap: SingleSwap,
provider: providers.JsonRpcProvider,
curveRegistry: string
) {

View File

@@ -3,11 +3,11 @@ import { SafeArray } from "../../../utils/safeGetters.js"
import { BigNumber } from "ethers"
import type { BytesLike, BigNumberish } from "ethers"
import { defaultAbiCoder, concat } from "ethers/lib/utils.js"
import type { SwapInfo } from "../generateSwapCalldata.js"
import type { SingleSwap } from "../generateSwapCalldata.js"
import { addCallParams, generateCalls } from "./utils.js"
export async function generateUni2Calls(
path: SafeArray<SwapInfo>,
path: SafeArray<SingleSwap>,
recipient: string
) {
const executorInterface = SwapExecutor__factory.createInterface()

View File

@@ -1,11 +1,11 @@
import { SwapExecutor__factory, UniswapV3Pool__factory } from "@orionprotocol/contracts/lib/ethers-v5/index.js"
import { type BigNumberish, providers, type BytesLike, ethers } from "ethers"
import { SafeArray } from "../../../utils/safeGetters.js"
import type { SwapInfo } from "../generateSwapCalldata.js"
import type { SingleSwap } from "../generateSwapCalldata.js"
import { addCallParams, generateCalls } from "./utils.js"
export async function generateUni3Call(
swap: SwapInfo,
swap: SingleSwap,
amount: BigNumberish | undefined,
recipient: string,
provider: providers.JsonRpcProvider
@@ -20,7 +20,7 @@ export async function generateUni3Call(
}
export async function generateOrion3Call(
swap: SwapInfo,
swap: SingleSwap,
amount: BigNumberish | undefined,
recipient: string,
provider: providers.JsonRpcProvider
@@ -35,7 +35,7 @@ export async function generateOrion3Call(
}
export async function generateUni3Calls(
path: SafeArray<SwapInfo>,
path: SafeArray<SingleSwap>,
amount: BigNumberish,
recipient: string,
provider: providers.JsonRpcProvider
@@ -53,7 +53,7 @@ export async function generateUni3Calls(
}
export async function generateOrion3Calls(
path: SafeArray<SwapInfo>,
path: SafeArray<SingleSwap>,
amount: BigNumberish,
recipient: string,
provider: providers.JsonRpcProvider