@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.
@@ -75,23 +75,22 @@ export declare enum ForwarderCommands {
75
75
  }
76
76
  export declare enum DexTypeMappings {
77
77
  UNISWAP_V3_ID = 0,
78
- IZI_ID = 1,
78
+ UNISWAP_V2_ID = 1,
79
79
  UNISWAP_V4_ID = 2,
80
- BALANCER_V3_ID = 4,
81
- BALANCER_V2_ID = 3,
82
- UNISWAP_V2_ID = 6,
83
- UNISWAP_V2_FOT_ID = 7,
84
- CURVE_V1_STANDARD_ID = 60,
85
- CURVE_FORK_ID = 61,
86
- UNISWAP_V2_MAX_ID = 150,
87
- CURVE_RECEIVED_ID = 150,
88
- WOO_FI_ID = 155,
89
- LB_ID = 160,
90
- GMX_ID = 170,
91
- KTX_ID = 171,
92
- MAX_GMX_ID = 173,
93
- DODO_ID = 180,
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, from: Address, amount: bigint): Hex;
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;
@@ -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["IZI_ID"] = 1] = "IZI_ID";
93
+ DexTypeMappings[DexTypeMappings["UNISWAP_V2_ID"] = 1] = "UNISWAP_V2_ID";
94
94
  DexTypeMappings[DexTypeMappings["UNISWAP_V4_ID"] = 2] = "UNISWAP_V4_ID";
95
- DexTypeMappings[DexTypeMappings["BALANCER_V3_ID"] = 4] = "BALANCER_V3_ID";
96
- DexTypeMappings[DexTypeMappings["BALANCER_V2_ID"] = 3] = "BALANCER_V2_ID";
97
- DexTypeMappings[DexTypeMappings["UNISWAP_V2_ID"] = 6] = "UNISWAP_V2_ID";
98
- DexTypeMappings[DexTypeMappings["UNISWAP_V2_FOT_ID"] = 7] = "UNISWAP_V2_FOT_ID";
99
- DexTypeMappings[DexTypeMappings["CURVE_V1_STANDARD_ID"] = 60] = "CURVE_V1_STANDARD_ID";
100
- DexTypeMappings[DexTypeMappings["CURVE_FORK_ID"] = 61] = "CURVE_FORK_ID";
101
- DexTypeMappings[DexTypeMappings["UNISWAP_V2_MAX_ID"] = 150] = "UNISWAP_V2_MAX_ID";
102
- DexTypeMappings[DexTypeMappings["CURVE_RECEIVED_ID"] = 150] = "CURVE_RECEIVED_ID";
103
- DexTypeMappings[DexTypeMappings["WOO_FI_ID"] = 155] = "WOO_FI_ID";
104
- DexTypeMappings[DexTypeMappings["LB_ID"] = 160] = "LB_ID";
105
- DexTypeMappings[DexTypeMappings["GMX_ID"] = 170] = "GMX_ID";
106
- DexTypeMappings[DexTypeMappings["KTX_ID"] = 171] = "KTX_ID";
107
- DexTypeMappings[DexTypeMappings["MAX_GMX_ID"] = 173] = "MAX_GMX_ID";
108
- DexTypeMappings[DexTypeMappings["DODO_ID"] = 180] = "DODO_ID";
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, from, amount) {
371
- return encodePacked(["uint8", "uint8", "address", "address", "uint128"], [uint8(ComposerCommands.TRANSFERS), uint8(TransferIds.TRANSFER_FROM), asset, from, uint128(amount)]);
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)]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1delta/calldatalib",
3
- "version": "0.0.10",
3
+ "version": "0.0.20",
4
4
  "description": "Generated CalldataLib TypeScript functions for 1delta smart contracts",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",