unshETHZap Contracts

unshETHZap-II.sol

Note

Split reference

This reference file was too long so it is split into multiple chunks. This is chunk number II.

This Solidity script is part of a larger DeFi protocol which offers various Ethereum token swap and minting functions. It contains methods for depositing tokens, swapping USDT for various tokens, and minting new tokens with ETH. It also includes helper functions to facilitate these operations.

_deposit_lsd

Internal function that deposits a specified amount of LSD tokens after calculating the necessary fees, mints unshETH, and sends it to the caller.

Parameters

  • lsdAddress address: The contract address of the token to be deposited.
  • amount uint256: The amount of tokens to be deposited.

Return Values

  • void: No return value.

mint_with_usdt

External function that allows users to mint unshETH by swapping USDT. It supports multiple paths for the swap operation.

Parameters

  • usdtAmount uint256: The amount of USDT to be swapped.
  • amountOutMin uint256: The minimum amount of swapped tokens the user is willing to accept.
  • pathId uint256: The identifier for the swap path to be used.

Return Values

  • void: No return value.

mint_unsheth_with_eth

External function that allows users to mint unshETH using ETH. It supports various paths for the minting operation.

Parameters

  • amountOutMin uint256: The minimum amount of tokens the user is willing to receive.
  • pathId uint256: The identifier for the minting path to be used.

Return Values

  • void: No return value.
Previous
unshETHZap-I.sol