Source Code
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer* | 23736657 | 135 days ago | 0.14 ETH | ||||
| Transfer | 23736657 | 135 days ago | 0.14 ETH | ||||
| Transfer* | 23736580 | 135 days ago | 0.1 ETH | ||||
| Transfer | 23736580 | 135 days ago | 0.1 ETH | ||||
| Transfer* | 23103353 | 224 days ago | 12 ETH | ||||
| Transfer | 23103353 | 224 days ago | 12 ETH | ||||
| Transfer* | 23085712 | 226 days ago | 1 ETH | ||||
| Transfer | 23085712 | 226 days ago | 1 ETH | ||||
| Transfer* | 22863175 | 257 days ago | 19.5 ETH | ||||
| Transfer | 22863175 | 257 days ago | 19.5 ETH | ||||
| Transfer* | 22860705 | 258 days ago | 0.031 ETH | ||||
| Transfer | 22860705 | 258 days ago | 0.031 ETH | ||||
| Transfer* | 22560103 | 300 days ago | 2.83755847 ETH | ||||
| Transfer | 22560103 | 300 days ago | 2.83755847 ETH | ||||
| Transfer* | 22560093 | 300 days ago | 2.83755847 ETH | ||||
| Transfer | 22560093 | 300 days ago | 2.83755847 ETH | ||||
| Transfer* | 22477269 | 311 days ago | 4.34757034 ETH | ||||
| Transfer | 22477269 | 311 days ago | 4.34757034 ETH | ||||
| Transfer* | 22464409 | 313 days ago | 1 ETH | ||||
| Transfer | 22464409 | 313 days ago | 1 ETH | ||||
| Transfer* | 22461265 | 314 days ago | 1.51824831 ETH | ||||
| Transfer | 22461265 | 314 days ago | 1.51824831 ETH | ||||
| Transfer* | 22455177 | 315 days ago | 1.89999999 ETH | ||||
| Transfer | 22455177 | 315 days ago | 1.89999999 ETH | ||||
| Transfer* | 22443918 | 316 days ago | 2 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
apxETHAdapter
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2024-12-09
*/
// Sources flattened with hardhat v2.9.9 https://hardhat.org
// File src/interfaces/ITokenAdapter.sol
pragma solidity >=0.5.0;
/// @title ITokenAdapter
/// @author Alchemix Finance
interface ITokenAdapter {
/// @notice Gets the current version.
///
/// @return The version.
function version() external view returns (string memory);
/// @notice Gets the address of the yield token that this adapter supports.
///
/// @return The address of the yield token.
function token() external view returns (address);
/// @notice Gets the address of the underlying token that the yield token wraps.
///
/// @return The address of the underlying token.
function underlyingToken() external view returns (address);
/// @notice Gets the number of underlying tokens that a single whole yield token is redeemable
/// for.
///
/// @return The price.
function price() external view returns (uint256);
/// @notice Wraps `amount` underlying tokens into the yield token.
///
/// @param amount The amount of the underlying token to wrap.
/// @param recipient The address which will receive the yield tokens.
///
/// @return amountYieldTokens The amount of yield tokens minted to `recipient`.
function wrap(uint256 amount, address recipient)
external
returns (uint256 amountYieldTokens);
/// @notice Unwraps `amount` yield tokens into the underlying token.
///
/// @param amount The amount of yield-tokens to redeem.
/// @param recipient The recipient of the resulting underlying-tokens.
///
/// @return amountUnderlyingTokens The amount of underlying tokens unwrapped to `recipient`.
function unwrap(uint256 amount, address recipient)
external
returns (uint256 amountUnderlyingTokens);
}
// File src/base/ErrorMessages.sol
pragma solidity >=0.8.4;
/// @notice An error used to indicate that an argument passed to a function is illegal or
/// inappropriate.
///
/// @param message The error message.
error IllegalArgument(string message);
/// @notice An error used to indicate that a function has encountered an unrecoverable state.
///
/// @param message The error message.
error IllegalState(string message);
/// @notice An error used to indicate that an operation is unsupported.
///
/// @param message The error message.
error UnsupportedOperation(string message);
/// @notice An error used to indicate that a message sender tried to execute a privileged function.
///
/// @param message The error message.
error Unauthorized(string message);
// File src/base/MutexLock.sol
pragma solidity 0.8.13;
/// @title Mutex
/// @author Alchemix Finance
///
/// @notice Provides a mutual exclusion lock for implementing contracts.
abstract contract MutexLock {
enum State {
RESERVED,
UNLOCKED,
LOCKED
}
/// @notice The lock state.
State private _lockState = State.UNLOCKED;
/// @dev A modifier which acquires the mutex.
modifier lock() {
_claimLock();
_;
_freeLock();
}
/// @dev Gets if the mutex is locked.
///
/// @return if the mutex is locked.
function _isLocked() internal view returns (bool) {
return _lockState == State.LOCKED;
}
/// @dev Claims the lock. If the lock is already claimed, then this will revert.
function _claimLock() internal {
// Check that the lock has not been claimed yet.
if (_lockState != State.UNLOCKED) {
revert IllegalState("Lock already claimed");
}
// Claim the lock.
_lockState = State.LOCKED;
}
/// @dev Frees the lock.
function _freeLock() internal {
_lockState = State.UNLOCKED;
}
}
// File lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
// File lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
// File src/interfaces/IERC20Burnable.sol
pragma solidity >=0.5.0;
/// @title IERC20Burnable
/// @author Alchemix Finance
interface IERC20Burnable is IERC20 {
/// @notice Burns `amount` tokens from the balance of `msg.sender`.
///
/// @param amount The amount of tokens to burn.
///
/// @return If burning the tokens was successful.
function burnSelf(uint256 amount) external returns (bool);
/// @notice Burns `amount` tokens from `owner`'s balance.
///
/// @param owner The address to burn tokens from.
/// @param amount The amount of tokens to burn.
///
/// @return If burning the tokens was successful.
function burn(address owner, uint256 amount) external returns (bool);
}
// File src/interfaces/IERC20Mintable.sol
pragma solidity >=0.5.0;
/// @title IERC20Mintable
/// @author Alchemix Finance
interface IERC20Mintable is IERC20 {
/// @notice Mints `amount` tokens to `recipient`.
///
/// @param recipient The address which will receive the minted tokens.
/// @param amount The amount of tokens to mint.
function mint(address recipient, uint256 amount) external;
}
// File src/libraries/TokenUtils.sol
pragma solidity ^0.8.13;
/// @title TokenUtils
/// @author Alchemix Finance
library TokenUtils {
/// @notice An error used to indicate that a call to an ERC20 contract failed.
///
/// @param target The target address.
/// @param success If the call to the token was a success.
/// @param data The resulting data from the call. This is error data when the call was not a success. Otherwise,
/// this is malformed data when the call was a success.
error ERC20CallFailed(address target, bool success, bytes data);
/// @dev A safe function to get the decimals of an ERC20 token.
///
/// @dev Reverts with a {CallFailed} error if execution of the query fails or returns an unexpected value.
///
/// @param token The target token.
///
/// @return The amount of decimals of the token.
function expectDecimals(address token) internal view returns (uint8) {
(bool success, bytes memory data) = token.staticcall(
abi.encodeWithSelector(IERC20Metadata.decimals.selector)
);
if (token.code.length == 0 || !success || data.length < 32) {
revert ERC20CallFailed(token, success, data);
}
return abi.decode(data, (uint8));
}
/// @dev Gets the balance of tokens held by an account.
///
/// @dev Reverts with a {CallFailed} error if execution of the query fails or returns an unexpected value.
///
/// @param token The token to check the balance of.
/// @param account The address of the token holder.
///
/// @return The balance of the tokens held by an account.
function safeBalanceOf(address token, address account) internal view returns (uint256) {
(bool success, bytes memory data) = token.staticcall(
abi.encodeWithSelector(IERC20.balanceOf.selector, account)
);
if (token.code.length == 0 || !success || data.length < 32) {
revert ERC20CallFailed(token, success, data);
}
return abi.decode(data, (uint256));
}
/// @dev Transfers tokens to another address.
///
/// @dev Reverts with a {CallFailed} error if execution of the transfer failed or returns an unexpected value.
///
/// @param token The token to transfer.
/// @param recipient The address of the recipient.
/// @param amount The amount of tokens to transfer.
function safeTransfer(address token, address recipient, uint256 amount) internal {
(bool success, bytes memory data) = token.call(
abi.encodeWithSelector(IERC20.transfer.selector, recipient, amount)
);
if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
revert ERC20CallFailed(token, success, data);
}
}
/// @dev Approves tokens for the smart contract.
///
/// @dev Reverts with a {CallFailed} error if execution of the approval fails or returns an unexpected value.
///
/// @param token The token to approve.
/// @param spender The contract to spend the tokens.
/// @param value The amount of tokens to approve.
function safeApprove(address token, address spender, uint256 value) internal {
(bool success, bytes memory data) = token.call(
abi.encodeWithSelector(IERC20.approve.selector, spender, value)
);
if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
revert ERC20CallFailed(token, success, data);
}
}
/// @dev Transfer tokens from one address to another address.
///
/// @dev Reverts with a {CallFailed} error if execution of the transfer fails or returns an unexpected value.
///
/// @param token The token to transfer.
/// @param owner The address of the owner.
/// @param recipient The address of the recipient.
/// @param amount The amount of tokens to transfer.
function safeTransferFrom(address token, address owner, address recipient, uint256 amount) internal {
(bool success, bytes memory data) = token.call(
abi.encodeWithSelector(IERC20.transferFrom.selector, owner, recipient, amount)
);
if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
revert ERC20CallFailed(token, success, data);
}
}
/// @dev Mints tokens to an address.
///
/// @dev Reverts with a {CallFailed} error if execution of the mint fails or returns an unexpected value.
///
/// @param token The token to mint.
/// @param recipient The address of the recipient.
/// @param amount The amount of tokens to mint.
function safeMint(address token, address recipient, uint256 amount) internal {
(bool success, bytes memory data) = token.call(
abi.encodeWithSelector(IERC20Mintable.mint.selector, recipient, amount)
);
if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
revert ERC20CallFailed(token, success, data);
}
}
/// @dev Burns tokens.
///
/// Reverts with a `CallFailed` error if execution of the burn fails or returns an unexpected value.
///
/// @param token The token to burn.
/// @param amount The amount of tokens to burn.
function safeBurn(address token, uint256 amount) internal {
(bool success, bytes memory data) = token.call(
abi.encodeWithSelector(IERC20Burnable.burnSelf.selector, amount)
);
if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
revert ERC20CallFailed(token, success, data);
}
}
/// @dev Burns tokens from its total supply.
///
/// @dev Reverts with a {CallFailed} error if execution of the burn fails or returns an unexpected value.
///
/// @param token The token to burn.
/// @param owner The owner of the tokens.
/// @param amount The amount of tokens to burn.
function safeBurnFrom(address token, address owner, uint256 amount) internal {
(bool success, bytes memory data) = token.call(
abi.encodeWithSelector(IERC20Burnable.burn.selector, owner, amount)
);
if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {
revert ERC20CallFailed(token, success, data);
}
}
}
// File src/interfaces/external/IWETH9.sol
pragma solidity >=0.5.0;
/// @title IWETH9
interface IWETH9 is IERC20, IERC20Metadata {
/// @notice Deposits `msg.value` ethereum into the contract and mints `msg.value` tokens.
function deposit() external payable;
/// @notice Burns `amount` tokens to retrieve `amount` ethereum from the contract.
///
/// @dev This version of WETH utilizes the `transfer` function which hard codes the amount of gas
/// that is allowed to be utilized to be exactly 2300 when receiving ethereum.
///
/// @param amount The amount of tokens to burn.
function withdraw(uint256 amount) external;
}
// File lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol
// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC4626.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in
* https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
*
* _Available since v4.7._
*/
interface IERC4626 is IERC20, IERC20Metadata {
event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);
event Withdraw(
address indexed sender,
address indexed receiver,
address indexed owner,
uint256 assets,
uint256 shares
);
/**
* @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
*
* - MUST be an ERC-20 token contract.
* - MUST NOT revert.
*/
function asset() external view returns (address assetTokenAddress);
/**
* @dev Returns the total amount of the underlying asset that is “managed” by Vault.
*
* - SHOULD include any compounding that occurs from yield.
* - MUST be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT revert.
*/
function totalAssets() external view returns (uint256 totalManagedAssets);
/**
* @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
* scenario where all the conditions are met.
*
* - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT show any variations depending on the caller.
* - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
* - MUST NOT revert.
*
* NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
* “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
* from.
*/
function convertToShares(uint256 assets) external view returns (uint256 shares);
/**
* @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
* scenario where all the conditions are met.
*
* - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT show any variations depending on the caller.
* - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
* - MUST NOT revert.
*
* NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
* “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
* from.
*/
function convertToAssets(uint256 shares) external view returns (uint256 assets);
/**
* @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
* through a deposit call.
*
* - MUST return a limited value if receiver is subject to some deposit limit.
* - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
* - MUST NOT revert.
*/
function maxDeposit(address receiver) external view returns (uint256 maxAssets);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
* current on-chain conditions.
*
* - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
* call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
* in the same transaction.
* - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
* deposit would be accepted, regardless if the user has enough tokens approved, etc.
* - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by depositing.
*/
function previewDeposit(uint256 assets) external view returns (uint256 shares);
/**
* @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
*
* - MUST emit the Deposit event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* deposit execution, and are accounted for during deposit.
* - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
* approving enough underlying tokens to the Vault contract, etc).
*
* NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
*/
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
/**
* @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
* - MUST return a limited value if receiver is subject to some mint limit.
* - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
* - MUST NOT revert.
*/
function maxMint(address receiver) external view returns (uint256 maxShares);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
* current on-chain conditions.
*
* - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
* in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
* same transaction.
* - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
* would be accepted, regardless if the user has enough tokens approved, etc.
* - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by minting.
*/
function previewMint(uint256 shares) external view returns (uint256 assets);
/**
* @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
*
* - MUST emit the Deposit event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
* execution, and are accounted for during mint.
* - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
* approving enough underlying tokens to the Vault contract, etc).
*
* NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
*/
function mint(uint256 shares, address receiver) external returns (uint256 assets);
/**
* @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
* Vault, through a withdraw call.
*
* - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
* - MUST NOT revert.
*/
function maxWithdraw(address owner) external view returns (uint256 maxAssets);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
* given current on-chain conditions.
*
* - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
* call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
* called
* in the same transaction.
* - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
* the withdrawal would be accepted, regardless if the user has enough shares, etc.
* - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by depositing.
*/
function previewWithdraw(uint256 assets) external view returns (uint256 shares);
/**
* @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.
*
* - MUST emit the Withdraw event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* withdraw execution, and are accounted for during withdraw.
* - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
* not having enough shares, etc).
*
* Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
* Those methods should be performed separately.
*/
function withdraw(
uint256 assets,
address receiver,
address owner
) external returns (uint256 shares);
/**
* @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
* through a redeem call.
*
* - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
* - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
* - MUST NOT revert.
*/
function maxRedeem(address owner) external view returns (uint256 maxShares);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
* given current on-chain conditions.
*
* - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
* in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
* same transaction.
* - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
* redemption would be accepted, regardless if the user has enough shares, etc.
* - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by redeeming.
*/
function previewRedeem(uint256 shares) external view returns (uint256 assets);
/**
* @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.
*
* - MUST emit the Withdraw event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* redeem execution, and are accounted for during redeem.
* - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
* not having enough shares, etc).
*
* NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
* Those methods should be performed separately.
*/
function redeem(
uint256 shares,
address receiver,
address owner
) external returns (uint256 assets);
}
// File src/interfaces/external/curve/IStableSwapNGPool.sol
pragma solidity >= 0.8.0;
interface IStableSwapNGPool {
function exchange(
int128 i,
int128 j,
uint256 dx,
uint256 minimumDy,
address recipient
) external payable returns (uint256);
}
// File src/interfaces/external/pirex/IPirexContract.sol
pragma solidity 0.8.13;
interface IPirexContract {
function deposit(address receiver, bool isCompound) external payable returns (uint256, uint256);
}
// File src/adapters/dinero/apxETHAdapter.sol
pragma solidity ^0.8.13;
contract apxETHAdapter is ITokenAdapter {
uint256 private constant MAXIMUM_SLIPPAGE = 10000;
string public constant override version = "1.0.0";
address public immutable alchemist;
address public immutable override token; // apxETH token address
address public immutable pxEthToken; // pxETH token address
address public immutable override underlyingToken; // WETH address
IStableSwapNGPool public immutable stableSwapNGPool;
address public immutable apxETHDepositContract;
constructor(
address _alchemist,
address _token,
address _underlyingToken,
address _stableSwapNGPool,
address _pxEthToken,
address _apxETHDepositContract
) {
alchemist = _alchemist;
token = _token;
underlyingToken = _underlyingToken;
stableSwapNGPool = IStableSwapNGPool(_stableSwapNGPool);
pxEthToken = _pxEthToken;
apxETHDepositContract = _apxETHDepositContract;
}
modifier onlyAlchemist() {
if (msg.sender != alchemist) {
revert Unauthorized("Not alchemist");
}
_;
}
receive() external payable {}
function price() external view override returns (uint256) {
return IERC4626(token).convertToAssets(1e18);
}
function wrap(uint256 amount, address recipient) external onlyAlchemist returns (uint256) {
// Transfer the underlying token from the sender to the adapter
TokenUtils.safeTransferFrom(underlyingToken, msg.sender, address(this), amount);
// Unwrap WETH to ETH because IPirexContract requires ETH
IWETH9(underlyingToken).withdraw(amount);
// Deposit ETH into the apxETH deposit contract
IPirexContract(apxETHDepositContract).deposit{ value: amount }(address(this), true);
// Record the yield tokens because IPirexContract only returns amount of pxETH minted but not apxETH shares
uint256 yieldTokens = TokenUtils.safeBalanceOf(token, address(this));
// Transfer the yield tokens to the recipient
TokenUtils.safeTransfer(token, recipient, yieldTokens);
return yieldTokens;
}
function unwrap(uint256 amount, address recipient) external onlyAlchemist returns (uint256 receivedWeth) {
// Transfer the shares from the Alchemist to the Adapter
TokenUtils.safeTransferFrom(token, msg.sender, address(this), amount);
// Approve the token to be transferred to the redeem function
TokenUtils.safeApprove(token, address(token), amount);
// Redeem the shares to get pxETH
uint256 redeem = IERC4626(token).redeem(amount, address(this), address(this));
// Record the amount of pxETH received
uint256 redeemedPxEth = IERC20(pxEthToken).balanceOf(address(this));
// Approve the pxETH to be transferred to the stableSwapNGPool
TokenUtils.safeApprove(pxEthToken, address(stableSwapNGPool), redeemedPxEth);
// definition of the swap to be executed
stableSwapNGPool.exchange(1, 0, redeemedPxEth, 0, address(this));
// Record the amount of WETH received
receivedWeth = IERC20(underlyingToken).balanceOf(address(this));
// Transfer the WETH to the recipient
TokenUtils.safeTransfer(underlyingToken, recipient, receivedWeth);
return receivedWeth;
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_alchemist","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_underlyingToken","type":"address"},{"internalType":"address","name":"_stableSwapNGPool","type":"address"},{"internalType":"address","name":"_pxEthToken","type":"address"},{"internalType":"address","name":"_apxETHDepositContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"ERC20CallFailed","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"alchemist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"apxETHDepositContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pxEthToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stableSwapNGPool","outputs":[{"internalType":"contract IStableSwapNGPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"unwrap","outputs":[{"internalType":"uint256","name":"receivedWeth","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"wrap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
6101406040523480156200001257600080fd5b5060405162000fb538038062000fb5833981016040819052620000359162000082565b6001600160a01b0395861660805293851660a05291841660e052831661010052821660c052166101205262000103565b80516001600160a01b03811681146200007d57600080fd5b919050565b60008060008060008060c087890312156200009c57600080fd5b620000a78762000065565b9550620000b76020880162000065565b9450620000c76040880162000065565b9350620000d76060880162000065565b9250620000e76080880162000065565b9150620000f760a0880162000065565b90509295509295509295565b60805160a05160c05160e0516101005161012051610de5620001d06000396000818161024101526103c701526000818161020d015281816106d4015261072a01526000818160e60152818161030c01528181610349015281816107b5015261082f0152600081816101700152818161064101526106b30152600081816102750152818161044801528181610474015281816105110152818161053d0152818161055e015281816105a9015261087d0152600081816101c4015281816102a401526104ae0152610de56000f3fe6080604052600436106100955760003560e01c80638de925f6116100595780638de925f6146101b2578063a035b1fe146101e6578063b2beede0146101fb578063e83f26cd1461022f578063fc0c546a1461026357600080fd5b806313bac820146100a15780632495a599146100d457806354fd4d501461012057806357ec9dad1461015e5780637647691d1461019257600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc366004610c5d565b610297565b6040519081526020015b60405180910390f35b3480156100e057600080fd5b506101087f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cb565b34801561012c57600080fd5b50610151604051806040016040528060058152602001640312e302e360dc1b81525081565b6040516100cb9190610cf5565b34801561016a57600080fd5b506101087f000000000000000000000000000000000000000000000000000000000000000081565b34801561019e57600080fd5b506100c16101ad366004610c5d565b6104a1565b3480156101be57600080fd5b506101087f000000000000000000000000000000000000000000000000000000000000000081565b3480156101f257600080fd5b506100c161085d565b34801561020757600080fd5b506101087f000000000000000000000000000000000000000000000000000000000000000081565b34801561023b57600080fd5b506101087f000000000000000000000000000000000000000000000000000000000000000081565b34801561026f57600080fd5b506101087f000000000000000000000000000000000000000000000000000000000000000081565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103075760405163973d02cb60e01b815260206004820152600d60248201526c139bdd08185b18da195b5a5cdd609a1b60448201526064015b60405180910390fd5b6103337f00000000000000000000000000000000000000000000000000000000000000003330866108f5565b604051632e1a7d4d60e01b8152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561039557600080fd5b505af11580156103a9573d6000803e3d6000fd5b5050604051632b725d0360e21b8152306004820152600160248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316925063adc9740c91508590604401604080518083038185885af115801561041a573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061043f9190610d08565b5050600061046d7f000000000000000000000000000000000000000000000000000000000000000030610a0a565b905061049a7f00000000000000000000000000000000000000000000000000000000000000008483610b0d565b9392505050565b6000336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461050c5760405163973d02cb60e01b815260206004820152600d60248201526c139bdd08185b18da195b5a5cdd609a1b60448201526064016102fe565b6105387f00000000000000000000000000000000000000000000000000000000000000003330866108f5565b6105837f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000085610c2a565b604051635d043b2960e11b815260048101849052306024820181905260448201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ba087652906064016020604051808303816000875af11580156105fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061e9190610d2c565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610688573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ac9190610d2c565b90506106f97f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000083610c2a565b60405163ddc1f59d60e01b8152600160048201526000602482018190526044820183905260648201523060848201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ddc1f59d9060a4016020604051808303816000875af115801561077b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079f9190610d2c565b506040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610804573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108289190610d2c565b92506108557f00000000000000000000000000000000000000000000000000000000000000008585610b0d565b505092915050565b6040516303d1689d60e11b8152670de0b6b3a764000060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307a2d13a90602401602060405180830381865afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f09190610d2c565b905090565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916109599190610d45565b6000604051808303816000865af19150503d8060008114610996576040519150601f19603f3d011682016040523d82523d6000602084013e61099b565b606091505b5091509150856001600160a01b03163b600014806109b7575081155b806109de57508051158015906109de5750808060200190518101906109dc9190610d61565b155b15610a025785828260405163e7e40b5b60e01b81526004016102fe93929190610d83565b505050505050565b604080516001600160a01b0383811660248084019190915283518084039091018152604490920183526020820180516001600160e01b03166370a0823160e01b17905291516000928392839291871691610a649190610d45565b600060405180830381855afa9150503d8060008114610a9f576040519150601f19603f3d011682016040523d82523d6000602084013e610aa4565b606091505b5091509150846001600160a01b03163b60001480610ac0575081155b80610acc575060208151105b15610af05784828260405163e7e40b5b60e01b81526004016102fe93929190610d83565b80806020019051810190610b049190610d2c565b95945050505050565b6040516001600160a01b03838116602483015260448201839052600091829186169063a9059cbb60e01b906064015b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610b7a9190610d45565b6000604051808303816000865af19150503d8060008114610bb7576040519150601f19603f3d011682016040523d82523d6000602084013e610bbc565b606091505b5091509150846001600160a01b03163b60001480610bd8575081155b80610bff5750805115801590610bff575080806020019051810190610bfd9190610d61565b155b15610c235784828260405163e7e40b5b60e01b81526004016102fe93929190610d83565b5050505050565b6040516001600160a01b03838116602483015260448201839052600091829186169063095ea7b360e01b90606401610b3c565b60008060408385031215610c7057600080fd5b8235915060208301356001600160a01b0381168114610c8e57600080fd5b809150509250929050565b60005b83811015610cb4578181015183820152602001610c9c565b83811115610cc3576000848401525b50505050565b60008151808452610ce1816020860160208601610c99565b601f01601f19169290920160200192915050565b60208152600061049a6020830184610cc9565b60008060408385031215610d1b57600080fd5b505080516020909101519092909150565b600060208284031215610d3e57600080fd5b5051919050565b60008251610d57818460208701610c99565b9190910192915050565b600060208284031215610d7357600080fd5b8151801515811461049a57600080fd5b6001600160a01b03841681528215156020820152606060408201819052600090610b0490830184610cc956fea26469706673582212202da6aa6d6384faa75b4bb2706d00719dea9ad3c5c2a518e1245f4985c2bbb25b64736f6c634300080d0033000000000000000000000000062bf725dc4cdf947aa79ca2aaccd4f385b13b5c0000000000000000000000009ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c8eb2cf2f792f77af0cd9e203305a585e588179d00000000000000000000000004c154b66cb340f3ae24111cc767e0184ed00cc6000000000000000000000000d664b74274dfeb538d9bac494f3a4760828b02b0
Deployed Bytecode
0x6080604052600436106100955760003560e01c80638de925f6116100595780638de925f6146101b2578063a035b1fe146101e6578063b2beede0146101fb578063e83f26cd1461022f578063fc0c546a1461026357600080fd5b806313bac820146100a15780632495a599146100d457806354fd4d501461012057806357ec9dad1461015e5780637647691d1461019257600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc366004610c5d565b610297565b6040519081526020015b60405180910390f35b3480156100e057600080fd5b506101087f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6040516001600160a01b0390911681526020016100cb565b34801561012c57600080fd5b50610151604051806040016040528060058152602001640312e302e360dc1b81525081565b6040516100cb9190610cf5565b34801561016a57600080fd5b506101087f00000000000000000000000004c154b66cb340f3ae24111cc767e0184ed00cc681565b34801561019e57600080fd5b506100c16101ad366004610c5d565b6104a1565b3480156101be57600080fd5b506101087f000000000000000000000000062bf725dc4cdf947aa79ca2aaccd4f385b13b5c81565b3480156101f257600080fd5b506100c161085d565b34801561020757600080fd5b506101087f000000000000000000000000c8eb2cf2f792f77af0cd9e203305a585e588179d81565b34801561023b57600080fd5b506101087f000000000000000000000000d664b74274dfeb538d9bac494f3a4760828b02b081565b34801561026f57600080fd5b506101087f0000000000000000000000009ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e681565b6000336001600160a01b037f000000000000000000000000062bf725dc4cdf947aa79ca2aaccd4f385b13b5c16146103075760405163973d02cb60e01b815260206004820152600d60248201526c139bdd08185b18da195b5a5cdd609a1b60448201526064015b60405180910390fd5b6103337f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc23330866108f5565b604051632e1a7d4d60e01b8152600481018490527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561039557600080fd5b505af11580156103a9573d6000803e3d6000fd5b5050604051632b725d0360e21b8152306004820152600160248201527f000000000000000000000000d664b74274dfeb538d9bac494f3a4760828b02b06001600160a01b0316925063adc9740c91508590604401604080518083038185885af115801561041a573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061043f9190610d08565b5050600061046d7f0000000000000000000000009ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e630610a0a565b905061049a7f0000000000000000000000009ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e68483610b0d565b9392505050565b6000336001600160a01b037f000000000000000000000000062bf725dc4cdf947aa79ca2aaccd4f385b13b5c161461050c5760405163973d02cb60e01b815260206004820152600d60248201526c139bdd08185b18da195b5a5cdd609a1b60448201526064016102fe565b6105387f0000000000000000000000009ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e63330866108f5565b6105837f0000000000000000000000009ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e67f0000000000000000000000009ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e685610c2a565b604051635d043b2960e11b815260048101849052306024820181905260448201526000907f0000000000000000000000009ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e66001600160a01b03169063ba087652906064016020604051808303816000875af11580156105fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061e9190610d2c565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f00000000000000000000000004c154b66cb340f3ae24111cc767e0184ed00cc616906370a0823190602401602060405180830381865afa158015610688573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ac9190610d2c565b90506106f97f00000000000000000000000004c154b66cb340f3ae24111cc767e0184ed00cc67f000000000000000000000000c8eb2cf2f792f77af0cd9e203305a585e588179d83610c2a565b60405163ddc1f59d60e01b8152600160048201526000602482018190526044820183905260648201523060848201527f000000000000000000000000c8eb2cf2f792f77af0cd9e203305a585e588179d6001600160a01b03169063ddc1f59d9060a4016020604051808303816000875af115801561077b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079f9190610d2c565b506040516370a0823160e01b81523060048201527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316906370a0823190602401602060405180830381865afa158015610804573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108289190610d2c565b92506108557f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28585610b0d565b505092915050565b6040516303d1689d60e11b8152670de0b6b3a764000060048201526000907f0000000000000000000000009ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e66001600160a01b0316906307a2d13a90602401602060405180830381865afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f09190610d2c565b905090565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916109599190610d45565b6000604051808303816000865af19150503d8060008114610996576040519150601f19603f3d011682016040523d82523d6000602084013e61099b565b606091505b5091509150856001600160a01b03163b600014806109b7575081155b806109de57508051158015906109de5750808060200190518101906109dc9190610d61565b155b15610a025785828260405163e7e40b5b60e01b81526004016102fe93929190610d83565b505050505050565b604080516001600160a01b0383811660248084019190915283518084039091018152604490920183526020820180516001600160e01b03166370a0823160e01b17905291516000928392839291871691610a649190610d45565b600060405180830381855afa9150503d8060008114610a9f576040519150601f19603f3d011682016040523d82523d6000602084013e610aa4565b606091505b5091509150846001600160a01b03163b60001480610ac0575081155b80610acc575060208151105b15610af05784828260405163e7e40b5b60e01b81526004016102fe93929190610d83565b80806020019051810190610b049190610d2c565b95945050505050565b6040516001600160a01b03838116602483015260448201839052600091829186169063a9059cbb60e01b906064015b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610b7a9190610d45565b6000604051808303816000865af19150503d8060008114610bb7576040519150601f19603f3d011682016040523d82523d6000602084013e610bbc565b606091505b5091509150846001600160a01b03163b60001480610bd8575081155b80610bff5750805115801590610bff575080806020019051810190610bfd9190610d61565b155b15610c235784828260405163e7e40b5b60e01b81526004016102fe93929190610d83565b5050505050565b6040516001600160a01b03838116602483015260448201839052600091829186169063095ea7b360e01b90606401610b3c565b60008060408385031215610c7057600080fd5b8235915060208301356001600160a01b0381168114610c8e57600080fd5b809150509250929050565b60005b83811015610cb4578181015183820152602001610c9c565b83811115610cc3576000848401525b50505050565b60008151808452610ce1816020860160208601610c99565b601f01601f19169290920160200192915050565b60208152600061049a6020830184610cc9565b60008060408385031215610d1b57600080fd5b505080516020909101519092909150565b600060208284031215610d3e57600080fd5b5051919050565b60008251610d57818460208701610c99565b9190910192915050565b600060208284031215610d7357600080fd5b8151801515811461049a57600080fd5b6001600160a01b03841681528215156020820152606060408201819052600090610b0490830184610cc956fea26469706673582212202da6aa6d6384faa75b4bb2706d00719dea9ad3c5c2a518e1245f4985c2bbb25b64736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000062bf725dc4cdf947aa79ca2aaccd4f385b13b5c0000000000000000000000009ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c8eb2cf2f792f77af0cd9e203305a585e588179d00000000000000000000000004c154b66cb340f3ae24111cc767e0184ed00cc6000000000000000000000000d664b74274dfeb538d9bac494f3a4760828b02b0
-----Decoded View---------------
Arg [0] : _alchemist (address): 0x062Bf725dC4cDF947aa79Ca2aaCCD4F385b13b5c
Arg [1] : _token (address): 0x9Ba021B0a9b958B5E75cE9f6dff97C7eE52cb3E6
Arg [2] : _underlyingToken (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [3] : _stableSwapNGPool (address): 0xC8Eb2Cf2f792F77AF0Cd9e203305a585E588179D
Arg [4] : _pxEthToken (address): 0x04C154b66CB340F3Ae24111CC767e0184Ed00Cc6
Arg [5] : _apxETHDepositContract (address): 0xD664b74274DfEB538d9baC494F3a4760828B02b0
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000062bf725dc4cdf947aa79ca2aaccd4f385b13b5c
Arg [1] : 0000000000000000000000009ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6
Arg [2] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [3] : 000000000000000000000000c8eb2cf2f792f77af0cd9e203305a585e588179d
Arg [4] : 00000000000000000000000004c154b66cb340f3ae24111cc767e0184ed00cc6
Arg [5] : 000000000000000000000000d664b74274dfeb538d9bac494f3a4760828b02b0
Deployed Bytecode Sourcemap
29169:3098:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30349:806;;;;;;;;;;-1:-1:-1;30349:806:0;;;;;:::i;:::-;;:::i;:::-;;;519:25:1;;;507:2;492:18;30349:806:0;;;;;;;;29488:49;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;719:32:1;;;701:51;;689:2;674:18;29488:49:0;555:203:1;29266:49:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;29266:49:0;;;;;;;;;;;;:::i;29426:35::-;;;;;;;;;;;;;;;31160:1104;;;;;;;;;;-1:-1:-1;31160:1104:0;;;;;:::i;:::-;;:::i;29321:34::-;;;;;;;;;;;;;;;30232:112;;;;;;;;;;;;;:::i;29557:51::-;;;;;;;;;;;;;;;29612:46;;;;;;;;;;;;;;;29359:39;;;;;;;;;;;;;;;30349:806;30430:7;30110:10;-1:-1:-1;;;;;30124:9:0;30110:23;;30106:77;;30148:29;;-1:-1:-1;;;30148:29:0;;1949:2:1;30148:29:0;;;1931:21:1;1988:2;1968:18;;;1961:30;-1:-1:-1;;;2007:18:1;;;2000:43;2060:18;;30148:29:0;;;;;;;;30106:77;30511:79:::1;30539:15;30556:10;30576:4;30583:6;30511:27;:79::i;:::-;30656:40;::::0;-1:-1:-1;;;30656:40:0;;::::1;::::0;::::1;519:25:1::0;;;30663:15:0::1;-1:-1:-1::0;;;;;30656:32:0::1;::::0;::::1;::::0;492:18:1;;30656:40:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;30752:83:0::1;::::0;-1:-1:-1;;;30752:83:0;;30823:4:::1;30752:83;::::0;::::1;2257:51:1::0;30830:4:0::1;2324:18:1::0;;;2317:50;30767:21:0::1;-1:-1:-1::0;;;;;30752:45:0::1;::::0;-1:-1:-1;30752:45:0::1;::::0;-1:-1:-1;30806:6:0;;2230:18:1;;30752:83:0::1;::::0;::::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;30951:19;30973:46;30998:5;31013:4;30973:24;:46::i;:::-;30951:68;;31073:54;31097:5;31104:9;31115:11;31073:23;:54::i;:::-;31139:11:::0;30349:806;-1:-1:-1;;;30349:806:0:o;31160:1104::-;31243:20;30110:10;-1:-1:-1;;;;;30124:9:0;30110:23;;30106:77;;30148:29;;-1:-1:-1;;;30148:29:0;;1949:2:1;30148:29:0;;;1931:21:1;1988:2;1968:18;;;1961:30;-1:-1:-1;;;2007:18:1;;;2000:43;2060:18;;30148:29:0;1747:337:1;30106:77:0;31330:69:::1;31358:5;31365:10;31385:4;31392:6;31330:27;:69::i;:::-;31469:53;31492:5;31507;31515:6;31469:22;:53::i;:::-;31581:60;::::0;-1:-1:-1;;;31581:60:0;;::::1;::::0;::::1;2830:25:1::0;;;31620:4:0::1;2909:18:1::0;;;2902:43;;;2961:18;;;2954:43;31564:14:0::1;::::0;31590:5:::1;-1:-1:-1::0;;;;;31581:22:0::1;::::0;::::1;::::0;2803:18:1;;31581:60:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;31712:43;::::0;-1:-1:-1;;;31712:43:0;;31749:4:::1;31712:43;::::0;::::1;701:51:1::0;31564:77:0;;-1:-1:-1;31688:21:0::1;::::0;-1:-1:-1;;;;;31719:10:0::1;31712:28;::::0;::::1;::::0;674:18:1;;31712:43:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;31688:67;;31826:76;31849:10;31869:16;31888:13;31826:22;:76::i;:::-;31951:64;::::0;-1:-1:-1;;;31951:64:0;;31977:1:::1;31951:64;::::0;::::1;3478:41:1::0;31980:1:0::1;3535:18:1::0;;;3528:50;;;3594:18;;;3587:34;;;3637:18;;;3630:34;32009:4:0::1;3680:19:1::0;;;3673:61;31951:16:0::1;-1:-1:-1::0;;;;;31951:25:0::1;::::0;::::1;::::0;3450:19:1;;31951:64:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;32076:48:0::1;::::0;-1:-1:-1;;;32076:48:0;;32118:4:::1;32076:48;::::0;::::1;701:51:1::0;32083:15:0::1;-1:-1:-1::0;;;;;32076:33:0::1;::::0;::::1;::::0;674:18:1;;32076:48:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;32061:63;;32170:65;32194:15;32211:9;32222:12;32170:23;:65::i;:::-;32240:19;;31160:1104:::0;;;;:::o;30232:112::-;30302:37;;-1:-1:-1;;;30302:37:0;;30334:4;30302:37;;;519:25:1;30281:7:0;;30311:5;-1:-1:-1;;;;;30302:31:0;;;;492:18:1;;30302:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;30295:44;;30232:112;:::o;12862:443::-;13034:78;;;-1:-1:-1;;;;;4211:15:1;;;13034:78:0;;;4193:34:1;4263:15;;;4243:18;;;4236:43;4295:18;;;;4288:34;;;13034:78:0;;;;;;;;;;4128:18:1;;;;13034:78:0;;;;;;;-1:-1:-1;;;;;13034:78:0;-1:-1:-1;;;13034:78:0;;;13009:114;;-1:-1:-1;;;;13009:10:0;;;;:114;;13034:78;13009:114;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12973:150;;;;13140:5;-1:-1:-1;;;;;13140:17:0;;13161:1;13140:22;:34;;;;13167:7;13166:8;13140:34;:85;;;-1:-1:-1;13179:11:0;;:16;;;;:45;;;13211:4;13200:24;;;;;;;;;;;;:::i;:::-;13199:25;13179:45;13136:162;;;13265:5;13272:7;13281:4;13249:37;;-1:-1:-1;;;13249:37:0;;;;;;;;;;:::i;13136:162::-;12962:343;;12862:443;;;;:::o;10473:432::-;10638:58;;;-1:-1:-1;;;;;719:32:1;;;10638:58:0;;;;701:51:1;;;;10638:58:0;;;;;;;;;;674:18:1;;;;10638:58:0;;;;;;;-1:-1:-1;;;;;10638:58:0;-1:-1:-1;;;10638:58:0;;;10607:100;;10551:7;;;;;;10607:16;;;;:100;;10638:58;10607:100;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10571:136;;;;10724:5;-1:-1:-1;;;;;10724:17:0;;10745:1;10724:22;:34;;;;10751:7;10750:8;10724:34;:54;;;;10776:2;10762:4;:11;:16;10724:54;10720:131;;;10818:5;10825:7;10834:4;10802:37;;-1:-1:-1;;;10802:37:0;;;;;;;;;;:::i;10720:131::-;10881:4;10870:27;;;;;;;;;;;;:::i;:::-;10863:34;10473:432;-1:-1:-1;;;;;10473:432:0:o;11263:413::-;11416:67;;-1:-1:-1;;;;;5487:32:1;;;11416:67:0;;;5469:51:1;5536:18;;;5529:34;;;11356:12:0;;;;11391:10;;;-1:-1:-1;;;11439:24:0;5442:18:1;;11416:67:0;;;;-1:-1:-1;;11416:67:0;;;;;;;;;;;;;;-1:-1:-1;;;;;11416:67:0;-1:-1:-1;;;;;;11416:67:0;;;;;;;;;;11391:103;;;;11416:67;11391:103;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11355:139;;;;11511:5;-1:-1:-1;;;;;11511:17:0;;11532:1;11511:22;:34;;;;11538:7;11537:8;11511:34;:85;;;-1:-1:-1;11550:11:0;;:16;;;;:45;;;11582:4;11571:24;;;;;;;;;;;;:::i;:::-;11570:25;11550:45;11507:162;;;11636:5;11643:7;11652:4;11620:37;;-1:-1:-1;;;11620:37:0;;;;;;;;;;:::i;11507:162::-;11344:332;;11263:413;;;:::o;12032:405::-;12181:63;;-1:-1:-1;;;;;5487:32:1;;;12181:63:0;;;5469:51:1;5536:18;;;5529:34;;;12121:12:0;;;;12156:10;;;-1:-1:-1;;;12204:23:0;5442:18:1;;12181:63:0;5295:274:1;14:354;82:6;90;143:2;131:9;122:7;118:23;114:32;111:52;;;159:1;156;149:12;111:52;182:23;;;-1:-1:-1;255:2:1;240:18;;227:32;-1:-1:-1;;;;;288:31:1;;278:42;;268:70;;334:1;331;324:12;268:70;357:5;347:15;;;14:354;;;;;:::o;763:258::-;835:1;845:113;859:6;856:1;853:13;845:113;;;935:11;;;929:18;916:11;;;909:39;881:2;874:10;845:113;;;976:6;973:1;970:13;967:48;;;1011:1;1002:6;997:3;993:16;986:27;967:48;;763:258;;;:::o;1026:::-;1068:3;1106:5;1100:12;1133:6;1128:3;1121:19;1149:63;1205:6;1198:4;1193:3;1189:14;1182:4;1175:5;1171:16;1149:63;:::i;:::-;1266:2;1245:15;-1:-1:-1;;1241:29:1;1232:39;;;;1273:4;1228:50;;1026:258;-1:-1:-1;;1026:258:1:o;1289:220::-;1438:2;1427:9;1420:21;1401:4;1458:45;1499:2;1488:9;1484:18;1476:6;1458:45;:::i;2378:245::-;2457:6;2465;2518:2;2506:9;2497:7;2493:23;2489:32;2486:52;;;2534:1;2531;2524:12;2486:52;-1:-1:-1;;2557:16:1;;2613:2;2598:18;;;2592:25;2557:16;;2592:25;;-1:-1:-1;2378:245:1:o;3008:184::-;3078:6;3131:2;3119:9;3110:7;3106:23;3102:32;3099:52;;;3147:1;3144;3137:12;3099:52;-1:-1:-1;3170:16:1;;3008:184;-1:-1:-1;3008:184:1:o;4333:274::-;4462:3;4500:6;4494:13;4516:53;4562:6;4557:3;4550:4;4542:6;4538:17;4516:53;:::i;:::-;4585:16;;;;;4333:274;-1:-1:-1;;4333:274:1:o;4612:277::-;4679:6;4732:2;4720:9;4711:7;4707:23;4703:32;4700:52;;;4748:1;4745;4738:12;4700:52;4780:9;4774:16;4833:5;4826:13;4819:21;4812:5;4809:32;4799:60;;4855:1;4852;4845:12;4894:396;-1:-1:-1;;;;;5091:32:1;;5073:51;;5167:14;;5160:22;5155:2;5140:18;;5133:50;5219:2;5214;5199:18;;5192:30;;;-1:-1:-1;;5239:45:1;;5265:18;;5257:6;5239:45;:::i
Swarm Source
ipfs://2da6aa6d6384faa75b4bb2706d00719dea9ad3c5c2a518e1245f4985c2bbb25b
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.