mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-13 21:52:36 +03:00
cjs -> esm
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { ethers } from 'ethers';
|
||||
import clone from 'just-clone';
|
||||
import { ERC20__factory } from '@orionprotocol/contracts/lib/ethers-v6-cjs/index.js';
|
||||
import { ERC20__factory } from '@orionprotocol/contracts/lib/ethers-v6/index.js';
|
||||
import { APPROVE_ERC20_GAS_LIMIT, NATIVE_CURRENCY_PRECISION } from './constants/index.js';
|
||||
import type {
|
||||
AggregatedBalanceRequirement, ApproveFix, Asset, BalanceIssue, BalanceRequirement, Source,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { ethers } from 'ethers';
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6-cjs/index.js';
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6/index.js';
|
||||
import getBalances from '../../utils/getBalances.js';
|
||||
import BalanceGuard from '../../BalanceGuard.js';
|
||||
import getAvailableSources from '../../utils/getAvailableFundsSources.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SwapExecutor__factory, AeroPool__factory } from "@orionprotocol/contracts/lib/ethers-v6-cjs/index.js"
|
||||
import { SwapExecutor__factory, AeroPool__factory } from "@orionprotocol/contracts/lib/ethers-v6/index.js"
|
||||
import { type BigNumberish, JsonRpcProvider } from "ethers"
|
||||
import { SafeArray } from "../../../utils/safeGetters.js"
|
||||
import { addCallParams } from "./utils.js"
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
SwapExecutor__factory,
|
||||
CurveRegistry__factory,
|
||||
ERC20__factory,
|
||||
} from "@orionprotocol/contracts/lib/ethers-v6-cjs/index.js";
|
||||
} from "@orionprotocol/contracts/lib/ethers-v6/index.js";
|
||||
import { MaxUint256, type BigNumberish, type JsonRpcProvider } from "ethers";
|
||||
import { addCallParams, pathCallWithBalance } from "./utils.js";
|
||||
import type { SingleSwap } from "../../../types.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SwapExecutor__factory } from "@orionprotocol/contracts/lib/ethers-v6-cjs/index.js"
|
||||
import { SwapExecutor__factory } from "@orionprotocol/contracts/lib/ethers-v6/index.js"
|
||||
import type { BigNumberish, AddressLike } from "ethers"
|
||||
import { type CallParams, addCallParams } from "./utils.js"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SwapExecutor__factory } from "@orionprotocol/contracts/lib/ethers-v6-cjs/index.js"
|
||||
import { SwapExecutor__factory } from "@orionprotocol/contracts/lib/ethers-v6/index.js"
|
||||
import type { BigNumberish, AddressLike } from "ethers"
|
||||
import { type CallParams, addCallParams } from "./utils.js"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SwapExecutor__factory } from "@orionprotocol/contracts/lib/ethers-v6-cjs/index.js"
|
||||
import { SwapExecutor__factory } from "@orionprotocol/contracts/lib/ethers-v6/index.js"
|
||||
import { SafeArray } from "../../../utils/safeGetters.js"
|
||||
import { type BytesLike, type BigNumberish, concat, ethers, toBeHex } from "ethers"
|
||||
import { addCallParams } from "./utils.js"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SwapExecutor__factory, UniswapV3Pool__factory } from "@orionprotocol/contracts/lib/ethers-v6-cjs/index.js"
|
||||
import { SwapExecutor__factory, UniswapV3Pool__factory } from "@orionprotocol/contracts/lib/ethers-v6/index.js"
|
||||
import { type BigNumberish , ethers, JsonRpcProvider } from "ethers"
|
||||
import { SafeArray } from "../../../utils/safeGetters.js"
|
||||
import { addCallParams } from "./utils.js"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ERC20__factory, SwapExecutor__factory } from "@orionprotocol/contracts/lib/ethers-v6-cjs/index.js"
|
||||
import { ERC20__factory, SwapExecutor__factory } from "@orionprotocol/contracts/lib/ethers-v6/index.js"
|
||||
import type { AddressLike } from "ethers"
|
||||
import { type BytesLike, ethers, type BigNumberish } from "ethers"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SwapExecutor__factory } from "@orionprotocol/contracts/lib/ethers-v6-cjs/index.js"
|
||||
import { SwapExecutor__factory } from "@orionprotocol/contracts/lib/ethers-v6/index.js"
|
||||
import type { BigNumberish } from "ethers"
|
||||
import { type CallParams, addCallParams } from "./utils.js"
|
||||
import type { AddressLike } from "ethers"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { ethers } from 'ethers';
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6-cjs/index.js';
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6/index.js';
|
||||
import getBalances from '../../utils/getBalances.js';
|
||||
import BalanceGuard from '../../BalanceGuard.js';
|
||||
import type Unit from '../index.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { LibValidator } from '@orionprotocol/contracts/lib/ethers-v6-cjs/Exchange.js';
|
||||
import type { LibValidator } from '@orionprotocol/contracts/lib/ethers-v6/Exchange.js';
|
||||
import { ethers, ZeroAddress } from 'ethers';
|
||||
import type { AddressLike, JsonRpcProvider, BigNumberish, BytesLike } from 'ethers';
|
||||
import cloneDeep from 'lodash.clonedeep';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { ethers } from 'ethers';
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6-cjs/index.js';
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6/index.js';
|
||||
import getBalances from '../../utils/getBalances.js';
|
||||
import BalanceGuard from '../../BalanceGuard.js';
|
||||
import getAvailableSources from '../../utils/getAvailableFundsSources.js';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { ethers } from 'ethers';
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6-cjs/index.js';
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6/index.js';
|
||||
import getBalances from '../../utils/getBalances.js';
|
||||
import BalanceGuard from '../../BalanceGuard.js';
|
||||
import getAvailableSources from '../../utils/getAvailableFundsSources.js';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { ethers } from 'ethers';
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6-cjs/index.js';
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6/index.js';
|
||||
import getBalances from '../../utils/getBalances.js';
|
||||
import BalanceGuard from '../../BalanceGuard.js';
|
||||
import type Unit from '../index.js';
|
||||
|
||||
@@ -4,7 +4,7 @@ import {pmmOrderSchema} from "./schemas/order";
|
||||
import {simpleFetch} from "simple-typed-fetch";
|
||||
import {ethers, Wallet} from "ethers";
|
||||
import {BigNumber} from "bignumber.js";
|
||||
import { ERC20__factory } from '@orionprotocol/contracts/lib/ethers-v6-cjs/index.js';
|
||||
import { ERC20__factory } from '@orionprotocol/contracts/lib/ethers-v6/index.js';
|
||||
import {orionRFQContractABI} from "./abi/OrionRFQ";
|
||||
|
||||
export default class Pmm {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ERC20__factory } from '@orionprotocol/contracts/lib/ethers-v6-cjs/index.js';
|
||||
import { ERC20__factory } from '@orionprotocol/contracts/lib/ethers-v6/index.js';
|
||||
import { ethers } from 'ethers';
|
||||
import invariant from 'tiny-invariant';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ERC20__factory, Exchange__factory, type Exchange } from "@orionprotocol/contracts/lib/ethers-v6-cjs/index.js";
|
||||
import { ERC20__factory, Exchange__factory, type Exchange } from "@orionprotocol/contracts/lib/ethers-v6/index.js";
|
||||
import type { BigNumber } from "bignumber.js";
|
||||
import { ZeroAddress, ethers } from "ethers";
|
||||
import { INTERNAL_PROTOCOL_PRECISION, NATIVE_CURRENCY_PRECISION } from "../constants/index.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Exchange } from '@orionprotocol/contracts/lib/ethers-v6-cjs/index.js';
|
||||
import type { Exchange } from '@orionprotocol/contracts/lib/ethers-v6/index.js';
|
||||
import type { BigNumber } from 'bignumber.js';
|
||||
import type { ethers } from 'ethers';
|
||||
import type { Aggregator } from '../services/Aggregator/index.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6-cjs/index.js';
|
||||
import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v6/index.js';
|
||||
import { ethers } from 'ethers';
|
||||
import { z } from 'zod';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user