@dhedge/v2-sdk 2.1.4 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.d.ts +8 -0
- package/dist/services/odos/index.d.ts +15 -1
- package/dist/test/constants.d.ts +1 -0
- package/dist/v2-sdk.cjs.development.js +1552 -69
- package/dist/v2-sdk.cjs.development.js.map +1 -1
- package/dist/v2-sdk.cjs.production.min.js +1 -1
- package/dist/v2-sdk.cjs.production.min.js.map +1 -1
- package/dist/v2-sdk.esm.js +1552 -69
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/odos/OdosRouterV3.json +1351 -0
- package/src/config.ts +14 -5
- package/src/services/odos/index.ts +97 -13
- package/src/services/toros/completeWithdrawal.ts +1 -1
- package/src/services/toros/initWithdrawal.ts +1 -1
- package/src/services/toros/swapData.ts +83 -12
- package/src/test/constants.ts +2 -1
- package/src/test/odos.test.ts +43 -12
package/dist/config.d.ts
CHANGED
|
@@ -20,3 +20,11 @@ export declare const flatMoneyContractAddresses: Readonly<Partial<Record<Network
|
|
|
20
20
|
StableModule: string;
|
|
21
21
|
COLLATERAL: string;
|
|
22
22
|
}>>>;
|
|
23
|
+
export declare const OdosSwapFeeRecipient: {
|
|
24
|
+
polygon: string;
|
|
25
|
+
optimism: string;
|
|
26
|
+
arbitrum: string;
|
|
27
|
+
base: string;
|
|
28
|
+
ethereum: string;
|
|
29
|
+
plasma: string;
|
|
30
|
+
};
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { ethers } from "../..";
|
|
2
2
|
import { Pool } from "../../entities";
|
|
3
|
-
export declare const odosBaseUrl = "https://api.odos.xyz/sor";
|
|
3
|
+
export declare const odosBaseUrl = "https://enterprise-api.odos.xyz/sor";
|
|
4
|
+
export interface SwapTokenInfo {
|
|
5
|
+
inputToken: string;
|
|
6
|
+
inputAmount: ethers.BigNumber;
|
|
7
|
+
inputReceiver: string;
|
|
8
|
+
outputToken: string;
|
|
9
|
+
outputQuote: ethers.BigNumber;
|
|
10
|
+
outputMin: ethers.BigNumber;
|
|
11
|
+
outputReceiver: string;
|
|
12
|
+
}
|
|
13
|
+
export interface SwapReferralInfo {
|
|
14
|
+
code: ethers.BigNumber;
|
|
15
|
+
fee: ethers.BigNumber;
|
|
16
|
+
feeRecipient: string;
|
|
17
|
+
}
|
|
4
18
|
export declare function getOdosSwapTxData(pool: Pool, assetFrom: string, assetTo: string, amountIn: ethers.BigNumber | string, slippage: number): Promise<{
|
|
5
19
|
swapTxData: string;
|
|
6
20
|
minAmountOut: string;
|