@switch-win/sdk 1.0.2 → 1.0.3

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/README.md CHANGED
@@ -616,14 +616,15 @@ GET /swap/quote?network=pulsechain&from=0xA1077a294dDE1B09bB078844df40758a5D0f9a
616
616
  ]
617
617
  },
618
618
  // Transaction object — only present when `sender` is provided
619
+ // ⚠️ Always use tx.to from this response — do NOT hardcode the router address
619
620
  "tx": {
620
- "to": "0x31077B259e7fEEB7bE39bF298274BaE94Ee57B7a",
621
+ "to": "0x99999d19eC98F936934e029e63D1C0A127a15207",
621
622
  "data": "0x...", // ABI-encoded goSwitch() calldata with feeOnOutput = false
622
623
  "value": "0" // "0" for ERC-20 input; amountIn for native PLS input
623
624
  },
624
625
  // Same swap but with fee taken from the output token instead
625
626
  "txFeeOnOutput": {
626
- "to": "0x31077B259e7fEEB7bE39bF298274BaE94Ee57B7a",
627
+ "to": "0x99999d19eC98F936934e029e63D1C0A127a15207",
627
628
  "data": "0x...", // ABI-encoded goSwitch() calldata with feeOnOutput = true
628
629
  "value": "0"
629
630
  }
@@ -886,12 +887,14 @@ Covers: creating orders, approvals, `feeOnOutput` decision guide (tax tokens & o
886
887
 
887
888
  All constants are importable from [`src/constants.ts`](src/constants.ts).
888
889
 
890
+ > **⚠️ Do not hardcode the SwitchRouter address.** The router contract may be redeployed from time to time. Always use the `tx.to` (or `txFeeOnOutput.to`) address returned by the `/bestPath` API response when building your transaction. This ensures your integration automatically picks up router upgrades without code changes.
891
+
889
892
  | Name | Value |
890
893
  |---|---|
891
894
  | **Chain** | PulseChain (Chain ID `369`) |
892
- | **SwitchRouter** | `0x31077B259e7fEEB7bE39bF298274BaE94Ee57B7a` |
893
- | **SwitchLimitOrder** | `0x28754379e9E9867A64b77437930cBc5009939692` |
894
- | **SwitchPLSFlow** | `0x0fD3fD40F06159606165F21047B83136172273E3` |
895
+ | **SwitchRouter** | `0x99999d19eC98F936934e029e63D1C0A127a15207` |
896
+ | **SwitchLimitOrder** | `0x79925587bE77C25b292C0ecA6FEdD3A3f07916F9` |
897
+ | **SwitchPLSFlow** | `0x79D1Ce697509D75D79c6cA8f9232ee6ca6Df379a` |
895
898
  | **Native PLS sentinel** | `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` |
896
899
  | **WPLS** | `0xA1077a294dDE1B09bB078844df40758a5D0f9a27` |
897
900
  | **Fee denominator** | `10000` (basis points) |