@uniswap/universal-router-sdk 1.7.0 → 1.8.1

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.
@@ -11,6 +11,7 @@ export declare type FlatFeeOptions = {
11
11
  export declare type SwapOptions = Omit<RouterSwapOptions, 'inputTokenPermit'> & {
12
12
  inputTokenPermit?: Permit2Permit;
13
13
  flatFee?: FlatFeeOptions;
14
+ safeMode?: boolean;
14
15
  };
15
16
  export declare class UniswapTrade implements Command {
16
17
  trade: RouterTrade<Currency, Currency, TradeType>;
@@ -241,6 +241,10 @@ var CHAIN_CONFIGS = (_CHAIN_CONFIGS = {}, _CHAIN_CONFIGS[1] = {
241
241
  router: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',
242
242
  weth: '0x4200000000000000000000000000000000000006',
243
243
  creationBlock: 9107268
244
+ }, _CHAIN_CONFIGS[81457] = {
245
+ router: '0xe463635f6e73C1E595554C3ae216472D0fb929a9',
246
+ weth: '0x4300000000000000000000000000000000000004',
247
+ creationBlock: 401447
244
248
  }, _CHAIN_CONFIGS);
245
249
  var UNIVERSAL_ROUTER_ADDRESS = function UNIVERSAL_ROUTER_ADDRESS(chainId) {
246
250
  if (!(chainId in CHAIN_CONFIGS)) throw new Error("Universal Router not deployed on chain " + chainId);
@@ -354,6 +358,7 @@ var UniswapTrade = /*#__PURE__*/function () {
354
358
  // we need to send back the change to the user
355
359
  planner.addCommand(exports.CommandType.UNWRAP_WETH, [this.options.recipient, 0]);
356
360
  }
361
+ if (this.options.safeMode) planner.addCommand(exports.CommandType.SWEEP, [ETH_ADDRESS, this.options.recipient, 0]);
357
362
  };
358
363
  return UniswapTrade;
359
364
  }();