@1delta/calldatalib 0.0.10 → 0.0.20
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/CalldataLib.d.ts +16 -17
- package/dist/CalldataLib.js +17 -18
- package/package.json +1 -1
package/dist/CalldataLib.d.ts
CHANGED
|
@@ -75,23 +75,22 @@ export declare enum ForwarderCommands {
|
|
|
75
75
|
}
|
|
76
76
|
export declare enum DexTypeMappings {
|
|
77
77
|
UNISWAP_V3_ID = 0,
|
|
78
|
-
|
|
78
|
+
UNISWAP_V2_ID = 1,
|
|
79
79
|
UNISWAP_V4_ID = 2,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
SYNC_SWAP_ID = 190,
|
|
80
|
+
IZI_ID = 5,
|
|
81
|
+
UNISWAP_V2_FOT_ID = 3,
|
|
82
|
+
CURVE_V1_STANDARD_ID = 64,
|
|
83
|
+
CURVE_RECEIVED_ID = 65,
|
|
84
|
+
CURVE_FORK_ID = 66,
|
|
85
|
+
WOO_FI_ID = 80,
|
|
86
|
+
GMX_ID = 90,
|
|
87
|
+
KTX_ID = 91,
|
|
88
|
+
BALANCER_V2_ID = 128,
|
|
89
|
+
BALANCER_V3_ID = 129,
|
|
90
|
+
LB_ID = 140,
|
|
91
|
+
DODO_ID = 150,
|
|
92
|
+
SYNC_SWAP_ID = 160,
|
|
93
|
+
ERC4646_ID = 253,
|
|
95
94
|
NATIVE_WRAP_ID = 254
|
|
96
95
|
}
|
|
97
96
|
export declare enum DexForkMappings {
|
|
@@ -130,7 +129,7 @@ export declare function encodeCurveStyleSwap(tokenOut: Address, receiver: Addres
|
|
|
130
129
|
export declare function encodeCurveNGStyleSwap(tokenOut: Address, receiver: Address, pool: Address, indexIn: bigint, indexOut: bigint, selectorId: bigint, cfg: any): Hex;
|
|
131
130
|
export declare function encodeNextGenDexSettle(singleton: Address, nativeAmount: bigint): Hex;
|
|
132
131
|
export declare function encodeNextGenDexSettleBalancer(singleton: Address, asset: Address, amountHint: bigint): Hex;
|
|
133
|
-
export declare function encodeTransferIn(asset: Address,
|
|
132
|
+
export declare function encodeTransferIn(asset: Address, receiver: Address, amount: bigint): Hex;
|
|
134
133
|
export declare function encodeSweep(asset: Address, receiver: Address, amount: bigint, sweepType: any): Hex;
|
|
135
134
|
export declare function encodeWrap(amount: bigint, wrapTarget: Address): Hex;
|
|
136
135
|
export declare function encodeApprove(asset: Address, target: Address): Hex;
|
package/dist/CalldataLib.js
CHANGED
|
@@ -90,23 +90,22 @@ export var ForwarderCommands;
|
|
|
90
90
|
export var DexTypeMappings;
|
|
91
91
|
(function (DexTypeMappings) {
|
|
92
92
|
DexTypeMappings[DexTypeMappings["UNISWAP_V3_ID"] = 0] = "UNISWAP_V3_ID";
|
|
93
|
-
DexTypeMappings[DexTypeMappings["
|
|
93
|
+
DexTypeMappings[DexTypeMappings["UNISWAP_V2_ID"] = 1] = "UNISWAP_V2_ID";
|
|
94
94
|
DexTypeMappings[DexTypeMappings["UNISWAP_V4_ID"] = 2] = "UNISWAP_V4_ID";
|
|
95
|
-
DexTypeMappings[DexTypeMappings["
|
|
96
|
-
DexTypeMappings[DexTypeMappings["
|
|
97
|
-
DexTypeMappings[DexTypeMappings["
|
|
98
|
-
DexTypeMappings[DexTypeMappings["
|
|
99
|
-
DexTypeMappings[DexTypeMappings["
|
|
100
|
-
DexTypeMappings[DexTypeMappings["
|
|
101
|
-
DexTypeMappings[DexTypeMappings["
|
|
102
|
-
DexTypeMappings[DexTypeMappings["
|
|
103
|
-
DexTypeMappings[DexTypeMappings["
|
|
104
|
-
DexTypeMappings[DexTypeMappings["
|
|
105
|
-
DexTypeMappings[DexTypeMappings["
|
|
106
|
-
DexTypeMappings[DexTypeMappings["
|
|
107
|
-
DexTypeMappings[DexTypeMappings["
|
|
108
|
-
DexTypeMappings[DexTypeMappings["
|
|
109
|
-
DexTypeMappings[DexTypeMappings["SYNC_SWAP_ID"] = 190] = "SYNC_SWAP_ID";
|
|
95
|
+
DexTypeMappings[DexTypeMappings["IZI_ID"] = 5] = "IZI_ID";
|
|
96
|
+
DexTypeMappings[DexTypeMappings["UNISWAP_V2_FOT_ID"] = 3] = "UNISWAP_V2_FOT_ID";
|
|
97
|
+
DexTypeMappings[DexTypeMappings["CURVE_V1_STANDARD_ID"] = 64] = "CURVE_V1_STANDARD_ID";
|
|
98
|
+
DexTypeMappings[DexTypeMappings["CURVE_RECEIVED_ID"] = 65] = "CURVE_RECEIVED_ID";
|
|
99
|
+
DexTypeMappings[DexTypeMappings["CURVE_FORK_ID"] = 66] = "CURVE_FORK_ID";
|
|
100
|
+
DexTypeMappings[DexTypeMappings["WOO_FI_ID"] = 80] = "WOO_FI_ID";
|
|
101
|
+
DexTypeMappings[DexTypeMappings["GMX_ID"] = 90] = "GMX_ID";
|
|
102
|
+
DexTypeMappings[DexTypeMappings["KTX_ID"] = 91] = "KTX_ID";
|
|
103
|
+
DexTypeMappings[DexTypeMappings["BALANCER_V2_ID"] = 128] = "BALANCER_V2_ID";
|
|
104
|
+
DexTypeMappings[DexTypeMappings["BALANCER_V3_ID"] = 129] = "BALANCER_V3_ID";
|
|
105
|
+
DexTypeMappings[DexTypeMappings["LB_ID"] = 140] = "LB_ID";
|
|
106
|
+
DexTypeMappings[DexTypeMappings["DODO_ID"] = 150] = "DODO_ID";
|
|
107
|
+
DexTypeMappings[DexTypeMappings["SYNC_SWAP_ID"] = 160] = "SYNC_SWAP_ID";
|
|
108
|
+
DexTypeMappings[DexTypeMappings["ERC4646_ID"] = 253] = "ERC4646_ID";
|
|
110
109
|
DexTypeMappings[DexTypeMappings["NATIVE_WRAP_ID"] = 254] = "NATIVE_WRAP_ID";
|
|
111
110
|
})(DexTypeMappings || (DexTypeMappings = {}));
|
|
112
111
|
export var DexForkMappings;
|
|
@@ -367,8 +366,8 @@ export function encodeNextGenDexSettleBalancer(singleton, asset, amountHint) {
|
|
|
367
366
|
uint128(amountHint >= 0xffffffffffffffffffffffffffffffn ? 0xffffffffffffffffffffffffffffffn : amountHint),
|
|
368
367
|
]);
|
|
369
368
|
}
|
|
370
|
-
export function encodeTransferIn(asset,
|
|
371
|
-
return encodePacked(["uint8", "uint8", "address", "address", "uint128"], [uint8(ComposerCommands.TRANSFERS), uint8(TransferIds.TRANSFER_FROM), asset,
|
|
369
|
+
export function encodeTransferIn(asset, receiver, amount) {
|
|
370
|
+
return encodePacked(["uint8", "uint8", "address", "address", "uint128"], [uint8(ComposerCommands.TRANSFERS), uint8(TransferIds.TRANSFER_FROM), asset, receiver, uint128(amount)]);
|
|
372
371
|
}
|
|
373
372
|
export function encodeSweep(asset, receiver, amount, sweepType) {
|
|
374
373
|
return encodePacked(["uint8", "uint8", "address", "address", "uint8", "uint128"], [uint8(ComposerCommands.TRANSFERS), uint8(TransferIds.SWEEP), asset, receiver, sweepType, uint128(amount)]);
|