import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction, Signer, utils } from "ethers"; import type { FunctionFragment, Result } from "@ethersproject/abi"; import type { Listener, Provider } from "@ethersproject/providers"; import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; export interface L1BridgeZapInterface extends utils.Interface { functions: { "WETH_ADDRESS()": FunctionFragment; "baseTokens(uint256)": FunctionFragment; "calculateRemoveLiquidityOneToken(uint256,uint8)": FunctionFragment; "calculateTokenAmount(uint256[],bool)": FunctionFragment; "deposit(address,uint256,address,uint256)": FunctionFragment; "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": FunctionFragment; "depositETH(address,uint256,uint256)": FunctionFragment; "depositETHAndSwap(address,uint256,uint256,uint8,uint8,uint256,uint256)": FunctionFragment; "redeem(address,uint256,address,uint256)": FunctionFragment; "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": FunctionFragment; "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": FunctionFragment; "redeemv2(bytes32,uint256,address,uint256)": FunctionFragment; "zapAndDeposit(address,uint256,address,uint256[],uint256,uint256)": FunctionFragment; "zapAndDepositAndSwap(address,uint256,address,uint256[],uint256,uint256,uint8,uint8,uint256,uint256)": FunctionFragment; }; getFunction(nameOrSignatureOrTopic: "WETH_ADDRESS" | "baseTokens" | "calculateRemoveLiquidityOneToken" | "calculateTokenAmount" | "deposit" | "depositAndSwap" | "depositETH" | "depositETHAndSwap" | "redeem" | "redeemAndRemove" | "redeemAndSwap" | "redeemv2" | "zapAndDeposit" | "zapAndDepositAndSwap"): FunctionFragment; encodeFunctionData(functionFragment: "WETH_ADDRESS", values?: undefined): string; encodeFunctionData(functionFragment: "baseTokens", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "calculateRemoveLiquidityOneToken", values: [BigNumberish, BigNumberish]): string; encodeFunctionData(functionFragment: "calculateTokenAmount", values: [BigNumberish[], boolean]): string; encodeFunctionData(functionFragment: "deposit", values: [string, BigNumberish, string, BigNumberish]): string; encodeFunctionData(functionFragment: "depositAndSwap", values: [ string, BigNumberish, string, BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish ]): string; encodeFunctionData(functionFragment: "depositETH", values: [string, BigNumberish, BigNumberish]): string; encodeFunctionData(functionFragment: "depositETHAndSwap", values: [ string, BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish ]): string; encodeFunctionData(functionFragment: "redeem", values: [string, BigNumberish, string, BigNumberish]): string; encodeFunctionData(functionFragment: "redeemAndRemove", values: [ string, BigNumberish, string, BigNumberish, BigNumberish, BigNumberish, BigNumberish ]): string; encodeFunctionData(functionFragment: "redeemAndSwap", values: [ string, BigNumberish, string, BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish ]): string; encodeFunctionData(functionFragment: "redeemv2", values: [BytesLike, BigNumberish, string, BigNumberish]): string; encodeFunctionData(functionFragment: "zapAndDeposit", values: [ string, BigNumberish, string, BigNumberish[], BigNumberish, BigNumberish ]): string; encodeFunctionData(functionFragment: "zapAndDepositAndSwap", values: [ string, BigNumberish, string, BigNumberish[], BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish ]): string; decodeFunctionResult(functionFragment: "WETH_ADDRESS", data: BytesLike): Result; decodeFunctionResult(functionFragment: "baseTokens", data: BytesLike): Result; decodeFunctionResult(functionFragment: "calculateRemoveLiquidityOneToken", data: BytesLike): Result; decodeFunctionResult(functionFragment: "calculateTokenAmount", data: BytesLike): Result; decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; decodeFunctionResult(functionFragment: "depositAndSwap", data: BytesLike): Result; decodeFunctionResult(functionFragment: "depositETH", data: BytesLike): Result; decodeFunctionResult(functionFragment: "depositETHAndSwap", data: BytesLike): Result; decodeFunctionResult(functionFragment: "redeem", data: BytesLike): Result; decodeFunctionResult(functionFragment: "redeemAndRemove", data: BytesLike): Result; decodeFunctionResult(functionFragment: "redeemAndSwap", data: BytesLike): Result; decodeFunctionResult(functionFragment: "redeemv2", data: BytesLike): Result; decodeFunctionResult(functionFragment: "zapAndDeposit", data: BytesLike): Result; decodeFunctionResult(functionFragment: "zapAndDepositAndSwap", data: BytesLike): Result; events: {}; } export interface L1BridgeZap extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; interface: L1BridgeZapInterface; queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; listeners(eventFilter?: TypedEventFilter): Array>; listeners(eventName?: string): Array; removeAllListeners(eventFilter: TypedEventFilter): this; removeAllListeners(eventName?: string): this; off: OnEvent; on: OnEvent; once: OnEvent; removeListener: OnEvent; functions: { WETH_ADDRESS(overrides?: CallOverrides): Promise<[string]>; baseTokens(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>; /** * Calculate the amount of underlying token available to withdraw when withdrawing via only single token * @param tokenAmount the amount of LP token to burn * @param tokenIndex index of which token will be withdrawn */ calculateRemoveLiquidityOneToken(tokenAmount: BigNumberish, tokenIndex: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber] & { availableTokenAmount: BigNumber; }>; /** * This shouldn't be used outside frontends for user estimates. * A simple method to calculate prices from deposits or withdrawals, excluding fees but including slippage. This is helpful as an input into the various "min" parameters on calls to fight front-running * @param amounts an array of token amounts to deposit or withdrawal, corresponding to pooledTokens. The amount should be in each pooled token's native precision. * @param deposit whether this is a deposit or a withdrawal */ calculateTokenAmount(amounts: BigNumberish[], deposit: boolean, overrides?: CallOverrides): Promise<[BigNumber]>; /** * Wraps SynapseBridge deposit() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge */ deposit(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge depositAndSwap() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ depositAndSwap(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge deposit() function to make it compatible w/ ETH -> WETH conversions * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to */ depositETH(to: string, chainId: BigNumberish, amount: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge depositAndSwap() function to make it compatible w/ ETH -> WETH conversions * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to bridge assets to * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ depositETHAndSwap(to: string, chainId: BigNumberish, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge redeem() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to redeem into the bridge */ redeem(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps redeemAndRemove on SynapseBridge Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token) * @param amount Amount of (typically) LP token to pass to the nodes to attempt to removeLiquidity() with to redeem for the underlying assets of the LP token * @param chainId which underlying chain to bridge assets onto * @param liqDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token* * @param liqMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap * @param liqTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for * @param to address on other chain to redeem underlying assets to * @param token ERC20 compatible token to deposit into the bridge */ redeemAndRemove(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, liqTokenIndex: BigNumberish, liqMinAmount: BigNumberish, liqDeadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps redeemAndSwap on SynapseBridge.sol Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token) * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which underlying chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to redeem underlying assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ redeemAndSwap(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge redeemv2() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to redeem into the bridge */ redeemv2(to: BytesLike, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Combines adding liquidity to the given Swap, and calls deposit() on the bridge using that LP token * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param liquidityAmounts the amounts of each token to add, in their native precision * @param minToMint the minimum LP tokens adding this amount of liquidity should mint, otherwise revert. Handy for front-running mitigation * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge */ zapAndDeposit(to: string, chainId: BigNumberish, token: string, liquidityAmounts: BigNumberish[], minToMint: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Combines adding liquidity to the given Swap, and calls depositAndSwap() on the bridge using that LP token * @param chainId which chain to bridge assets onto * @param liqDeadline latest timestamp to accept this transaction * @param liquidityAmounts the amounts of each token to add, in their native precision * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param minToMint the minimum LP tokens adding this amount of liquidity should mint, otherwise revert. Handy for front-running mitigation * @param swapDeadline latest timestamp to accept this transaction* * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ zapAndDepositAndSwap(to: string, chainId: BigNumberish, token: string, liquidityAmounts: BigNumberish[], minToMint: BigNumberish, liqDeadline: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, swapDeadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; }; WETH_ADDRESS(overrides?: CallOverrides): Promise; baseTokens(arg0: BigNumberish, overrides?: CallOverrides): Promise; /** * Calculate the amount of underlying token available to withdraw when withdrawing via only single token * @param tokenAmount the amount of LP token to burn * @param tokenIndex index of which token will be withdrawn */ calculateRemoveLiquidityOneToken(tokenAmount: BigNumberish, tokenIndex: BigNumberish, overrides?: CallOverrides): Promise; /** * This shouldn't be used outside frontends for user estimates. * A simple method to calculate prices from deposits or withdrawals, excluding fees but including slippage. This is helpful as an input into the various "min" parameters on calls to fight front-running * @param amounts an array of token amounts to deposit or withdrawal, corresponding to pooledTokens. The amount should be in each pooled token's native precision. * @param deposit whether this is a deposit or a withdrawal */ calculateTokenAmount(amounts: BigNumberish[], deposit: boolean, overrides?: CallOverrides): Promise; /** * Wraps SynapseBridge deposit() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge */ deposit(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge depositAndSwap() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ depositAndSwap(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge deposit() function to make it compatible w/ ETH -> WETH conversions * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to */ depositETH(to: string, chainId: BigNumberish, amount: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge depositAndSwap() function to make it compatible w/ ETH -> WETH conversions * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to bridge assets to * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ depositETHAndSwap(to: string, chainId: BigNumberish, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge redeem() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to redeem into the bridge */ redeem(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps redeemAndRemove on SynapseBridge Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token) * @param amount Amount of (typically) LP token to pass to the nodes to attempt to removeLiquidity() with to redeem for the underlying assets of the LP token * @param chainId which underlying chain to bridge assets onto * @param liqDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token* * @param liqMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap * @param liqTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for * @param to address on other chain to redeem underlying assets to * @param token ERC20 compatible token to deposit into the bridge */ redeemAndRemove(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, liqTokenIndex: BigNumberish, liqMinAmount: BigNumberish, liqDeadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps redeemAndSwap on SynapseBridge.sol Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token) * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which underlying chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to redeem underlying assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ redeemAndSwap(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge redeemv2() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to redeem into the bridge */ redeemv2(to: BytesLike, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Combines adding liquidity to the given Swap, and calls deposit() on the bridge using that LP token * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param liquidityAmounts the amounts of each token to add, in their native precision * @param minToMint the minimum LP tokens adding this amount of liquidity should mint, otherwise revert. Handy for front-running mitigation * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge */ zapAndDeposit(to: string, chainId: BigNumberish, token: string, liquidityAmounts: BigNumberish[], minToMint: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Combines adding liquidity to the given Swap, and calls depositAndSwap() on the bridge using that LP token * @param chainId which chain to bridge assets onto * @param liqDeadline latest timestamp to accept this transaction * @param liquidityAmounts the amounts of each token to add, in their native precision * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param minToMint the minimum LP tokens adding this amount of liquidity should mint, otherwise revert. Handy for front-running mitigation * @param swapDeadline latest timestamp to accept this transaction* * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ zapAndDepositAndSwap(to: string, chainId: BigNumberish, token: string, liquidityAmounts: BigNumberish[], minToMint: BigNumberish, liqDeadline: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, swapDeadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; callStatic: { WETH_ADDRESS(overrides?: CallOverrides): Promise; baseTokens(arg0: BigNumberish, overrides?: CallOverrides): Promise; /** * Calculate the amount of underlying token available to withdraw when withdrawing via only single token * @param tokenAmount the amount of LP token to burn * @param tokenIndex index of which token will be withdrawn */ calculateRemoveLiquidityOneToken(tokenAmount: BigNumberish, tokenIndex: BigNumberish, overrides?: CallOverrides): Promise; /** * This shouldn't be used outside frontends for user estimates. * A simple method to calculate prices from deposits or withdrawals, excluding fees but including slippage. This is helpful as an input into the various "min" parameters on calls to fight front-running * @param amounts an array of token amounts to deposit or withdrawal, corresponding to pooledTokens. The amount should be in each pooled token's native precision. * @param deposit whether this is a deposit or a withdrawal */ calculateTokenAmount(amounts: BigNumberish[], deposit: boolean, overrides?: CallOverrides): Promise; /** * Wraps SynapseBridge deposit() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge */ deposit(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: CallOverrides): Promise; /** * Wraps SynapseBridge depositAndSwap() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ depositAndSwap(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: CallOverrides): Promise; /** * Wraps SynapseBridge deposit() function to make it compatible w/ ETH -> WETH conversions * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to */ depositETH(to: string, chainId: BigNumberish, amount: BigNumberish, overrides?: CallOverrides): Promise; /** * Wraps SynapseBridge depositAndSwap() function to make it compatible w/ ETH -> WETH conversions * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to bridge assets to * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ depositETHAndSwap(to: string, chainId: BigNumberish, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: CallOverrides): Promise; /** * Wraps SynapseBridge redeem() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to redeem into the bridge */ redeem(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: CallOverrides): Promise; /** * Wraps redeemAndRemove on SynapseBridge Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token) * @param amount Amount of (typically) LP token to pass to the nodes to attempt to removeLiquidity() with to redeem for the underlying assets of the LP token * @param chainId which underlying chain to bridge assets onto * @param liqDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token* * @param liqMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap * @param liqTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for * @param to address on other chain to redeem underlying assets to * @param token ERC20 compatible token to deposit into the bridge */ redeemAndRemove(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, liqTokenIndex: BigNumberish, liqMinAmount: BigNumberish, liqDeadline: BigNumberish, overrides?: CallOverrides): Promise; /** * Wraps redeemAndSwap on SynapseBridge.sol Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token) * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which underlying chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to redeem underlying assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ redeemAndSwap(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: CallOverrides): Promise; /** * Wraps SynapseBridge redeemv2() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to redeem into the bridge */ redeemv2(to: BytesLike, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: CallOverrides): Promise; /** * Combines adding liquidity to the given Swap, and calls deposit() on the bridge using that LP token * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param liquidityAmounts the amounts of each token to add, in their native precision * @param minToMint the minimum LP tokens adding this amount of liquidity should mint, otherwise revert. Handy for front-running mitigation * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge */ zapAndDeposit(to: string, chainId: BigNumberish, token: string, liquidityAmounts: BigNumberish[], minToMint: BigNumberish, deadline: BigNumberish, overrides?: CallOverrides): Promise; /** * Combines adding liquidity to the given Swap, and calls depositAndSwap() on the bridge using that LP token * @param chainId which chain to bridge assets onto * @param liqDeadline latest timestamp to accept this transaction * @param liquidityAmounts the amounts of each token to add, in their native precision * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param minToMint the minimum LP tokens adding this amount of liquidity should mint, otherwise revert. Handy for front-running mitigation * @param swapDeadline latest timestamp to accept this transaction* * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ zapAndDepositAndSwap(to: string, chainId: BigNumberish, token: string, liquidityAmounts: BigNumberish[], minToMint: BigNumberish, liqDeadline: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, swapDeadline: BigNumberish, overrides?: CallOverrides): Promise; }; filters: {}; estimateGas: { WETH_ADDRESS(overrides?: CallOverrides): Promise; baseTokens(arg0: BigNumberish, overrides?: CallOverrides): Promise; /** * Calculate the amount of underlying token available to withdraw when withdrawing via only single token * @param tokenAmount the amount of LP token to burn * @param tokenIndex index of which token will be withdrawn */ calculateRemoveLiquidityOneToken(tokenAmount: BigNumberish, tokenIndex: BigNumberish, overrides?: CallOverrides): Promise; /** * This shouldn't be used outside frontends for user estimates. * A simple method to calculate prices from deposits or withdrawals, excluding fees but including slippage. This is helpful as an input into the various "min" parameters on calls to fight front-running * @param amounts an array of token amounts to deposit or withdrawal, corresponding to pooledTokens. The amount should be in each pooled token's native precision. * @param deposit whether this is a deposit or a withdrawal */ calculateTokenAmount(amounts: BigNumberish[], deposit: boolean, overrides?: CallOverrides): Promise; /** * Wraps SynapseBridge deposit() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge */ deposit(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge depositAndSwap() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ depositAndSwap(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge deposit() function to make it compatible w/ ETH -> WETH conversions * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to */ depositETH(to: string, chainId: BigNumberish, amount: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge depositAndSwap() function to make it compatible w/ ETH -> WETH conversions * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to bridge assets to * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ depositETHAndSwap(to: string, chainId: BigNumberish, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge redeem() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to redeem into the bridge */ redeem(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps redeemAndRemove on SynapseBridge Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token) * @param amount Amount of (typically) LP token to pass to the nodes to attempt to removeLiquidity() with to redeem for the underlying assets of the LP token * @param chainId which underlying chain to bridge assets onto * @param liqDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token* * @param liqMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap * @param liqTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for * @param to address on other chain to redeem underlying assets to * @param token ERC20 compatible token to deposit into the bridge */ redeemAndRemove(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, liqTokenIndex: BigNumberish, liqMinAmount: BigNumberish, liqDeadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps redeemAndSwap on SynapseBridge.sol Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token) * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which underlying chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to redeem underlying assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ redeemAndSwap(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge redeemv2() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to redeem into the bridge */ redeemv2(to: BytesLike, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Combines adding liquidity to the given Swap, and calls deposit() on the bridge using that LP token * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param liquidityAmounts the amounts of each token to add, in their native precision * @param minToMint the minimum LP tokens adding this amount of liquidity should mint, otherwise revert. Handy for front-running mitigation * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge */ zapAndDeposit(to: string, chainId: BigNumberish, token: string, liquidityAmounts: BigNumberish[], minToMint: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Combines adding liquidity to the given Swap, and calls depositAndSwap() on the bridge using that LP token * @param chainId which chain to bridge assets onto * @param liqDeadline latest timestamp to accept this transaction * @param liquidityAmounts the amounts of each token to add, in their native precision * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param minToMint the minimum LP tokens adding this amount of liquidity should mint, otherwise revert. Handy for front-running mitigation * @param swapDeadline latest timestamp to accept this transaction* * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ zapAndDepositAndSwap(to: string, chainId: BigNumberish, token: string, liquidityAmounts: BigNumberish[], minToMint: BigNumberish, liqDeadline: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, swapDeadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; }; populateTransaction: { WETH_ADDRESS(overrides?: CallOverrides): Promise; baseTokens(arg0: BigNumberish, overrides?: CallOverrides): Promise; /** * Calculate the amount of underlying token available to withdraw when withdrawing via only single token * @param tokenAmount the amount of LP token to burn * @param tokenIndex index of which token will be withdrawn */ calculateRemoveLiquidityOneToken(tokenAmount: BigNumberish, tokenIndex: BigNumberish, overrides?: CallOverrides): Promise; /** * This shouldn't be used outside frontends for user estimates. * A simple method to calculate prices from deposits or withdrawals, excluding fees but including slippage. This is helpful as an input into the various "min" parameters on calls to fight front-running * @param amounts an array of token amounts to deposit or withdrawal, corresponding to pooledTokens. The amount should be in each pooled token's native precision. * @param deposit whether this is a deposit or a withdrawal */ calculateTokenAmount(amounts: BigNumberish[], deposit: boolean, overrides?: CallOverrides): Promise; /** * Wraps SynapseBridge deposit() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge */ deposit(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge depositAndSwap() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ depositAndSwap(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge deposit() function to make it compatible w/ ETH -> WETH conversions * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to */ depositETH(to: string, chainId: BigNumberish, amount: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge depositAndSwap() function to make it compatible w/ ETH -> WETH conversions * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to bridge assets to * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ depositETHAndSwap(to: string, chainId: BigNumberish, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge redeem() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to redeem into the bridge */ redeem(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps redeemAndRemove on SynapseBridge Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token) * @param amount Amount of (typically) LP token to pass to the nodes to attempt to removeLiquidity() with to redeem for the underlying assets of the LP token * @param chainId which underlying chain to bridge assets onto * @param liqDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token* * @param liqMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap * @param liqTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for * @param to address on other chain to redeem underlying assets to * @param token ERC20 compatible token to deposit into the bridge */ redeemAndRemove(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, liqTokenIndex: BigNumberish, liqMinAmount: BigNumberish, liqDeadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps redeemAndSwap on SynapseBridge.sol Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token) * @param amount Amount in native token decimals to transfer cross-chain pre-fees * @param chainId which underlying chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param to address on other chain to redeem underlying assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ redeemAndSwap(to: string, chainId: BigNumberish, token: string, amount: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Wraps SynapseBridge redeemv2() function * @param amount Amount in native token decimals to transfer cross-chain pre-fees* * @param chainId which chain to bridge assets onto * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to redeem into the bridge */ redeemv2(to: BytesLike, chainId: BigNumberish, token: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Combines adding liquidity to the given Swap, and calls deposit() on the bridge using that LP token * @param chainId which chain to bridge assets onto * @param deadline latest timestamp to accept this transaction* * @param liquidityAmounts the amounts of each token to add, in their native precision * @param minToMint the minimum LP tokens adding this amount of liquidity should mint, otherwise revert. Handy for front-running mitigation * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge */ zapAndDeposit(to: string, chainId: BigNumberish, token: string, liquidityAmounts: BigNumberish[], minToMint: BigNumberish, deadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Combines adding liquidity to the given Swap, and calls depositAndSwap() on the bridge using that LP token * @param chainId which chain to bridge assets onto * @param liqDeadline latest timestamp to accept this transaction * @param liquidityAmounts the amounts of each token to add, in their native precision * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param minToMint the minimum LP tokens adding this amount of liquidity should mint, otherwise revert. Handy for front-running mitigation * @param swapDeadline latest timestamp to accept this transaction* * @param to address on other chain to bridge assets to * @param token ERC20 compatible token to deposit into the bridge * @param tokenIndexFrom the token the user wants to swap from * @param tokenIndexTo the token the user wants to swap to */ zapAndDepositAndSwap(to: string, chainId: BigNumberish, token: string, liquidityAmounts: BigNumberish[], minToMint: BigNumberish, liqDeadline: BigNumberish, tokenIndexFrom: BigNumberish, tokenIndexTo: BigNumberish, minDy: BigNumberish, swapDeadline: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; }; }