Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: testnet-prod #4775

Merged
merged 100 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
dfc2a84
Sdk wrapper 2.1.0 alpha.0 (#4560)
just-a-node Jun 21, 2023
ab8f1c1
Sdk options pattern (#4558)
just-a-node Jun 21, 2023
de9cf42
feat: add confirmation blocks msg poller (#4562)
preethamr Jun 21, 2023
d7849c5
Alchemix Next tokens (#4510)
Hesnicewithit Jun 21, 2023
e3cd557
feat: admin connector wip
rhlsthrm Jun 21, 2023
b8879d1
ci: commitlint
rhlsthrm Jun 21, 2023
7465e35
fix: review updates
rhlsthrm Jun 22, 2023
12b4da3
chore: build artifacts
rhlsthrm Jun 22, 2023
e7c1a33
feat: structure new tests
rhlsthrm Jun 22, 2023
f2f2a03
fix: change test to check that root is able to be propagated
rhlsthrm Jun 22, 2023
c199519
fix: sanity check; comments
LayneHaber Jun 22, 2023
ffb76a8
fix: cleaner test utilities; add fuzzing; add proper asserts
LayneHaber Jun 22, 2023
2150775
feat: move fork tests to fork dir and ignore in ci
LayneHaber Jun 23, 2023
c50d5ed
fix: stronger assertions in units
LayneHaber Jun 23, 2023
f6e6a3e
feat: add deployment
LayneHaber Jun 23, 2023
ecce107
Tf vars (#4531)
just-a-node Jun 23, 2023
0871942
feat(ladao-xocolatl): add xoc to prod allowlisting
0xdcota Jun 9, 2023
90c30f2
fix(ladao-xocolatl): add local and adopted to all domains for xoc
0xdcota Jun 10, 2023
64b635f
chore(ladao-xocolatl): update xoc config with local and adopted equal…
0xdcota Jun 12, 2023
bb3657a
Sdk server cors (#4576)
just-a-node Jun 23, 2023
9af1a92
feat: bump sdk-wrapper version
just-a-node Jun 23, 2023
097530e
Merge pull request #4580 from connext/sdk-v.2.1.0-alpha.1
LayneHaber Jun 23, 2023
c79411d
ci: publish sdk from sdk-wrapper (#4588)
just-a-node Jun 26, 2023
dfa8ee2
Sdk wrapper publish (#4589)
just-a-node Jun 26, 2023
14c25c3
ci: commitlint (#4590)
just-a-node Jun 27, 2023
82636d3
Merge branch 'testnet-prod'
rhlsthrm Jun 27, 2023
44163b8
Merge branch 'testnet-prod'
rhlsthrm Jun 27, 2023
50e7bd8
fix: 4574 carto graph query errors (#4599)
liu-zhipeng Jun 27, 2023
890be10
feat: hardhat tasks to add + enroll connector
LayneHaber Jun 27, 2023
17874db
chore: rebuild
LayneHaber Jun 27, 2023
b403bdb
feat: deploy admin connector
LayneHaber Jun 27, 2023
93ebed5
fix: temporarily prevent messaging init from running
LayneHaber Jun 27, 2023
cd102bb
fix: spacing
LayneHaber Jun 27, 2023
6dc8610
Merge branch 'main' into 4564-create-admin-connector-to-receive-bnb-c…
LayneHaber Jun 27, 2023
523dfca
feat: deploy admin hub connector
LayneHaber Jun 27, 2023
fde2ff9
chore: export deployment
LayneHaber Jun 27, 2023
0b04ed0
chore: add alchemix mainnet assets
Hesnicewithit Jun 27, 2023
1bf4421
chore: formatting
Hesnicewithit Jun 27, 2023
65fd470
fix: simplify inputs
LayneHaber Jun 28, 2023
3253a0a
4254 slippage (#4542)
prathmeshkhandelwal1 Jun 28, 2023
1193bfd
fix: hard exit on mq disruption (#4600)
Jun 28, 2023
2435602
ci: add sdk-core to publish step
just-a-node Jun 28, 2023
7931fea
build: bump sdk-core version
just-a-node Jun 28, 2023
9ff23fb
build: bump sdk version
just-a-node Jun 28, 2023
d63aaa8
Merge pull request #4608 from connext/sdk-v2.1.0-alpha.3
LayneHaber Jun 28, 2023
96df6d9
Merge pull request #4569 from connext/4564-create-admin-connector-to-…
LayneHaber Jun 28, 2023
a6d303b
Merge pull request Sdk wrapper bn conversion (#4604)
just-a-node Jun 28, 2023
8853f32
Merge pull request #4457 from La-DAO/feat/add-ladao-xocolatl-to-prod-…
LayneHaber Jun 28, 2023
fb339d1
build: bump sdk version (#4610)
just-a-node Jun 29, 2023
6dcbe7a
Chain abstraction v1.0.2 alpha.20 (#4624)
just-a-node Jun 30, 2023
16febd9
ci: commitlint (#4625)
just-a-node Jun 30, 2023
d161e36
build: sdk stable latest (#4620)
just-a-node Jun 30, 2023
89f201d
feat: add fitler by domain getTransfers() (#4615)
sanchaymittal Jul 3, 2023
f719524
chore: remove unused parts (#4380)
wanglonghong Jul 4, 2023
735ad08
chore: slow down lighthouse (#4630)
LayneHaber Jul 5, 2023
a6fb2fd
ci: add mainnet ops (#4636)
wanglonghong Jul 5, 2023
cb859b9
fix: add pagination on message status check
preethamr Jul 5, 2023
e4d4559
fix: increase page size
preethamr Jul 6, 2023
c846ca6
Merge pull request #4643 from connext/4621-carto-not-updating-message…
preethamr Jul 7, 2023
ae066bb
Merge branch 'testnet-prod' into main
preethamr Jul 7, 2023
614782b
feat: add ability to search by execute and reconcile hash (#4653)
Jul 7, 2023
6fd72f7
add ecr lifecycle policy
carlomazzaferro Jul 7, 2023
7d1ec45
fix: expire images
carlomazzaferro Jul 7, 2023
0f0b46b
Merge branch 'fix/remove-old-images' of https://github.com/connext/nx…
carlomazzaferro Jul 7, 2023
5d16212
Merge pull request #4662 from connext/fix/remove-old-images
carlomazzaferro Jul 7, 2023
99852d4
Sdk server mainnet ops (#4652)
just-a-node Jul 7, 2023
1fc8a52
fix: commitlint
rhlsthrm Jul 7, 2023
8c79eaf
chore: add new excluded address
rhlsthrm Jul 7, 2023
b4eccab
fix: historical price poller check to timestamp (#4664)
liu-zhipeng Jul 7, 2023
f87eb49
Merge branch 'main' into alchemix-mainnet
LayneHaber Jul 7, 2023
7a9f5c8
Merge pull request #4663 from connext/4654-sequencer-add-supported-co…
preethamr Jul 7, 2023
47d43c7
chore: exempt satellite on mumbai
LayneHaber Jul 7, 2023
76f8c3a
Merge pull request #4669 from connext/60-exempt-satellite
LayneHaber Jul 10, 2023
35e6e73
Merge pull request #4603 from Hesnicewithit/alchemix-mainnet
LayneHaber Jul 10, 2023
64d5896
chore: change
wanglonghong Jul 11, 2023
6403d01
Merge pull request #4675 from connext/reduce-fastpath-latency
preethamr Jul 11, 2023
81706e2
build: bump sdk-core (#4677)
just-a-node Jul 11, 2023
dc84ae9
Merge branch 'testnet-prod'
rhlsthrm Jul 11, 2023
e28db10
feat: 4538 wormhole connector (#4623)
liu-zhipeng Jul 11, 2023
440a20f
feat: wormhole hh task
liu-zhipeng Jul 14, 2023
23e7ae9
fix: BnbHubConnector connector name
liu-zhipeng Jul 14, 2023
4669681
ci: fix commitlint
liu-zhipeng Jul 14, 2023
bb20f77
fix: pin dependency
LayneHaber Jul 14, 2023
69dc24b
chore: yarn.lock
liu-zhipeng Jul 14, 2023
347113d
chore: add documentation
LayneHaber Jul 14, 2023
826a064
Merge pull request #4698 from connext/4695-wormhole-deliver-message-h…
LayneHaber Jul 14, 2023
0a7d466
Merge pull request 4699 sdk provider options (#4701)
just-a-node Jul 15, 2023
c01c890
4237 multipath swaps (#4609)
prathmeshkhandelwal1 Jul 17, 2023
de32c5a
chore: cleanup web3signer (#4400)
sanchaymittal Jul 17, 2023
4c05767
chore: add xocaltal router
rhlsthrm Jul 19, 2023
96d81c8
fix: 512 -> 2048 (#4715)
carlomazzaferro Jul 21, 2023
8741255
fix: provider passing in options (#4731)
prathmeshkhandelwal1 Jul 28, 2023
6e35a29
Merge pull request: Testnet prod sync (#4742)
just-a-node Jul 28, 2023
2ad8762
chore: add router
rhlsthrm Jul 31, 2023
c26f9a5
Merge branch 'main' of github.com:connext/monorepo
rhlsthrm Jul 31, 2023
dce21fe
Merge branch 'testnet-prod'
rhlsthrm Jul 31, 2023
4944d89
ci: nuke commitlint
rhlsthrm Aug 1, 2023
293fb15
add BTRST token to allowlisting scripts (#4719)
multiart Aug 2, 2023
8deb2b0
feat: gelato estimate for testnet (#4774)
sanchaymittal Aug 3, 2023
3b4e79f
Merge pull request RADAR_TEST asset added (#4745)
mantasfam Aug 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ jobs:
- name: Check Yarn version
run: yarn --version

- name: Validate using commitlint
if: github.ref != 'refs/heads/testnet-prod' || github.ref != 'refs/heads/prod'
uses: wagoid/commitlint-github-action@v5
with:
commitDepth: 1
# - name: Validate using commitlint
# if: github.ref != 'refs/heads/testnet-prod' || github.ref != 'refs/heads/prod'
# uses: wagoid/commitlint-github-action@v5
# with:
# commitDepth: 1

- name: Yarn install
run: yarn install
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

## Connext Architecture

The Connext architecture can be seen as a layered system, as follows.
The Connext architecture can be seen as a layered system, as follows:

| Layer | Protocol/Stakeholders |
| -------------------------------- | -------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion ops/mainnet/prod/core/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ module "lighthouse_sendoutboundroot_cron" {
stage = var.stage
container_env_vars = merge(local.lighthouse_env_vars, { LIGHTHOUSE_SERVICE = "sendoutboundroot" })
schedule_expression = "rate(120 minutes)"
memory_size = 512
memory_size = 2048
}


Expand Down
63 changes: 0 additions & 63 deletions packages/adapters/web3signer/api.ts

This file was deleted.

8 changes: 1 addition & 7 deletions packages/adapters/web3signer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,11 @@
"dist/**/*"
],
"scripts": {
"dev": "",
"start": "",
"build": "tsc --build ./tsconfig.build.json",
"lint": "eslint ./src --ext .ts --env node",
"test": "",
"clean": "rimraf ./dist ./tsconfig.tsBuildInfo",
"build": "tsc --build ./tsconfig.build.json",
"verify": "yarn test && yarn clean && yarn build && yarn lint --max-warnings 0",
"purge": "yarn clean && rimraf ./coverage ./node_modules",
"tsp": "yarn run tsp:root \"$@\" --cwd $(pwd)",
"codegen:runtime": "graphql-codegen --config ./runtime.yml",
"codegen:analytics": "graphql-codegen --config ./analytics.yml",
"version": "yarn version"
},
"nodemonConfig": {
Expand Down
5 changes: 4 additions & 1 deletion packages/agents/cartographer/api/gelato2.http
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
# just a few examples, more examples here: https://postgrest.org/en/stable/api.html#horizontal-filtering-rows

### get conversion rate
GET {{Url}}/oracles/{{chainId}}/conversionRate?to=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
GET {{Url}}/oracles/{{chainId}}/conversionRate?to=0x0000000000000000000000000000000000000000

### get estimate
GET {{Url}}/oracles/{{chainId}}/estimate?paymentToken=0x0000000000000000000000000000000000000000&gasLimit=1000000
6 changes: 6 additions & 0 deletions packages/agents/chain-abstraction/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
"dependencies": {
"@connext/nxtp-utils": "workspace:*",
"@connext/sdk-core": "workspace:*",
"@pancakeswap/sdk": "^5.0.0",
"@sinclair/typebox": "0.25.21",
"@swapr/sdk": "^1.9.0",
"@uniswap/sdk": "^3.0.3",
"@uniswap/sdk-core": "^3.2.6",
"@uniswap/smart-order-router": "^3.13.4",
"@uniswap/v3-sdk": "^3.9.0",
"ethers": "5.7.2",
"isomorphic-fetch": "^3.0.0",
"memoizee": "0.4.15",
Expand Down
31 changes: 30 additions & 1 deletion packages/agents/chain-abstraction/src/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ import {
getSwapQuoteForUniV3,
initCoreSDK as _initCoreSDK,
} from "./swapquote";
import {
DestinationSwapPathCallback,
getSwapPathForUniV3 as _getSwapPathForUniV3,
getSwapPathForUniV2 as _getSwapPathForUniV2,
// getSwapPathForHoneySwap as _getSwapPathForHoneySwap,
getPathForPanCake as _getPathForPanCake,
} from "./swaputil";
import { DEPLOYED_ADDRESSES as _DEPLOYED_ADDRESSES } from "./address";
import {
getSupportedAssets as _getSupportedAssets,
Expand All @@ -34,6 +41,10 @@ export const getTokenPricesInUsd = _getTokenPricesInUsd;

export const DEPLOYED_ADDRESSES = _DEPLOYED_ADDRESSES;
export const initCoreSDK = _initCoreSDK;
export const getSwapPathForUniV3 = _getSwapPathForUniV3;
export const getSwapPathForUniV2 = _getSwapPathForUniV2;
// export const getSwapPathForHoneySwap = _getSwapPathForHoneySwap;
export const getPathForPanCake = _getPathForPanCake;

export const OriginSwapDataFns: Record<Swapper, OriginSwapDataCallback> = {
UniV2: getOriginSwapDataForUniV2,
Expand All @@ -47,6 +58,13 @@ export const DestinationSwapDataFns: Record<Swapper, DestinationSwapDataCallback
OneInch: getDestinationSwapDataForOneInch,
};

export const DestinationSwapPathFns: Record<Swapper, DestinationSwapPathCallback> = {
UniV2: getSwapPathForUniV2,
UniV3: getSwapPathForUniV3,
PanCake: getPathForPanCake,
// HoneySwap: getSwapPathForHoneySwap,
};

export const SwapQuoteFns: Record<Swapper, SwapQuoteCallback> = {
UniV2: getSwapQuoteForUniV2,
UniV3: getSwapQuoteForUniV3,
Expand Down Expand Up @@ -96,45 +114,56 @@ export const OriginSwapperPerDomain: Record<string, { type: Swapper; address: st
}, // Polygon zkEVM
};

export const DestinationSwapperPerDomain: Record<string, { type: Swapper; address: string; quoter: string }> = {
export const DestinationSwapperPerDomain: Record<
string,
{ type: Swapper; address: string; quoter: string; path: Swapper }
> = {
"6648936": {
type: Swapper.UniV3,
address: "",
quoter: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
path: Swapper.UniV3,
}, // ETH mainnet
"1869640809": {
type: Swapper.UniV3,
address: "0x1135Cc96A7E9d8f161BE8B6bDB74F896A9658a08",
quoter: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
path: Swapper.UniV3,
}, // Optimism
"6450786": {
type: Swapper.UniV3,
address: "0x0b081b724CDC4DD9186E64F259b5fC589a4Fd7D0", // PancakeV3 Swapper
quoter: "0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997",
path: Swapper.PanCake,
}, // BNB Chain
"6778479": {
type: Swapper.UniV2,
address: "0x7b659eF70e18C01d88F305042ae916D235cb8648",
quoter: "0x7b659eF70e18C01d88F305042ae916D235cb8648",
path: Swapper.HoneySwap,
}, // Gnosis Chain
"1886350457": {
type: Swapper.UniV3,
address: "0xeC345E9be52f0Fca8aAd6aec3254Ed86151b060d", // UniV3 Swapper
quoter: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
path: Swapper.UniV3,
}, // Polygon
"1634886255": {
type: Swapper.UniV3,
address: "0x924E679c3c23017aef214c9ea1fBC22e97ff9E2e",
quoter: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
path: Swapper.UniV3,
}, // Arbitrum One
"2053862243": {
type: Swapper.UniV3,
address: "",
quoter: "",
path: "",
}, // zkSync2 mainnet
"1887071085": {
type: Swapper.UniV3,
address: "",
quoter: "",
path: "",
}, // Polygon zkEVM
};
13 changes: 8 additions & 5 deletions packages/agents/chain-abstraction/src/helpers/swapdata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type OriginSwapDataCallbackArgs = {
slippage?: number;
};
export type OriginSwapDataCallback = (args: OriginSwapDataCallbackArgs) => Promise<string>;
export type DestinationSwapDataCallback = (args: any) => Promise<string>;
export type DestinationSwapDataCallback = (args: any, path?: any) => Promise<string>;

// ==================================== ORIGIN SIDE ==================================== //
/**
Expand Down Expand Up @@ -56,17 +56,20 @@ export const getOriginSwapDataForOneInch = async (args: OriginSwapDataCallbackAr
/**
* Returns the `swapData` which will be used on the destination univ2 swapper
*/
export const getDestinationSwapDataForUniV2 = async (_args: any): Promise<string> => {
export const getDestinationSwapDataForUniV2 = async (_args: any, path?: any): Promise<string> => {
const args = _args as UniV2SwapperParams;
return defaultAbiCoder.encode(["uint256"], [args.amountOutMin]);
return path
? defaultAbiCoder.encode(["uint256", "address[]"], [args.amountOutMin, path])
: defaultAbiCoder.encode(["uint256"], [args.amountOutMin]);
};

/**
* Returns the `swapData` which will be used on the destination univ3 swapper
*/
export const getDestinationSwapDataForUniV3 = async (_args: any): Promise<string> => {
export const getDestinationSwapDataForUniV3 = async (_args: any, path?: any): Promise<string> => {
const args = _args as UniV3SwapperParams;
return defaultAbiCoder.encode(["uint24", "uint256"], [args.poolFee, args.amountOutMin]);
if (!path) return defaultAbiCoder.encode(["uint24", "uint256"], [args.poolFee, args.amountOutMin]);
return defaultAbiCoder.encode(["uint256", "bytes"], [args.amountOutMin, path]);
};

/**
Expand Down
111 changes: 111 additions & 0 deletions packages/agents/chain-abstraction/src/helpers/swaputil.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import { AlphaRouter, V3RouteWithValidQuote } from "@uniswap/smart-order-router";
import { ethers } from "ethers";
import { CurrencyAmount, Token, TradeType } from "@uniswap/sdk-core";
import { Route, Trade, Token as _Token, Fetcher, TokenAmount, Pair } from "@uniswap/sdk";
import { encodeRouteToPath } from "@uniswap/v3-sdk";
import {
Fetcher as PancakeFetcher,
Trade as PancakeTrade,
Token as PancakeToken,
Route as PancakeRoute,
CurrencyAmount as PancakeCurrencyAmount,
} from "@pancakeswap/sdk";

type SwapPathCallBackArgs = {
fromTokenContractAddress: string;
toTokenContractAddress: string;
signerAddress: string;
chainId: number;
rpc: string;
amount: string;
fromTokenDecimal?: number;
toTokenDecimal?: number;
};

export type DestinationSwapPathCallback = (args: SwapPathCallBackArgs) => Promise<any>;

/**
* Returns the `path` from the uniswap v3 router.
*/
export const getSwapPathForUniV3 = async (_args: SwapPathCallBackArgs) => {
try {
const { fromTokenContractAddress, toTokenContractAddress, chainId, rpc, fromTokenDecimal, toTokenDecimal, amount } =
_args;
const provider = new ethers.providers.JsonRpcProvider(rpc);
const tokenIn = new Token(chainId, fromTokenContractAddress, fromTokenDecimal ?? 18);
const tokenOut = new Token(chainId, toTokenContractAddress, toTokenDecimal ?? 18);
const amountIn = CurrencyAmount.fromRawAmount(tokenIn, +amount);

const router = new AlphaRouter({
chainId,
provider,
});

const routes = await router.route(amountIn, tokenOut, TradeType.EXACT_INPUT);

if (!routes) {
throw Error("No routes found for given Pair");
}

const route = routes?.route[0] as V3RouteWithValidQuote;
const path = encodeRouteToPath(route.route, false);
console.log(route.route, path, "from sdk function");
return {
quote: routes.quote,
tokenPath: path,
route: route.route.protocol,
};
} catch (err: unknown) {
throw Error(`getSwapPathForUniV3: Failed to get paths ${(err as Error).message}`);
}
};

/**
* Returns the `path` from the uniswap v2 router.
*/
export const getSwapPathForUniV2 = async (_args: SwapPathCallBackArgs) => {
try {
const { fromTokenContractAddress, toTokenContractAddress, chainId, rpc, fromTokenDecimal, toTokenDecimal, amount } =
_args;

const provider = new ethers.providers.JsonRpcProvider(rpc);

const tokenIn = new _Token(chainId, fromTokenContractAddress, fromTokenDecimal ?? 18);
const tokenOut = new _Token(chainId, toTokenContractAddress, toTokenDecimal ?? 18);
const amountIn = new TokenAmount(tokenIn, ethers.utils.parseUnits(amount, fromTokenDecimal).toString());

const pair: Pair = await Fetcher.fetchPairData(tokenIn, tokenOut, provider);
const route = new Route([pair], tokenIn);
const trade = new Trade(route, amountIn, TradeType.EXACT_INPUT);

return {
quote: trade.outputAmount.toSignificant(),
tokenPath: route.path.map((token) => token.address),
route: "V2",
};
} catch (err: unknown) {
throw Error(err as string);
}
};

export const getPathForPanCake = async (_args: SwapPathCallBackArgs) => {
try {
const { fromTokenContractAddress, toTokenContractAddress, chainId, fromTokenDecimal, toTokenDecimal, amount } =
_args;
const tokenIn = new PancakeToken(chainId, fromTokenContractAddress as `0x${string}`, fromTokenDecimal ?? 18, "");

const tokenOut = new PancakeToken(chainId, toTokenContractAddress as `0x${string}`, toTokenDecimal ?? 18, "");
const pair = await PancakeFetcher.fetchPairData(tokenIn, tokenOut);

const amountIn = PancakeCurrencyAmount.fromRawAmount(tokenIn, amount);
const route = new PancakeRoute([pair], tokenIn, tokenOut);
const trade = new PancakeTrade(route, amountIn, TradeType.EXACT_INPUT);
return {
quote: trade.outputAmount.toSignificant(),
tokenPath: route.path.map((token) => token.address),
route: "PANCAKE",
};
} catch (err: unknown) {
throw Error(err as string);
}
};
Loading