@switch-win/sdk 1.2.8 → 1.2.9
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/LIMIT-ORDERS.md +7 -1
- package/package.json +1 -1
- package/src/constants.ts +6 -5
package/LIMIT-ORDERS.md
CHANGED
|
@@ -245,7 +245,13 @@ native-currency neutral:
|
|
|
245
245
|
- **Fully indexed** — the backend discovers orders via `PLSOrderCreated` events
|
|
246
246
|
- **Drain-mode capable** — maintainers can disable new native deposits without
|
|
247
247
|
blocking fills or cancellations of existing orders
|
|
248
|
-
|
|
248
|
+
|
|
249
|
+
> **Current ABI:** native-flow deployments use the seven-argument
|
|
250
|
+
> `createOrder(tokenOut, minAmountOut, deadline, feeOnOutput, unwrapOutput,
|
|
251
|
+
> partnerAddress, recipient)` signature. The `recipient` argument must be
|
|
252
|
+
> present in calldata; pass the zero address to default it to `msg.sender`.
|
|
253
|
+
> The older six-argument selector is not compatible with current deployments.
|
|
254
|
+
|
|
249
255
|
### Native-flow contract address
|
|
250
256
|
|
|
251
257
|
```ts
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -418,12 +418,13 @@ export const LIMIT_ORDER_ERROR_SELECTORS: Record<string, string> = {
|
|
|
418
418
|
/**
|
|
419
419
|
* Minimal ABI for the SwitchPLSFlow contract.
|
|
420
420
|
*
|
|
421
|
-
* Used for creating native PLS limit orders in a single transaction.
|
|
422
|
-
* The contract wraps PLS to WPLS and places the limit order on behalf
|
|
423
|
-
* of the sender.
|
|
424
|
-
|
|
421
|
+
* Used for creating native PLS limit orders in a single transaction.
|
|
422
|
+
* The contract wraps PLS to WPLS and places the limit order on behalf
|
|
423
|
+
* of the sender. `recipient` is required in calldata by current deployments;
|
|
424
|
+
* pass the zero address to default settlement to `msg.sender`.
|
|
425
|
+
*/
|
|
425
426
|
export const PLS_FLOW_ABI = [
|
|
426
|
-
"function createOrder(address tokenOut, uint256 minAmountOut, uint256 deadline, bool feeOnOutput, bool unwrapOutput, address partnerAddress) payable returns (uint256 nonce)",
|
|
427
|
+
"function createOrder(address tokenOut, uint256 minAmountOut, uint256 deadline, bool feeOnOutput, bool unwrapOutput, address partnerAddress, address recipient) payable returns (uint256 nonce)",
|
|
427
428
|
"function cancelOrder(uint256 nonce) external",
|
|
428
429
|
"function getOrder(uint256 nonce) view returns (tuple(address originalMaker, address tokenOut, uint256 amountIn, uint256 minAmountOut, uint256 deadline, uint256 createdAt, bool feeOnOutput, bool unwrapOutput, bool active, address recipient, address partnerAddress))",
|
|
429
430
|
"function globalNonceCounter() view returns (uint256)",
|