Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
MultiDexFlashLoanArb
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
/*
* ===========================
* 1) Aave V3 Interfaces
* ===========================
*/
import "@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol";
import "@aave/core-v3/contracts/interfaces/IPool.sol";
import "@aave/core-v3/contracts/flashloan/interfaces/IFlashLoanSimpleReceiver.sol";
/*
* ===========================
* 2) OpenZeppelin
* ===========================
*/
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
* ===========================
* 3) WETH Interface for Unwrapping
* ===========================
*/
interface IWETH9 is IERC20 {
function deposit() external payable;
function withdraw(uint256 wad) external;
}
/*
* ===========================
* 4) Uniswap V2–Style Router
* ===========================
*/
interface IUniswapV2Router {
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
}
/*
* ===========================
* 5) Uniswap V3 Router
* ===========================
*/
interface IUniswapV3Router {
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
function exactInputSingle(ExactInputSingleParams calldata params)
external
payable
returns (uint256 amountOut);
}
/*
* ===========================
* 6) Curve Example Stub
* ===========================
*/
interface ICurvePool {
function exchange_underlying(
int128 i,
int128 j,
uint256 dx,
uint256 minDy
) external returns (uint256);
}
/*
* ===========================
* 7) Balancer Example Stub
* ===========================
*/
interface IBalancerVault {
function swap(/* multiple struct params */) external returns (uint256);
}
/*
* ===========================
* 8) Kyber Example Stub
* ===========================
*/
interface IKyber {
function swapTokenToToken(
address src,
uint256 srcAmount,
address dest,
uint256 minConversionRate
) external returns (uint256);
}
/**
* @dev Enum listing which DEX type we want to use for each swap step.
*/
enum DexType {
UniswapV2,
UniswapV3,
Curve,
Balancer,
Kyber
}
/**
* @dev A single swap "step":
* - dexType: which DEX logic to call
* - dexAddress: router/vault/pool for that DEX
* - tokenIn / tokenOut: which tokens to swap
* - fee: used only if Uniswap V3
* - amountIn: how many of tokenIn we swap in this step
*/
struct DexStep {
DexType dexType;
address dexAddress;
address tokenIn;
address tokenOut;
uint24 fee;
uint256 amountIn;
}
/**
* @title MultiDexFlashLoanArb
* @notice
* 1) Borrows any ERC20 from Aave V3 (flash loan),
* 2) Executes a series of DexSteps (swaps) across multiple protocols,
* 3) Repays the loan in the same tx,
* 4) Automatically swaps leftover borrowed-token => WETH => unwrap => ETH,
* sending profit to your PROFIT_WALLET.
*
* If you want to handle leftover in tokens other than the borrowed token,
* ensure your DexSteps produce leftover of the borrowed token or customize further.
*/
contract MultiDexFlashLoanArb is IFlashLoanSimpleReceiver, Ownable {
// =======================================
// Aave addresses + default Uniswap V2
// =======================================
IPoolAddressesProvider public immutable override ADDRESSES_PROVIDER;
IPool public immutable override POOL;
// On Ethereum Mainnet, you can set your favorite Uniswap V2 router (e.g. SushiSwap)
address public immutable UNI_V2_ROUTER;
// On Ethereum Mainnet, WETH address
address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
// Your designated wallet to receive leftover in ETH
address public constant PROFIT_WALLET = 0xaee504D7B215f8b9D2576A1954416699F244a8fa;
constructor(address _addressesProvider, address _uniswapV2Router) {
ADDRESSES_PROVIDER = IPoolAddressesProvider(_addressesProvider);
POOL = IPool(ADDRESSES_PROVIDER.getPool());
UNI_V2_ROUTER = _uniswapV2Router;
}
/**
* @notice Requests a flash loan from Aave V3 for ANY token.
* @param _token Which token to borrow (e.g. DAI, USDC, WETH, etc.).
* @param _amount How much to borrow.
* @param _params Encoded DexSteps for your on-chain swaps.
*/
function requestFlashLoan(
address _token,
uint256 _amount,
bytes calldata _params
) external onlyOwner {
POOL.flashLoanSimple(address(this), _token, _amount, _params, 0);
}
/**
* @notice Aave calls this after sending flash-loaned tokens.
* @dev We'll repay the borrowed `asset`, then convert leftover to WETH -> unwrap -> ETH -> PROFIT_WALLET.
*/
function executeOperation(
address asset,
uint256 amount,
uint256 premium,
address initiator,
bytes calldata params
) external override returns (bool) {
require(msg.sender == address(POOL), "Caller not Aave POOL");
require(initiator == address(this), "Initiator must be this contract");
// 1) Decode DexSteps
DexStep[] memory steps = abi.decode(params, (DexStep[]));
// 2) Perform each swap
for (uint256 i = 0; i < steps.length; i++) {
_performDexSwap(steps[i]);
}
// 3) Repay borrowed token
uint256 amountOwing = amount + premium;
require(IERC20(asset).balanceOf(address(this)) >= amountOwing, "Not enough to repay loan");
IERC20(asset).approve(address(POOL), amountOwing);
// 4) Determine leftover of the borrowed token
uint256 leftoverBorrowed = IERC20(asset).balanceOf(address(this)) - amountOwing;
// 5) Convert leftover to ETH & send to PROFIT_WALLET
if (leftoverBorrowed > 0) {
// 5a) If the borrowed token is not WETH, do a single-hop swap => WETH
if (asset != WETH) {
_approveIfNeeded(asset, UNI_V2_ROUTER, leftoverBorrowed);
address[] memory path;
path[0] = asset;
path[1] = WETH;
IUniswapV2Router(UNI_V2_ROUTER).swapExactTokensForTokens(
leftoverBorrowed,
1, // minOut
path,
address(this),
block.timestamp
);
}
// Now we have leftover in WETH, unwrap to ETH
uint256 leftoverWeth = IERC20(WETH).balanceOf(address(this));
if (leftoverWeth > 0) {
IWETH9(WETH).withdraw(leftoverWeth); // WETH -> ETH
// Send ETH to profit wallet
(bool success, ) = PROFIT_WALLET.call{value: leftoverWeth}("");
require(success, "ETH transfer to PROFIT_WALLET failed");
}
}
// 6) Return true so Aave can finalize the flash loan
return true;
}
/**
* @dev Route each DexStep to the correct swap function.
*/
function _performDexSwap(DexStep memory step) internal {
// Make sure we have enough of step.tokenIn
require(
IERC20(step.tokenIn).balanceOf(address(this)) >= step.amountIn,
"Not enough tokenIn for the swap"
);
// Approve if needed
_approveIfNeeded(step.tokenIn, step.dexAddress, step.amountIn);
if (step.dexType == DexType.UniswapV2) {
_swapUniswapV2Single(step.dexAddress, step.tokenIn, step.tokenOut, step.amountIn);
} else if (step.dexType == DexType.UniswapV3) {
_swapUniswapV3Single(step.dexAddress, step.tokenIn, step.tokenOut, step.fee, step.amountIn);
} else if (step.dexType == DexType.Curve) {
_swapCurve(step.dexAddress, step.tokenIn, step.tokenOut, step.amountIn);
} else if (step.dexType == DexType.Balancer) {
_swapBalancer(step.dexAddress, step.tokenIn, step.tokenOut, step.amountIn);
} else if (step.dexType == DexType.Kyber) {
_swapKyber(step.dexAddress, step.tokenIn, step.tokenOut, step.amountIn);
} else {
revert("Unsupported DexType");
}
}
/**
* @dev Uniswap V2 single-hop swap
*/
function _swapUniswapV2Single(
address router,
address tokenIn,
address tokenOut,
uint256 amountIn
) internal {
address[] memory path;
path[0] = tokenIn;
path[1] = tokenOut;
// We already did _approveIfNeeded, but just in case
IERC20(tokenIn).approve(router, amountIn);
IUniswapV2Router(router).swapExactTokensForTokens(
amountIn,
1, // minOut = 1 for demonstration
path,
address(this),
block.timestamp + 300
);
}
/**
* @dev Uniswap V3 single-hop
*/
function _swapUniswapV3Single(
address router,
address tokenIn,
address tokenOut,
uint24 fee,
uint256 amountIn
) internal {
IUniswapV3Router.ExactInputSingleParams memory paramsV3 = IUniswapV3Router.ExactInputSingleParams({
tokenIn: tokenIn,
tokenOut: tokenOut,
fee: fee,
recipient: address(this),
deadline: block.timestamp + 300,
amountIn: amountIn,
amountOutMinimum: 1,
sqrtPriceLimitX96: 0
});
IUniswapV3Router(router).exactInputSingle(paramsV3);
}
/**
* @dev Curve example (placeholder).
*/
function _swapCurve(
address curvePool,
address /* tokenIn */,
address /* tokenOut */,
uint256 amountIn
) internal {
// Example: exchanging index 0 -> 1 with minDy = 1
ICurvePool(curvePool).exchange_underlying(0, 1, amountIn, 1);
}
/**
* @dev Balancer example (placeholder).
*/
function _swapBalancer(
address balancerVault,
address /* tokenIn */,
address /* tokenOut */,
uint256 /* amountIn */
) internal {
// Stub: You'd fill in real data here
IBalancerVault(balancerVault).swap(/* pass in real struct data */);
}
/**
* @dev Kyber example (placeholder).
*/
function _swapKyber(
address kyber,
address tokenIn,
address tokenOut,
uint256 amountIn
) internal {
IKyber(kyber).swapTokenToToken(tokenIn, amountIn, tokenOut, 1);
}
/**
* @dev Approve if allowance < requiredAmount.
*/
function _approveIfNeeded(
address token,
address spender,
uint256 requiredAmount
) internal {
uint256 current = IERC20(token).allowance(address(this), spender);
if (current < requiredAmount) {
IERC20(token).approve(spender, 0);
IERC20(token).approve(spender, type(uint256).max);
}
}
// Accept ETH from unwrapping WETH
receive() external payable {}
}// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;
import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';
import {IPool} from '../../interfaces/IPool.sol';
/**
* @title IFlashLoanSimpleReceiver
* @author Aave
* @notice Defines the basic interface of a flashloan-receiver contract.
* @dev Implement this interface to develop a flashloan-compatible flashLoanReceiver contract
*/
interface IFlashLoanSimpleReceiver {
/**
* @notice Executes an operation after receiving the flash-borrowed asset
* @dev Ensure that the contract can return the debt + premium, e.g., has
* enough funds to repay and has approved the Pool to pull the total amount
* @param asset The address of the flash-borrowed asset
* @param amount The amount of the flash-borrowed asset
* @param premium The fee of the flash-borrowed asset
* @param initiator The address of the flashloan initiator
* @param params The byte-encoded params passed when initiating the flashloan
* @return True if the execution of the operation succeeds, false otherwise
*/
function executeOperation(
address asset,
uint256 amount,
uint256 premium,
address initiator,
bytes calldata params
) external returns (bool);
function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);
function POOL() external view returns (IPool);
}// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;
import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';
import {DataTypes} from '../protocol/libraries/types/DataTypes.sol';
/**
* @title IPool
* @author Aave
* @notice Defines the basic interface for an Aave Pool.
*/
interface IPool {
/**
* @dev Emitted on mintUnbacked()
* @param reserve The address of the underlying asset of the reserve
* @param user The address initiating the supply
* @param onBehalfOf The beneficiary of the supplied assets, receiving the aTokens
* @param amount The amount of supplied assets
* @param referralCode The referral code used
*/
event MintUnbacked(
address indexed reserve,
address user,
address indexed onBehalfOf,
uint256 amount,
uint16 indexed referralCode
);
/**
* @dev Emitted on backUnbacked()
* @param reserve The address of the underlying asset of the reserve
* @param backer The address paying for the backing
* @param amount The amount added as backing
* @param fee The amount paid in fees
*/
event BackUnbacked(address indexed reserve, address indexed backer, uint256 amount, uint256 fee);
/**
* @dev Emitted on supply()
* @param reserve The address of the underlying asset of the reserve
* @param user The address initiating the supply
* @param onBehalfOf The beneficiary of the supply, receiving the aTokens
* @param amount The amount supplied
* @param referralCode The referral code used
*/
event Supply(
address indexed reserve,
address user,
address indexed onBehalfOf,
uint256 amount,
uint16 indexed referralCode
);
/**
* @dev Emitted on withdraw()
* @param reserve The address of the underlying asset being withdrawn
* @param user The address initiating the withdrawal, owner of aTokens
* @param to The address that will receive the underlying
* @param amount The amount to be withdrawn
*/
event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);
/**
* @dev Emitted on borrow() and flashLoan() when debt needs to be opened
* @param reserve The address of the underlying asset being borrowed
* @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just
* initiator of the transaction on flashLoan()
* @param onBehalfOf The address that will be getting the debt
* @param amount The amount borrowed out
* @param interestRateMode The rate mode: 1 for Stable, 2 for Variable
* @param borrowRate The numeric rate at which the user has borrowed, expressed in ray
* @param referralCode The referral code used
*/
event Borrow(
address indexed reserve,
address user,
address indexed onBehalfOf,
uint256 amount,
DataTypes.InterestRateMode interestRateMode,
uint256 borrowRate,
uint16 indexed referralCode
);
/**
* @dev Emitted on repay()
* @param reserve The address of the underlying asset of the reserve
* @param user The beneficiary of the repayment, getting his debt reduced
* @param repayer The address of the user initiating the repay(), providing the funds
* @param amount The amount repaid
* @param useATokens True if the repayment is done using aTokens, `false` if done with underlying asset directly
*/
event Repay(
address indexed reserve,
address indexed user,
address indexed repayer,
uint256 amount,
bool useATokens
);
/**
* @dev Emitted on swapBorrowRateMode()
* @param reserve The address of the underlying asset of the reserve
* @param user The address of the user swapping his rate mode
* @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable
*/
event SwapBorrowRateMode(
address indexed reserve,
address indexed user,
DataTypes.InterestRateMode interestRateMode
);
/**
* @dev Emitted on borrow(), repay() and liquidationCall() when using isolated assets
* @param asset The address of the underlying asset of the reserve
* @param totalDebt The total isolation mode debt for the reserve
*/
event IsolationModeTotalDebtUpdated(address indexed asset, uint256 totalDebt);
/**
* @dev Emitted when the user selects a certain asset category for eMode
* @param user The address of the user
* @param categoryId The category id
*/
event UserEModeSet(address indexed user, uint8 categoryId);
/**
* @dev Emitted on setUserUseReserveAsCollateral()
* @param reserve The address of the underlying asset of the reserve
* @param user The address of the user enabling the usage as collateral
*/
event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);
/**
* @dev Emitted on setUserUseReserveAsCollateral()
* @param reserve The address of the underlying asset of the reserve
* @param user The address of the user enabling the usage as collateral
*/
event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);
/**
* @dev Emitted on rebalanceStableBorrowRate()
* @param reserve The address of the underlying asset of the reserve
* @param user The address of the user for which the rebalance has been executed
*/
event RebalanceStableBorrowRate(address indexed reserve, address indexed user);
/**
* @dev Emitted on flashLoan()
* @param target The address of the flash loan receiver contract
* @param initiator The address initiating the flash loan
* @param asset The address of the asset being flash borrowed
* @param amount The amount flash borrowed
* @param interestRateMode The flashloan mode: 0 for regular flashloan, 1 for Stable debt, 2 for Variable debt
* @param premium The fee flash borrowed
* @param referralCode The referral code used
*/
event FlashLoan(
address indexed target,
address initiator,
address indexed asset,
uint256 amount,
DataTypes.InterestRateMode interestRateMode,
uint256 premium,
uint16 indexed referralCode
);
/**
* @dev Emitted when a borrower is liquidated.
* @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation
* @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation
* @param user The address of the borrower getting liquidated
* @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover
* @param liquidatedCollateralAmount The amount of collateral received by the liquidator
* @param liquidator The address of the liquidator
* @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants
* to receive the underlying collateral asset directly
*/
event LiquidationCall(
address indexed collateralAsset,
address indexed debtAsset,
address indexed user,
uint256 debtToCover,
uint256 liquidatedCollateralAmount,
address liquidator,
bool receiveAToken
);
/**
* @dev Emitted when the state of a reserve is updated.
* @param reserve The address of the underlying asset of the reserve
* @param liquidityRate The next liquidity rate
* @param stableBorrowRate The next stable borrow rate
* @param variableBorrowRate The next variable borrow rate
* @param liquidityIndex The next liquidity index
* @param variableBorrowIndex The next variable borrow index
*/
event ReserveDataUpdated(
address indexed reserve,
uint256 liquidityRate,
uint256 stableBorrowRate,
uint256 variableBorrowRate,
uint256 liquidityIndex,
uint256 variableBorrowIndex
);
/**
* @dev Emitted when the protocol treasury receives minted aTokens from the accrued interest.
* @param reserve The address of the reserve
* @param amountMinted The amount minted to the treasury
*/
event MintedToTreasury(address indexed reserve, uint256 amountMinted);
/**
* @notice Mints an `amount` of aTokens to the `onBehalfOf`
* @param asset The address of the underlying asset to mint
* @param amount The amount to mint
* @param onBehalfOf The address that will receive the aTokens
* @param referralCode Code used to register the integrator originating the operation, for potential rewards.
* 0 if the action is executed directly by the user, without any middle-man
*/
function mintUnbacked(
address asset,
uint256 amount,
address onBehalfOf,
uint16 referralCode
) external;
/**
* @notice Back the current unbacked underlying with `amount` and pay `fee`.
* @param asset The address of the underlying asset to back
* @param amount The amount to back
* @param fee The amount paid in fees
* @return The backed amount
*/
function backUnbacked(address asset, uint256 amount, uint256 fee) external returns (uint256);
/**
* @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.
* - E.g. User supplies 100 USDC and gets in return 100 aUSDC
* @param asset The address of the underlying asset to supply
* @param amount The amount to be supplied
* @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user
* wants to receive them on his own wallet, or a different address if the beneficiary of aTokens
* is a different wallet
* @param referralCode Code used to register the integrator originating the operation, for potential rewards.
* 0 if the action is executed directly by the user, without any middle-man
*/
function supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external;
/**
* @notice Supply with transfer approval of asset to be supplied done via permit function
* see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713
* @param asset The address of the underlying asset to supply
* @param amount The amount to be supplied
* @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user
* wants to receive them on his own wallet, or a different address if the beneficiary of aTokens
* is a different wallet
* @param deadline The deadline timestamp that the permit is valid
* @param referralCode Code used to register the integrator originating the operation, for potential rewards.
* 0 if the action is executed directly by the user, without any middle-man
* @param permitV The V parameter of ERC712 permit sig
* @param permitR The R parameter of ERC712 permit sig
* @param permitS The S parameter of ERC712 permit sig
*/
function supplyWithPermit(
address asset,
uint256 amount,
address onBehalfOf,
uint16 referralCode,
uint256 deadline,
uint8 permitV,
bytes32 permitR,
bytes32 permitS
) external;
/**
* @notice Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned
* E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC
* @param asset The address of the underlying asset to withdraw
* @param amount The underlying amount to be withdrawn
* - Send the value type(uint256).max in order to withdraw the whole aToken balance
* @param to The address that will receive the underlying, same as msg.sender if the user
* wants to receive it on his own wallet, or a different address if the beneficiary is a
* different wallet
* @return The final amount withdrawn
*/
function withdraw(address asset, uint256 amount, address to) external returns (uint256);
/**
* @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower
* already supplied enough collateral, or he was given enough allowance by a credit delegator on the
* corresponding debt token (StableDebtToken or VariableDebtToken)
* - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet
* and 100 stable/variable debt tokens, depending on the `interestRateMode`
* @param asset The address of the underlying asset to borrow
* @param amount The amount to be borrowed
* @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable
* @param referralCode The code used to register the integrator originating the operation, for potential rewards.
* 0 if the action is executed directly by the user, without any middle-man
* @param onBehalfOf The address of the user who will receive the debt. Should be the address of the borrower itself
* calling the function if he wants to borrow against his own collateral, or the address of the credit delegator
* if he has been given credit delegation allowance
*/
function borrow(
address asset,
uint256 amount,
uint256 interestRateMode,
uint16 referralCode,
address onBehalfOf
) external;
/**
* @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned
* - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address
* @param asset The address of the borrowed underlying asset previously borrowed
* @param amount The amount to repay
* - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`
* @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable
* @param onBehalfOf The address of the user who will get his debt reduced/removed. Should be the address of the
* user calling the function if he wants to reduce/remove his own debt, or the address of any other
* other borrower whose debt should be removed
* @return The final amount repaid
*/
function repay(
address asset,
uint256 amount,
uint256 interestRateMode,
address onBehalfOf
) external returns (uint256);
/**
* @notice Repay with transfer approval of asset to be repaid done via permit function
* see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713
* @param asset The address of the borrowed underlying asset previously borrowed
* @param amount The amount to repay
* - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`
* @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable
* @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the
* user calling the function if he wants to reduce/remove his own debt, or the address of any other
* other borrower whose debt should be removed
* @param deadline The deadline timestamp that the permit is valid
* @param permitV The V parameter of ERC712 permit sig
* @param permitR The R parameter of ERC712 permit sig
* @param permitS The S parameter of ERC712 permit sig
* @return The final amount repaid
*/
function repayWithPermit(
address asset,
uint256 amount,
uint256 interestRateMode,
address onBehalfOf,
uint256 deadline,
uint8 permitV,
bytes32 permitR,
bytes32 permitS
) external returns (uint256);
/**
* @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the
* equivalent debt tokens
* - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable/stable debt tokens
* @dev Passing uint256.max as amount will clean up any residual aToken dust balance, if the user aToken
* balance is not enough to cover the whole debt
* @param asset The address of the borrowed underlying asset previously borrowed
* @param amount The amount to repay
* - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`
* @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable
* @return The final amount repaid
*/
function repayWithATokens(
address asset,
uint256 amount,
uint256 interestRateMode
) external returns (uint256);
/**
* @notice Allows a borrower to swap his debt between stable and variable mode, or vice versa
* @param asset The address of the underlying asset borrowed
* @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable
*/
function swapBorrowRateMode(address asset, uint256 interestRateMode) external;
/**
* @notice Rebalances the stable interest rate of a user to the current stable rate defined on the reserve.
* - Users can be rebalanced if the following conditions are satisfied:
* 1. Usage ratio is above 95%
* 2. the current supply APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too
* much has been borrowed at a stable rate and suppliers are not earning enough
* @param asset The address of the underlying asset borrowed
* @param user The address of the user to be rebalanced
*/
function rebalanceStableBorrowRate(address asset, address user) external;
/**
* @notice Allows suppliers to enable/disable a specific supplied asset as collateral
* @param asset The address of the underlying asset supplied
* @param useAsCollateral True if the user wants to use the supply as collateral, false otherwise
*/
function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;
/**
* @notice Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1
* - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives
* a proportionally amount of the `collateralAsset` plus a bonus to cover market risk
* @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation
* @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation
* @param user The address of the borrower getting liquidated
* @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover
* @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants
* to receive the underlying collateral asset directly
*/
function liquidationCall(
address collateralAsset,
address debtAsset,
address user,
uint256 debtToCover,
bool receiveAToken
) external;
/**
* @notice Allows smartcontracts to access the liquidity of the pool within one transaction,
* as long as the amount taken plus a fee is returned.
* @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept
* into consideration. For further details please visit https://docs.aave.com/developers/
* @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanReceiver interface
* @param assets The addresses of the assets being flash-borrowed
* @param amounts The amounts of the assets being flash-borrowed
* @param interestRateModes Types of the debt to open if the flash loan is not returned:
* 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver
* 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address
* 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address
* @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2
* @param params Variadic packed params to pass to the receiver as extra information
* @param referralCode The code used to register the integrator originating the operation, for potential rewards.
* 0 if the action is executed directly by the user, without any middle-man
*/
function flashLoan(
address receiverAddress,
address[] calldata assets,
uint256[] calldata amounts,
uint256[] calldata interestRateModes,
address onBehalfOf,
bytes calldata params,
uint16 referralCode
) external;
/**
* @notice Allows smartcontracts to access the liquidity of the pool within one transaction,
* as long as the amount taken plus a fee is returned.
* @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept
* into consideration. For further details please visit https://docs.aave.com/developers/
* @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanSimpleReceiver interface
* @param asset The address of the asset being flash-borrowed
* @param amount The amount of the asset being flash-borrowed
* @param params Variadic packed params to pass to the receiver as extra information
* @param referralCode The code used to register the integrator originating the operation, for potential rewards.
* 0 if the action is executed directly by the user, without any middle-man
*/
function flashLoanSimple(
address receiverAddress,
address asset,
uint256 amount,
bytes calldata params,
uint16 referralCode
) external;
/**
* @notice Returns the user account data across all the reserves
* @param user The address of the user
* @return totalCollateralBase The total collateral of the user in the base currency used by the price feed
* @return totalDebtBase The total debt of the user in the base currency used by the price feed
* @return availableBorrowsBase The borrowing power left of the user in the base currency used by the price feed
* @return currentLiquidationThreshold The liquidation threshold of the user
* @return ltv The loan to value of The user
* @return healthFactor The current health factor of the user
*/
function getUserAccountData(
address user
)
external
view
returns (
uint256 totalCollateralBase,
uint256 totalDebtBase,
uint256 availableBorrowsBase,
uint256 currentLiquidationThreshold,
uint256 ltv,
uint256 healthFactor
);
/**
* @notice Initializes a reserve, activating it, assigning an aToken and debt tokens and an
* interest rate strategy
* @dev Only callable by the PoolConfigurator contract
* @param asset The address of the underlying asset of the reserve
* @param aTokenAddress The address of the aToken that will be assigned to the reserve
* @param stableDebtAddress The address of the StableDebtToken that will be assigned to the reserve
* @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve
* @param interestRateStrategyAddress The address of the interest rate strategy contract
*/
function initReserve(
address asset,
address aTokenAddress,
address stableDebtAddress,
address variableDebtAddress,
address interestRateStrategyAddress
) external;
/**
* @notice Drop a reserve
* @dev Only callable by the PoolConfigurator contract
* @param asset The address of the underlying asset of the reserve
*/
function dropReserve(address asset) external;
/**
* @notice Updates the address of the interest rate strategy contract
* @dev Only callable by the PoolConfigurator contract
* @param asset The address of the underlying asset of the reserve
* @param rateStrategyAddress The address of the interest rate strategy contract
*/
function setReserveInterestRateStrategyAddress(
address asset,
address rateStrategyAddress
) external;
/**
* @notice Sets the configuration bitmap of the reserve as a whole
* @dev Only callable by the PoolConfigurator contract
* @param asset The address of the underlying asset of the reserve
* @param configuration The new configuration bitmap
*/
function setConfiguration(
address asset,
DataTypes.ReserveConfigurationMap calldata configuration
) external;
/**
* @notice Returns the configuration of the reserve
* @param asset The address of the underlying asset of the reserve
* @return The configuration of the reserve
*/
function getConfiguration(
address asset
) external view returns (DataTypes.ReserveConfigurationMap memory);
/**
* @notice Returns the configuration of the user across all the reserves
* @param user The user address
* @return The configuration of the user
*/
function getUserConfiguration(
address user
) external view returns (DataTypes.UserConfigurationMap memory);
/**
* @notice Returns the normalized income of the reserve
* @param asset The address of the underlying asset of the reserve
* @return The reserve's normalized income
*/
function getReserveNormalizedIncome(address asset) external view returns (uint256);
/**
* @notice Returns the normalized variable debt per unit of asset
* @dev WARNING: This function is intended to be used primarily by the protocol itself to get a
* "dynamic" variable index based on time, current stored index and virtual rate at the current
* moment (approx. a borrower would get if opening a position). This means that is always used in
* combination with variable debt supply/balances.
* If using this function externally, consider that is possible to have an increasing normalized
* variable debt that is not equivalent to how the variable debt index would be updated in storage
* (e.g. only updates with non-zero variable debt supply)
* @param asset The address of the underlying asset of the reserve
* @return The reserve normalized variable debt
*/
function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);
/**
* @notice Returns the state and configuration of the reserve
* @param asset The address of the underlying asset of the reserve
* @return The state and configuration data of the reserve
*/
function getReserveData(address asset) external view returns (DataTypes.ReserveData memory);
/**
* @notice Validates and finalizes an aToken transfer
* @dev Only callable by the overlying aToken of the `asset`
* @param asset The address of the underlying asset of the aToken
* @param from The user from which the aTokens are transferred
* @param to The user receiving the aTokens
* @param amount The amount being transferred/withdrawn
* @param balanceFromBefore The aToken balance of the `from` user before the transfer
* @param balanceToBefore The aToken balance of the `to` user before the transfer
*/
function finalizeTransfer(
address asset,
address from,
address to,
uint256 amount,
uint256 balanceFromBefore,
uint256 balanceToBefore
) external;
/**
* @notice Returns the list of the underlying assets of all the initialized reserves
* @dev It does not include dropped reserves
* @return The addresses of the underlying assets of the initialized reserves
*/
function getReservesList() external view returns (address[] memory);
/**
* @notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the DataTypes.ReserveData struct
* @param id The id of the reserve as stored in the DataTypes.ReserveData struct
* @return The address of the reserve associated with id
*/
function getReserveAddressById(uint16 id) external view returns (address);
/**
* @notice Returns the PoolAddressesProvider connected to this contract
* @return The address of the PoolAddressesProvider
*/
function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);
/**
* @notice Updates the protocol fee on the bridging
* @param bridgeProtocolFee The part of the premium sent to the protocol treasury
*/
function updateBridgeProtocolFee(uint256 bridgeProtocolFee) external;
/**
* @notice Updates flash loan premiums. Flash loan premium consists of two parts:
* - A part is sent to aToken holders as extra, one time accumulated interest
* - A part is collected by the protocol treasury
* @dev The total premium is calculated on the total borrowed amount
* @dev The premium to protocol is calculated on the total premium, being a percentage of `flashLoanPremiumTotal`
* @dev Only callable by the PoolConfigurator contract
* @param flashLoanPremiumTotal The total premium, expressed in bps
* @param flashLoanPremiumToProtocol The part of the premium sent to the protocol treasury, expressed in bps
*/
function updateFlashloanPremiums(
uint128 flashLoanPremiumTotal,
uint128 flashLoanPremiumToProtocol
) external;
/**
* @notice Configures a new category for the eMode.
* @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category.
* The category 0 is reserved as it's the default for volatile assets
* @param id The id of the category
* @param config The configuration of the category
*/
function configureEModeCategory(uint8 id, DataTypes.EModeCategory memory config) external;
/**
* @notice Returns the data of an eMode category
* @param id The id of the category
* @return The configuration data of the category
*/
function getEModeCategoryData(uint8 id) external view returns (DataTypes.EModeCategory memory);
/**
* @notice Allows a user to use the protocol in eMode
* @param categoryId The id of the category
*/
function setUserEMode(uint8 categoryId) external;
/**
* @notice Returns the eMode the user is using
* @param user The address of the user
* @return The eMode id
*/
function getUserEMode(address user) external view returns (uint256);
/**
* @notice Resets the isolation mode total debt of the given asset to zero
* @dev It requires the given asset has zero debt ceiling
* @param asset The address of the underlying asset to reset the isolationModeTotalDebt
*/
function resetIsolationModeTotalDebt(address asset) external;
/**
* @notice Returns the percentage of available liquidity that can be borrowed at once at stable rate
* @return The percentage of available liquidity to borrow, expressed in bps
*/
function MAX_STABLE_RATE_BORROW_SIZE_PERCENT() external view returns (uint256);
/**
* @notice Returns the total fee on flash loans
* @return The total fee on flashloans
*/
function FLASHLOAN_PREMIUM_TOTAL() external view returns (uint128);
/**
* @notice Returns the part of the bridge fees sent to protocol
* @return The bridge fee sent to the protocol treasury
*/
function BRIDGE_PROTOCOL_FEE() external view returns (uint256);
/**
* @notice Returns the part of the flashloan fees sent to protocol
* @return The flashloan fee sent to the protocol treasury
*/
function FLASHLOAN_PREMIUM_TO_PROTOCOL() external view returns (uint128);
/**
* @notice Returns the maximum number of reserves supported to be listed in this Pool
* @return The maximum number of reserves supported
*/
function MAX_NUMBER_RESERVES() external view returns (uint16);
/**
* @notice Mints the assets accrued through the reserve factor to the treasury in the form of aTokens
* @param assets The list of reserves for which the minting needs to be executed
*/
function mintToTreasury(address[] calldata assets) external;
/**
* @notice Rescue and transfer tokens locked in this contract
* @param token The address of the token
* @param to The address of the recipient
* @param amount The amount of token to transfer
*/
function rescueTokens(address token, address to, uint256 amount) external;
/**
* @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.
* - E.g. User supplies 100 USDC and gets in return 100 aUSDC
* @dev Deprecated: Use the `supply` function instead
* @param asset The address of the underlying asset to supply
* @param amount The amount to be supplied
* @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user
* wants to receive them on his own wallet, or a different address if the beneficiary of aTokens
* is a different wallet
* @param referralCode Code used to register the integrator originating the operation, for potential rewards.
* 0 if the action is executed directly by the user, without any middle-man
*/
function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external;
}// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;
/**
* @title IPoolAddressesProvider
* @author Aave
* @notice Defines the basic interface for a Pool Addresses Provider.
*/
interface IPoolAddressesProvider {
/**
* @dev Emitted when the market identifier is updated.
* @param oldMarketId The old id of the market
* @param newMarketId The new id of the market
*/
event MarketIdSet(string indexed oldMarketId, string indexed newMarketId);
/**
* @dev Emitted when the pool is updated.
* @param oldAddress The old address of the Pool
* @param newAddress The new address of the Pool
*/
event PoolUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the pool configurator is updated.
* @param oldAddress The old address of the PoolConfigurator
* @param newAddress The new address of the PoolConfigurator
*/
event PoolConfiguratorUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the price oracle is updated.
* @param oldAddress The old address of the PriceOracle
* @param newAddress The new address of the PriceOracle
*/
event PriceOracleUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the ACL manager is updated.
* @param oldAddress The old address of the ACLManager
* @param newAddress The new address of the ACLManager
*/
event ACLManagerUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the ACL admin is updated.
* @param oldAddress The old address of the ACLAdmin
* @param newAddress The new address of the ACLAdmin
*/
event ACLAdminUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the price oracle sentinel is updated.
* @param oldAddress The old address of the PriceOracleSentinel
* @param newAddress The new address of the PriceOracleSentinel
*/
event PriceOracleSentinelUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the pool data provider is updated.
* @param oldAddress The old address of the PoolDataProvider
* @param newAddress The new address of the PoolDataProvider
*/
event PoolDataProviderUpdated(address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when a new proxy is created.
* @param id The identifier of the proxy
* @param proxyAddress The address of the created proxy contract
* @param implementationAddress The address of the implementation contract
*/
event ProxyCreated(
bytes32 indexed id,
address indexed proxyAddress,
address indexed implementationAddress
);
/**
* @dev Emitted when a new non-proxied contract address is registered.
* @param id The identifier of the contract
* @param oldAddress The address of the old contract
* @param newAddress The address of the new contract
*/
event AddressSet(bytes32 indexed id, address indexed oldAddress, address indexed newAddress);
/**
* @dev Emitted when the implementation of the proxy registered with id is updated
* @param id The identifier of the contract
* @param proxyAddress The address of the proxy contract
* @param oldImplementationAddress The address of the old implementation contract
* @param newImplementationAddress The address of the new implementation contract
*/
event AddressSetAsProxy(
bytes32 indexed id,
address indexed proxyAddress,
address oldImplementationAddress,
address indexed newImplementationAddress
);
/**
* @notice Returns the id of the Aave market to which this contract points to.
* @return The market id
*/
function getMarketId() external view returns (string memory);
/**
* @notice Associates an id with a specific PoolAddressesProvider.
* @dev This can be used to create an onchain registry of PoolAddressesProviders to
* identify and validate multiple Aave markets.
* @param newMarketId The market id
*/
function setMarketId(string calldata newMarketId) external;
/**
* @notice Returns an address by its identifier.
* @dev The returned address might be an EOA or a contract, potentially proxied
* @dev It returns ZERO if there is no registered address with the given id
* @param id The id
* @return The address of the registered for the specified id
*/
function getAddress(bytes32 id) external view returns (address);
/**
* @notice General function to update the implementation of a proxy registered with
* certain `id`. If there is no proxy registered, it will instantiate one and
* set as implementation the `newImplementationAddress`.
* @dev IMPORTANT Use this function carefully, only for ids that don't have an explicit
* setter function, in order to avoid unexpected consequences
* @param id The id
* @param newImplementationAddress The address of the new implementation
*/
function setAddressAsProxy(bytes32 id, address newImplementationAddress) external;
/**
* @notice Sets an address for an id replacing the address saved in the addresses map.
* @dev IMPORTANT Use this function carefully, as it will do a hard replacement
* @param id The id
* @param newAddress The address to set
*/
function setAddress(bytes32 id, address newAddress) external;
/**
* @notice Returns the address of the Pool proxy.
* @return The Pool proxy address
*/
function getPool() external view returns (address);
/**
* @notice Updates the implementation of the Pool, or creates a proxy
* setting the new `pool` implementation when the function is called for the first time.
* @param newPoolImpl The new Pool implementation
*/
function setPoolImpl(address newPoolImpl) external;
/**
* @notice Returns the address of the PoolConfigurator proxy.
* @return The PoolConfigurator proxy address
*/
function getPoolConfigurator() external view returns (address);
/**
* @notice Updates the implementation of the PoolConfigurator, or creates a proxy
* setting the new `PoolConfigurator` implementation when the function is called for the first time.
* @param newPoolConfiguratorImpl The new PoolConfigurator implementation
*/
function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external;
/**
* @notice Returns the address of the price oracle.
* @return The address of the PriceOracle
*/
function getPriceOracle() external view returns (address);
/**
* @notice Updates the address of the price oracle.
* @param newPriceOracle The address of the new PriceOracle
*/
function setPriceOracle(address newPriceOracle) external;
/**
* @notice Returns the address of the ACL manager.
* @return The address of the ACLManager
*/
function getACLManager() external view returns (address);
/**
* @notice Updates the address of the ACL manager.
* @param newAclManager The address of the new ACLManager
*/
function setACLManager(address newAclManager) external;
/**
* @notice Returns the address of the ACL admin.
* @return The address of the ACL admin
*/
function getACLAdmin() external view returns (address);
/**
* @notice Updates the address of the ACL admin.
* @param newAclAdmin The address of the new ACL admin
*/
function setACLAdmin(address newAclAdmin) external;
/**
* @notice Returns the address of the price oracle sentinel.
* @return The address of the PriceOracleSentinel
*/
function getPriceOracleSentinel() external view returns (address);
/**
* @notice Updates the address of the price oracle sentinel.
* @param newPriceOracleSentinel The address of the new PriceOracleSentinel
*/
function setPriceOracleSentinel(address newPriceOracleSentinel) external;
/**
* @notice Returns the address of the data provider.
* @return The address of the DataProvider
*/
function getPoolDataProvider() external view returns (address);
/**
* @notice Updates the address of the data provider.
* @param newDataProvider The address of the new DataProvider
*/
function setPoolDataProvider(address newDataProvider) external;
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
library DataTypes {
struct ReserveData {
//stores the reserve configuration
ReserveConfigurationMap configuration;
//the liquidity index. Expressed in ray
uint128 liquidityIndex;
//the current supply rate. Expressed in ray
uint128 currentLiquidityRate;
//variable borrow index. Expressed in ray
uint128 variableBorrowIndex;
//the current variable borrow rate. Expressed in ray
uint128 currentVariableBorrowRate;
//the current stable borrow rate. Expressed in ray
uint128 currentStableBorrowRate;
//timestamp of last update
uint40 lastUpdateTimestamp;
//the id of the reserve. Represents the position in the list of the active reserves
uint16 id;
//aToken address
address aTokenAddress;
//stableDebtToken address
address stableDebtTokenAddress;
//variableDebtToken address
address variableDebtTokenAddress;
//address of the interest rate strategy
address interestRateStrategyAddress;
//the current treasury balance, scaled
uint128 accruedToTreasury;
//the outstanding unbacked aTokens minted through the bridging feature
uint128 unbacked;
//the outstanding debt borrowed against this asset in isolation mode
uint128 isolationModeTotalDebt;
}
struct ReserveConfigurationMap {
//bit 0-15: LTV
//bit 16-31: Liq. threshold
//bit 32-47: Liq. bonus
//bit 48-55: Decimals
//bit 56: reserve is active
//bit 57: reserve is frozen
//bit 58: borrowing is enabled
//bit 59: stable rate borrowing enabled
//bit 60: asset is paused
//bit 61: borrowing in isolation mode is enabled
//bit 62: siloed borrowing enabled
//bit 63: flashloaning enabled
//bit 64-79: reserve factor
//bit 80-115 borrow cap in whole tokens, borrowCap == 0 => no cap
//bit 116-151 supply cap in whole tokens, supplyCap == 0 => no cap
//bit 152-167 liquidation protocol fee
//bit 168-175 eMode category
//bit 176-211 unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled
//bit 212-251 debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals
//bit 252-255 unused
uint256 data;
}
struct UserConfigurationMap {
/**
* @dev Bitmap of the users collaterals and borrows. It is divided in pairs of bits, one pair per asset.
* The first bit indicates if an asset is used as collateral by the user, the second whether an
* asset is borrowed by the user.
*/
uint256 data;
}
struct EModeCategory {
// each eMode category has a custom ltv and liquidation threshold
uint16 ltv;
uint16 liquidationThreshold;
uint16 liquidationBonus;
// each eMode category may or may not have a custom oracle to override the individual assets price oracles
address priceSource;
string label;
}
enum InterestRateMode {NONE, STABLE, VARIABLE}
struct ReserveCache {
uint256 currScaledVariableDebt;
uint256 nextScaledVariableDebt;
uint256 currPrincipalStableDebt;
uint256 currAvgStableBorrowRate;
uint256 currTotalStableDebt;
uint256 nextAvgStableBorrowRate;
uint256 nextTotalStableDebt;
uint256 currLiquidityIndex;
uint256 nextLiquidityIndex;
uint256 currVariableBorrowIndex;
uint256 nextVariableBorrowIndex;
uint256 currLiquidityRate;
uint256 currVariableBorrowRate;
uint256 reserveFactor;
ReserveConfigurationMap reserveConfiguration;
address aTokenAddress;
address stableDebtTokenAddress;
address variableDebtTokenAddress;
uint40 reserveLastUpdateTimestamp;
uint40 stableDebtLastUpdateTimestamp;
}
struct ExecuteLiquidationCallParams {
uint256 reservesCount;
uint256 debtToCover;
address collateralAsset;
address debtAsset;
address user;
bool receiveAToken;
address priceOracle;
uint8 userEModeCategory;
address priceOracleSentinel;
}
struct ExecuteSupplyParams {
address asset;
uint256 amount;
address onBehalfOf;
uint16 referralCode;
}
struct ExecuteBorrowParams {
address asset;
address user;
address onBehalfOf;
uint256 amount;
InterestRateMode interestRateMode;
uint16 referralCode;
bool releaseUnderlying;
uint256 maxStableRateBorrowSizePercent;
uint256 reservesCount;
address oracle;
uint8 userEModeCategory;
address priceOracleSentinel;
}
struct ExecuteRepayParams {
address asset;
uint256 amount;
InterestRateMode interestRateMode;
address onBehalfOf;
bool useATokens;
}
struct ExecuteWithdrawParams {
address asset;
uint256 amount;
address to;
uint256 reservesCount;
address oracle;
uint8 userEModeCategory;
}
struct ExecuteSetUserEModeParams {
uint256 reservesCount;
address oracle;
uint8 categoryId;
}
struct FinalizeTransferParams {
address asset;
address from;
address to;
uint256 amount;
uint256 balanceFromBefore;
uint256 balanceToBefore;
uint256 reservesCount;
address oracle;
uint8 fromEModeCategory;
}
struct FlashloanParams {
address receiverAddress;
address[] assets;
uint256[] amounts;
uint256[] interestRateModes;
address onBehalfOf;
bytes params;
uint16 referralCode;
uint256 flashLoanPremiumToProtocol;
uint256 flashLoanPremiumTotal;
uint256 maxStableRateBorrowSizePercent;
uint256 reservesCount;
address addressesProvider;
uint8 userEModeCategory;
bool isAuthorizedFlashBorrower;
}
struct FlashloanSimpleParams {
address receiverAddress;
address asset;
uint256 amount;
bytes params;
uint16 referralCode;
uint256 flashLoanPremiumToProtocol;
uint256 flashLoanPremiumTotal;
}
struct FlashLoanRepaymentParams {
uint256 amount;
uint256 totalPremium;
uint256 flashLoanPremiumToProtocol;
address asset;
address receiverAddress;
uint16 referralCode;
}
struct CalculateUserAccountDataParams {
UserConfigurationMap userConfig;
uint256 reservesCount;
address user;
address oracle;
uint8 userEModeCategory;
}
struct ValidateBorrowParams {
ReserveCache reserveCache;
UserConfigurationMap userConfig;
address asset;
address userAddress;
uint256 amount;
InterestRateMode interestRateMode;
uint256 maxStableLoanPercent;
uint256 reservesCount;
address oracle;
uint8 userEModeCategory;
address priceOracleSentinel;
bool isolationModeActive;
address isolationModeCollateralAddress;
uint256 isolationModeDebtCeiling;
}
struct ValidateLiquidationCallParams {
ReserveCache debtReserveCache;
uint256 totalDebt;
uint256 healthFactor;
address priceOracleSentinel;
}
struct CalculateInterestRatesParams {
uint256 unbacked;
uint256 liquidityAdded;
uint256 liquidityTaken;
uint256 totalStableDebt;
uint256 totalVariableDebt;
uint256 averageStableBorrowRate;
uint256 reserveFactor;
address reserve;
address aToken;
}
struct InitReserveParams {
address asset;
address aTokenAddress;
address stableDebtAddress;
address variableDebtAddress;
address interestRateStrategyAddress;
uint16 reservesCount;
uint16 maxNumberReserves;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_addressesProvider","type":"address"},{"internalType":"address","name":"_uniswapV2Router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"ADDRESSES_PROVIDER","outputs":[{"internalType":"contract IPoolAddressesProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POOL","outputs":[{"internalType":"contract IPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROFIT_WALLET","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNI_V2_ROUTER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"premium","type":"uint256"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"executeOperation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_params","type":"bytes"}],"name":"requestFlashLoan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60e06040523480156200001157600080fd5b5060405162002b0c38038062002b0c8339818101604052810190620000379190620002a4565b620000576200004b6200016e60201b60201c565b6200017660201b60201c565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505060805173ffffffffffffffffffffffffffffffffffffffff1663026b1d5f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000d9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ff9190620002eb565b73ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff168152505050506200031d565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200026c826200023f565b9050919050565b6200027e816200025f565b81146200028a57600080fd5b50565b6000815190506200029e8162000273565b92915050565b60008060408385031215620002be57620002bd6200023a565b5b6000620002ce858286016200028d565b9250506020620002e1858286016200028d565b9150509250929050565b6000602082840312156200030457620003036200023a565b5b600062000314848285016200028d565b91505092915050565b60805160a05160c05161279c620003706000396000818161060b015281816106e60152610ab7015260008181610271015281816104ab0152818161098a0152610a3a0152600061024b015261279c6000f3fe6080604052600436106100955760003560e01c80638da5cb5b116100595780638da5cb5b14610174578063981949e81461019f578063ad5c4648146101ca578063d5bb0226146101f5578063f2fde38b146102205761009c565b80630542975c146100a15780631b11d0ff146100cc5780635107d61e14610109578063715018a6146101325780637535d246146101495761009c565b3661009c57005b600080fd5b3480156100ad57600080fd5b506100b6610249565b6040516100c39190611604565b60405180910390f35b3480156100d857600080fd5b506100f360048036038101906100ee919061170c565b61026d565b60405161010091906117c1565b60405180910390f35b34801561011557600080fd5b50610130600480360381019061012b91906117dc565b610980565b005b34801561013e57600080fd5b50610147610a24565b005b34801561015557600080fd5b5061015e610a38565b60405161016b9190611871565b60405180910390f35b34801561018057600080fd5b50610189610a5c565b604051610196919061189b565b60405180910390f35b3480156101ab57600080fd5b506101b4610a85565b6040516101c1919061189b565b60405180910390f35b3480156101d657600080fd5b506101df610a9d565b6040516101ec919061189b565b60405180910390f35b34801561020157600080fd5b5061020a610ab5565b604051610217919061189b565b60405180910390f35b34801561022c57600080fd5b50610247600480360381019061024291906118b6565b610ad9565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f490611940565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461036b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610362906119ac565b60405180910390fd5b6000838381019061037c9190611c20565b905060005b81518110156103c0576103ad8282815181106103a05761039f611c69565b5b6020026020010151610b5c565b80806103b890611cc7565b915050610381565b50600086886103cf9190611d0f565b9050808973ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161040b919061189b565b602060405180830381865afa158015610428573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044c9190611d58565b101561048d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048490611dd1565b60405180910390fd5b8873ffffffffffffffffffffffffffffffffffffffff1663095ea7b37f0000000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b81526004016104e8929190611e00565b6020604051808303816000875af1158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190611e55565b506000818a73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610568919061189b565b602060405180830381865afa158015610585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a99190611d58565b6105b39190611e82565b9050600081111561096f5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff1614610791576106308a7f000000000000000000000000000000000000000000000000000000000000000083610e12565b60608a8160008151811061064757610646611c69565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816001815181106106aa576106a9611c69565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166338ed17398360018430426040518663ffffffff1660e01b8152600401610746959493929190611faf565b6000604051808303816000875af1158015610765573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061078e91906120cc565b50505b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107e0919061189b565b602060405180830381865afa1580156107fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108219190611d58565b9050600081111561096d5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b81526004016108799190612115565b600060405180830381600087803b15801561089357600080fd5b505af11580156108a7573d6000803e3d6000fd5b50505050600073aee504d7b215f8b9d2576a1954416699f244a8fa73ffffffffffffffffffffffffffffffffffffffff16826040516108e590612161565b60006040518083038185875af1925050503d8060008114610922576040519150601f19603f3d011682016040523d82523d6000602084013e610927565b606091505b505090508061096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906121e8565b60405180910390fd5b505b505b600193505050509695505050505050565b610988610fc0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166342b0b77c308686868660006040518763ffffffff1660e01b81526004016109ec9695949392919061229e565b600060405180830381600087803b158015610a0657600080fd5b505af1158015610a1a573d6000803e3d6000fd5b5050505050505050565b610a2c610fc0565b610a36600061103e565b565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b73aee504d7b215f8b9d2576a1954416699f244a8fa81565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b7f000000000000000000000000000000000000000000000000000000000000000081565b610ae1610fc0565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b479061236c565b60405180910390fd5b610b598161103e565b50565b8060a00151816040015173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610b9e919061189b565b602060405180830381865afa158015610bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bdf9190611d58565b1015610c20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c17906123d8565b60405180910390fd5b610c37816040015182602001518360a00151610e12565b60006004811115610c4b57610c4a6123f8565b5b81600001516004811115610c6257610c616123f8565b5b03610c8857610c838160200151826040015183606001518460a00151611102565b610e0f565b60016004811115610c9c57610c9b6123f8565b5b81600001516004811115610cb357610cb26123f8565b5b03610cde57610cd981602001518260400151836060015184608001518560a001516112c0565b610e0e565b60026004811115610cf257610cf16123f8565b5b81600001516004811115610d0957610d086123f8565b5b03610d2f57610d2a8160200151826040015183606001518460a001516113ef565b610e0d565b60036004811115610d4357610d426123f8565b5b81600001516004811115610d5a57610d596123f8565b5b03610d8057610d7b8160200151826040015183606001518460a0015161147b565b610e0c565b600480811115610d9357610d926123f8565b5b81600001516004811115610daa57610da96123f8565b5b03610dd057610dcb8160200151826040015183606001518460a001516114f3565b610e0b565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0290612473565b60405180910390fd5b5b5b5b5b50565b60008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401610e4f929190612493565b602060405180830381865afa158015610e6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e909190611d58565b905081811015610fba578373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38460006040518363ffffffff1660e01b8152600401610ed69291906124ed565b6020604051808303816000875af1158015610ef5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f199190611e55565b508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610f75929190611e00565b6020604051808303816000875af1158015610f94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb89190611e55565b505b50505050565b610fc861157d565b73ffffffffffffffffffffffffffffffffffffffff16610fe6610a5c565b73ffffffffffffffffffffffffffffffffffffffff161461103c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103390612562565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6060838160008151811061111957611118611c69565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061116857611167611c69565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b386846040518363ffffffff1660e01b81526004016111dd929190611e00565b6020604051808303816000875af11580156111fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112209190611e55565b508473ffffffffffffffffffffffffffffffffffffffff166338ed1739836001843061012c426112509190611d0f565b6040518663ffffffff1660e01b8152600401611270959493929190611faf565b6000604051808303816000875af115801561128f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906112b891906120cc565b505050505050565b60006040518061010001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018462ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200161012c4261133b9190611d0f565b815260200183815260200160018152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090508573ffffffffffffffffffffffffffffffffffffffff1663414bf389826040518263ffffffff1660e01b81526004016113a39190612651565b6020604051808303816000875af11580156113c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e69190611d58565b50505050505050565b8373ffffffffffffffffffffffffffffffffffffffff1663a6417ed6600060018460016040518563ffffffff1660e01b815260040161143194939291906126dc565b6020604051808303816000875af1158015611450573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114749190611d58565b5050505050565b8373ffffffffffffffffffffffffffffffffffffffff16638119c0656040518163ffffffff1660e01b81526004016020604051808303816000875af11580156114c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ec9190611d58565b5050505050565b8373ffffffffffffffffffffffffffffffffffffffff16637409e2eb84838560016040518563ffffffff1660e01b81526004016115339493929190612721565b6020604051808303816000875af1158015611552573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115769190611d58565b5050505050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006115ca6115c56115c084611585565b6115a5565b611585565b9050919050565b60006115dc826115af565b9050919050565b60006115ee826115d1565b9050919050565b6115fe816115e3565b82525050565b600060208201905061161960008301846115f5565b92915050565b6000604051905090565b600080fd5b600080fd5b600061163e82611585565b9050919050565b61164e81611633565b811461165957600080fd5b50565b60008135905061166b81611645565b92915050565b6000819050919050565b61168481611671565b811461168f57600080fd5b50565b6000813590506116a18161167b565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126116cc576116cb6116a7565b5b8235905067ffffffffffffffff8111156116e9576116e86116ac565b5b602083019150836001820283011115611705576117046116b1565b5b9250929050565b60008060008060008060a0878903121561172957611728611629565b5b600061173789828a0161165c565b965050602061174889828a01611692565b955050604061175989828a01611692565b945050606061176a89828a0161165c565b935050608087013567ffffffffffffffff81111561178b5761178a61162e565b5b61179789828a016116b6565b92509250509295509295509295565b60008115159050919050565b6117bb816117a6565b82525050565b60006020820190506117d660008301846117b2565b92915050565b600080600080606085870312156117f6576117f5611629565b5b60006118048782880161165c565b945050602061181587828801611692565b935050604085013567ffffffffffffffff8111156118365761183561162e565b5b611842878288016116b6565b925092505092959194509250565b600061185b826115d1565b9050919050565b61186b81611850565b82525050565b60006020820190506118866000830184611862565b92915050565b61189581611633565b82525050565b60006020820190506118b0600083018461188c565b92915050565b6000602082840312156118cc576118cb611629565b5b60006118da8482850161165c565b91505092915050565b600082825260208201905092915050565b7f43616c6c6572206e6f74204161766520504f4f4c000000000000000000000000600082015250565b600061192a6014836118e3565b9150611935826118f4565b602082019050919050565b600060208201905081810360008301526119598161191d565b9050919050565b7f496e69746961746f72206d757374206265207468697320636f6e747261637400600082015250565b6000611996601f836118e3565b91506119a182611960565b602082019050919050565b600060208201905081810360008301526119c581611989565b9050919050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611a15826119cc565b810181811067ffffffffffffffff82111715611a3457611a336119dd565b5b80604052505050565b6000611a4761161f565b9050611a538282611a0c565b919050565b600067ffffffffffffffff821115611a7357611a726119dd565b5b602082029050602081019050919050565b600080fd5b60058110611a9657600080fd5b50565b600081359050611aa881611a89565b92915050565b600062ffffff82169050919050565b611ac681611aae565b8114611ad157600080fd5b50565b600081359050611ae381611abd565b92915050565b600060c08284031215611aff57611afe611a84565b5b611b0960c0611a3d565b90506000611b1984828501611a99565b6000830152506020611b2d8482850161165c565b6020830152506040611b418482850161165c565b6040830152506060611b558482850161165c565b6060830152506080611b6984828501611ad4565b60808301525060a0611b7d84828501611692565b60a08301525092915050565b6000611b9c611b9784611a58565b611a3d565b90508083825260208201905060c08402830185811115611bbf57611bbe6116b1565b5b835b81811015611be85780611bd48882611ae9565b84526020840193505060c081019050611bc1565b5050509392505050565b600082601f830112611c0757611c066116a7565b5b8135611c17848260208601611b89565b91505092915050565b600060208284031215611c3657611c35611629565b5b600082013567ffffffffffffffff811115611c5457611c5361162e565b5b611c6084828501611bf2565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611cd282611671565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611d0457611d03611c98565b5b600182019050919050565b6000611d1a82611671565b9150611d2583611671565b9250828201905080821115611d3d57611d3c611c98565b5b92915050565b600081519050611d528161167b565b92915050565b600060208284031215611d6e57611d6d611629565b5b6000611d7c84828501611d43565b91505092915050565b7f4e6f7420656e6f75676820746f207265706179206c6f616e0000000000000000600082015250565b6000611dbb6018836118e3565b9150611dc682611d85565b602082019050919050565b60006020820190508181036000830152611dea81611dae565b9050919050565b611dfa81611671565b82525050565b6000604082019050611e15600083018561188c565b611e226020830184611df1565b9392505050565b611e32816117a6565b8114611e3d57600080fd5b50565b600081519050611e4f81611e29565b92915050565b600060208284031215611e6b57611e6a611629565b5b6000611e7984828501611e40565b91505092915050565b6000611e8d82611671565b9150611e9883611671565b9250828203905081811115611eb057611eaf611c98565b5b92915050565b6000819050919050565b6000611edb611ed6611ed184611eb6565b6115a5565b611671565b9050919050565b611eeb81611ec0565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611f2681611633565b82525050565b6000611f388383611f1d565b60208301905092915050565b6000602082019050919050565b6000611f5c82611ef1565b611f668185611efc565b9350611f7183611f0d565b8060005b83811015611fa2578151611f898882611f2c565b9750611f9483611f44565b925050600181019050611f75565b5085935050505092915050565b600060a082019050611fc46000830188611df1565b611fd16020830187611ee2565b8181036040830152611fe38186611f51565b9050611ff2606083018561188c565b611fff6080830184611df1565b9695505050505050565b600067ffffffffffffffff821115612024576120236119dd565b5b602082029050602081019050919050565b600061204861204384612009565b611a3d565b9050808382526020820190506020840283018581111561206b5761206a6116b1565b5b835b8181101561209457806120808882611d43565b84526020840193505060208101905061206d565b5050509392505050565b600082601f8301126120b3576120b26116a7565b5b81516120c3848260208601612035565b91505092915050565b6000602082840312156120e2576120e1611629565b5b600082015167ffffffffffffffff811115612100576120ff61162e565b5b61210c8482850161209e565b91505092915050565b600060208201905061212a6000830184611df1565b92915050565b600081905092915050565b50565b600061214b600083612130565b91506121568261213b565b600082019050919050565b600061216c8261213e565b9150819050919050565b7f455448207472616e7366657220746f2050524f4649545f57414c4c455420666160008201527f696c656400000000000000000000000000000000000000000000000000000000602082015250565b60006121d26024836118e3565b91506121dd82612176565b604082019050919050565b60006020820190508181036000830152612201816121c5565b9050919050565b600082825260208201905092915050565b82818337600083830152505050565b60006122348385612208565b9350612241838584612219565b61224a836119cc565b840190509392505050565b6000819050919050565b600061ffff82169050919050565b600061228861228361227e84612255565b6115a5565b61225f565b9050919050565b6122988161226d565b82525050565b600060a0820190506122b3600083018961188c565b6122c0602083018861188c565b6122cd6040830187611df1565b81810360608301526122e0818587612228565b90506122ef608083018461228f565b979650505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006123566026836118e3565b9150612361826122fa565b604082019050919050565b6000602082019050818103600083015261238581612349565b9050919050565b7f4e6f7420656e6f75676820746f6b656e496e20666f7220746865207377617000600082015250565b60006123c2601f836118e3565b91506123cd8261238c565b602082019050919050565b600060208201905081810360008301526123f1816123b5565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f556e737570706f72746564204465785479706500000000000000000000000000600082015250565b600061245d6013836118e3565b915061246882612427565b602082019050919050565b6000602082019050818103600083015261248c81612450565b9050919050565b60006040820190506124a8600083018561188c565b6124b5602083018461188c565b9392505050565b60006124d76124d26124cd84612255565b6115a5565b611671565b9050919050565b6124e7816124bc565b82525050565b6000604082019050612502600083018561188c565b61250f60208301846124de565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061254c6020836118e3565b915061255782612516565b602082019050919050565b6000602082019050818103600083015261257b8161253f565b9050919050565b61258b81611aae565b82525050565b61259a81611671565b82525050565b6125a981611585565b82525050565b610100820160008201516125c66000850182611f1d565b5060208201516125d96020850182611f1d565b5060408201516125ec6040850182612582565b5060608201516125ff6060850182611f1d565b5060808201516126126080850182612591565b5060a082015161262560a0850182612591565b5060c082015161263860c0850182612591565b5060e082015161264b60e08501826125a0565b50505050565b60006101008201905061266760008301846125af565b92915050565b600081600f0b9050919050565b600061269561269061268b84612255565b6115a5565b61266d565b9050919050565b6126a58161267a565b82525050565b60006126c66126c16126bc84611eb6565b6115a5565b61266d565b9050919050565b6126d6816126ab565b82525050565b60006080820190506126f1600083018761269c565b6126fe60208301866126cd565b61270b6040830185611df1565b6127186060830184611ee2565b95945050505050565b6000608082019050612736600083018761188c565b6127436020830186611df1565b612750604083018561188c565b61275d6060830184611ee2565b9594505050505056fea2646970667358221220fdc828b24cef1e183ffdd9fbce48319b389037bef4b66addee6105b9c2b82bea64736f6c634300081100330000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e000000000000000000000000d9e1ce17f2641f24ae83637ab66a2cca9c378b9f
Deployed Bytecode
0x6080604052600436106100955760003560e01c80638da5cb5b116100595780638da5cb5b14610174578063981949e81461019f578063ad5c4648146101ca578063d5bb0226146101f5578063f2fde38b146102205761009c565b80630542975c146100a15780631b11d0ff146100cc5780635107d61e14610109578063715018a6146101325780637535d246146101495761009c565b3661009c57005b600080fd5b3480156100ad57600080fd5b506100b6610249565b6040516100c39190611604565b60405180910390f35b3480156100d857600080fd5b506100f360048036038101906100ee919061170c565b61026d565b60405161010091906117c1565b60405180910390f35b34801561011557600080fd5b50610130600480360381019061012b91906117dc565b610980565b005b34801561013e57600080fd5b50610147610a24565b005b34801561015557600080fd5b5061015e610a38565b60405161016b9190611871565b60405180910390f35b34801561018057600080fd5b50610189610a5c565b604051610196919061189b565b60405180910390f35b3480156101ab57600080fd5b506101b4610a85565b6040516101c1919061189b565b60405180910390f35b3480156101d657600080fd5b506101df610a9d565b6040516101ec919061189b565b60405180910390f35b34801561020157600080fd5b5061020a610ab5565b604051610217919061189b565b60405180910390f35b34801561022c57600080fd5b50610247600480360381019061024291906118b6565b610ad9565b005b7f0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e81565b60007f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f490611940565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461036b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610362906119ac565b60405180910390fd5b6000838381019061037c9190611c20565b905060005b81518110156103c0576103ad8282815181106103a05761039f611c69565b5b6020026020010151610b5c565b80806103b890611cc7565b915050610381565b50600086886103cf9190611d0f565b9050808973ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161040b919061189b565b602060405180830381865afa158015610428573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044c9190611d58565b101561048d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048490611dd1565b60405180910390fd5b8873ffffffffffffffffffffffffffffffffffffffff1663095ea7b37f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e2836040518363ffffffff1660e01b81526004016104e8929190611e00565b6020604051808303816000875af1158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190611e55565b506000818a73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610568919061189b565b602060405180830381865afa158015610585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a99190611d58565b6105b39190611e82565b9050600081111561096f5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff1614610791576106308a7f000000000000000000000000d9e1ce17f2641f24ae83637ab66a2cca9c378b9f83610e12565b60608a8160008151811061064757610646611c69565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816001815181106106aa576106a9611c69565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000d9e1ce17f2641f24ae83637ab66a2cca9c378b9f73ffffffffffffffffffffffffffffffffffffffff166338ed17398360018430426040518663ffffffff1660e01b8152600401610746959493929190611faf565b6000604051808303816000875af1158015610765573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061078e91906120cc565b50505b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107e0919061189b565b602060405180830381865afa1580156107fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108219190611d58565b9050600081111561096d5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b81526004016108799190612115565b600060405180830381600087803b15801561089357600080fd5b505af11580156108a7573d6000803e3d6000fd5b50505050600073aee504d7b215f8b9d2576a1954416699f244a8fa73ffffffffffffffffffffffffffffffffffffffff16826040516108e590612161565b60006040518083038185875af1925050503d8060008114610922576040519150601f19603f3d011682016040523d82523d6000602084013e610927565b606091505b505090508061096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906121e8565b60405180910390fd5b505b505b600193505050509695505050505050565b610988610fc0565b7f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e273ffffffffffffffffffffffffffffffffffffffff166342b0b77c308686868660006040518763ffffffff1660e01b81526004016109ec9695949392919061229e565b600060405180830381600087803b158015610a0657600080fd5b505af1158015610a1a573d6000803e3d6000fd5b5050505050505050565b610a2c610fc0565b610a36600061103e565b565b7f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e281565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b73aee504d7b215f8b9d2576a1954416699f244a8fa81565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b7f000000000000000000000000d9e1ce17f2641f24ae83637ab66a2cca9c378b9f81565b610ae1610fc0565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b479061236c565b60405180910390fd5b610b598161103e565b50565b8060a00151816040015173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610b9e919061189b565b602060405180830381865afa158015610bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bdf9190611d58565b1015610c20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c17906123d8565b60405180910390fd5b610c37816040015182602001518360a00151610e12565b60006004811115610c4b57610c4a6123f8565b5b81600001516004811115610c6257610c616123f8565b5b03610c8857610c838160200151826040015183606001518460a00151611102565b610e0f565b60016004811115610c9c57610c9b6123f8565b5b81600001516004811115610cb357610cb26123f8565b5b03610cde57610cd981602001518260400151836060015184608001518560a001516112c0565b610e0e565b60026004811115610cf257610cf16123f8565b5b81600001516004811115610d0957610d086123f8565b5b03610d2f57610d2a8160200151826040015183606001518460a001516113ef565b610e0d565b60036004811115610d4357610d426123f8565b5b81600001516004811115610d5a57610d596123f8565b5b03610d8057610d7b8160200151826040015183606001518460a0015161147b565b610e0c565b600480811115610d9357610d926123f8565b5b81600001516004811115610daa57610da96123f8565b5b03610dd057610dcb8160200151826040015183606001518460a001516114f3565b610e0b565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0290612473565b60405180910390fd5b5b5b5b5b50565b60008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401610e4f929190612493565b602060405180830381865afa158015610e6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e909190611d58565b905081811015610fba578373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38460006040518363ffffffff1660e01b8152600401610ed69291906124ed565b6020604051808303816000875af1158015610ef5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f199190611e55565b508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610f75929190611e00565b6020604051808303816000875af1158015610f94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb89190611e55565b505b50505050565b610fc861157d565b73ffffffffffffffffffffffffffffffffffffffff16610fe6610a5c565b73ffffffffffffffffffffffffffffffffffffffff161461103c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103390612562565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6060838160008151811061111957611118611c69565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061116857611167611c69565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b386846040518363ffffffff1660e01b81526004016111dd929190611e00565b6020604051808303816000875af11580156111fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112209190611e55565b508473ffffffffffffffffffffffffffffffffffffffff166338ed1739836001843061012c426112509190611d0f565b6040518663ffffffff1660e01b8152600401611270959493929190611faf565b6000604051808303816000875af115801561128f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906112b891906120cc565b505050505050565b60006040518061010001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018462ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200161012c4261133b9190611d0f565b815260200183815260200160018152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090508573ffffffffffffffffffffffffffffffffffffffff1663414bf389826040518263ffffffff1660e01b81526004016113a39190612651565b6020604051808303816000875af11580156113c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e69190611d58565b50505050505050565b8373ffffffffffffffffffffffffffffffffffffffff1663a6417ed6600060018460016040518563ffffffff1660e01b815260040161143194939291906126dc565b6020604051808303816000875af1158015611450573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114749190611d58565b5050505050565b8373ffffffffffffffffffffffffffffffffffffffff16638119c0656040518163ffffffff1660e01b81526004016020604051808303816000875af11580156114c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ec9190611d58565b5050505050565b8373ffffffffffffffffffffffffffffffffffffffff16637409e2eb84838560016040518563ffffffff1660e01b81526004016115339493929190612721565b6020604051808303816000875af1158015611552573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115769190611d58565b5050505050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006115ca6115c56115c084611585565b6115a5565b611585565b9050919050565b60006115dc826115af565b9050919050565b60006115ee826115d1565b9050919050565b6115fe816115e3565b82525050565b600060208201905061161960008301846115f5565b92915050565b6000604051905090565b600080fd5b600080fd5b600061163e82611585565b9050919050565b61164e81611633565b811461165957600080fd5b50565b60008135905061166b81611645565b92915050565b6000819050919050565b61168481611671565b811461168f57600080fd5b50565b6000813590506116a18161167b565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126116cc576116cb6116a7565b5b8235905067ffffffffffffffff8111156116e9576116e86116ac565b5b602083019150836001820283011115611705576117046116b1565b5b9250929050565b60008060008060008060a0878903121561172957611728611629565b5b600061173789828a0161165c565b965050602061174889828a01611692565b955050604061175989828a01611692565b945050606061176a89828a0161165c565b935050608087013567ffffffffffffffff81111561178b5761178a61162e565b5b61179789828a016116b6565b92509250509295509295509295565b60008115159050919050565b6117bb816117a6565b82525050565b60006020820190506117d660008301846117b2565b92915050565b600080600080606085870312156117f6576117f5611629565b5b60006118048782880161165c565b945050602061181587828801611692565b935050604085013567ffffffffffffffff8111156118365761183561162e565b5b611842878288016116b6565b925092505092959194509250565b600061185b826115d1565b9050919050565b61186b81611850565b82525050565b60006020820190506118866000830184611862565b92915050565b61189581611633565b82525050565b60006020820190506118b0600083018461188c565b92915050565b6000602082840312156118cc576118cb611629565b5b60006118da8482850161165c565b91505092915050565b600082825260208201905092915050565b7f43616c6c6572206e6f74204161766520504f4f4c000000000000000000000000600082015250565b600061192a6014836118e3565b9150611935826118f4565b602082019050919050565b600060208201905081810360008301526119598161191d565b9050919050565b7f496e69746961746f72206d757374206265207468697320636f6e747261637400600082015250565b6000611996601f836118e3565b91506119a182611960565b602082019050919050565b600060208201905081810360008301526119c581611989565b9050919050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611a15826119cc565b810181811067ffffffffffffffff82111715611a3457611a336119dd565b5b80604052505050565b6000611a4761161f565b9050611a538282611a0c565b919050565b600067ffffffffffffffff821115611a7357611a726119dd565b5b602082029050602081019050919050565b600080fd5b60058110611a9657600080fd5b50565b600081359050611aa881611a89565b92915050565b600062ffffff82169050919050565b611ac681611aae565b8114611ad157600080fd5b50565b600081359050611ae381611abd565b92915050565b600060c08284031215611aff57611afe611a84565b5b611b0960c0611a3d565b90506000611b1984828501611a99565b6000830152506020611b2d8482850161165c565b6020830152506040611b418482850161165c565b6040830152506060611b558482850161165c565b6060830152506080611b6984828501611ad4565b60808301525060a0611b7d84828501611692565b60a08301525092915050565b6000611b9c611b9784611a58565b611a3d565b90508083825260208201905060c08402830185811115611bbf57611bbe6116b1565b5b835b81811015611be85780611bd48882611ae9565b84526020840193505060c081019050611bc1565b5050509392505050565b600082601f830112611c0757611c066116a7565b5b8135611c17848260208601611b89565b91505092915050565b600060208284031215611c3657611c35611629565b5b600082013567ffffffffffffffff811115611c5457611c5361162e565b5b611c6084828501611bf2565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611cd282611671565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611d0457611d03611c98565b5b600182019050919050565b6000611d1a82611671565b9150611d2583611671565b9250828201905080821115611d3d57611d3c611c98565b5b92915050565b600081519050611d528161167b565b92915050565b600060208284031215611d6e57611d6d611629565b5b6000611d7c84828501611d43565b91505092915050565b7f4e6f7420656e6f75676820746f207265706179206c6f616e0000000000000000600082015250565b6000611dbb6018836118e3565b9150611dc682611d85565b602082019050919050565b60006020820190508181036000830152611dea81611dae565b9050919050565b611dfa81611671565b82525050565b6000604082019050611e15600083018561188c565b611e226020830184611df1565b9392505050565b611e32816117a6565b8114611e3d57600080fd5b50565b600081519050611e4f81611e29565b92915050565b600060208284031215611e6b57611e6a611629565b5b6000611e7984828501611e40565b91505092915050565b6000611e8d82611671565b9150611e9883611671565b9250828203905081811115611eb057611eaf611c98565b5b92915050565b6000819050919050565b6000611edb611ed6611ed184611eb6565b6115a5565b611671565b9050919050565b611eeb81611ec0565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611f2681611633565b82525050565b6000611f388383611f1d565b60208301905092915050565b6000602082019050919050565b6000611f5c82611ef1565b611f668185611efc565b9350611f7183611f0d565b8060005b83811015611fa2578151611f898882611f2c565b9750611f9483611f44565b925050600181019050611f75565b5085935050505092915050565b600060a082019050611fc46000830188611df1565b611fd16020830187611ee2565b8181036040830152611fe38186611f51565b9050611ff2606083018561188c565b611fff6080830184611df1565b9695505050505050565b600067ffffffffffffffff821115612024576120236119dd565b5b602082029050602081019050919050565b600061204861204384612009565b611a3d565b9050808382526020820190506020840283018581111561206b5761206a6116b1565b5b835b8181101561209457806120808882611d43565b84526020840193505060208101905061206d565b5050509392505050565b600082601f8301126120b3576120b26116a7565b5b81516120c3848260208601612035565b91505092915050565b6000602082840312156120e2576120e1611629565b5b600082015167ffffffffffffffff811115612100576120ff61162e565b5b61210c8482850161209e565b91505092915050565b600060208201905061212a6000830184611df1565b92915050565b600081905092915050565b50565b600061214b600083612130565b91506121568261213b565b600082019050919050565b600061216c8261213e565b9150819050919050565b7f455448207472616e7366657220746f2050524f4649545f57414c4c455420666160008201527f696c656400000000000000000000000000000000000000000000000000000000602082015250565b60006121d26024836118e3565b91506121dd82612176565b604082019050919050565b60006020820190508181036000830152612201816121c5565b9050919050565b600082825260208201905092915050565b82818337600083830152505050565b60006122348385612208565b9350612241838584612219565b61224a836119cc565b840190509392505050565b6000819050919050565b600061ffff82169050919050565b600061228861228361227e84612255565b6115a5565b61225f565b9050919050565b6122988161226d565b82525050565b600060a0820190506122b3600083018961188c565b6122c0602083018861188c565b6122cd6040830187611df1565b81810360608301526122e0818587612228565b90506122ef608083018461228f565b979650505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006123566026836118e3565b9150612361826122fa565b604082019050919050565b6000602082019050818103600083015261238581612349565b9050919050565b7f4e6f7420656e6f75676820746f6b656e496e20666f7220746865207377617000600082015250565b60006123c2601f836118e3565b91506123cd8261238c565b602082019050919050565b600060208201905081810360008301526123f1816123b5565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f556e737570706f72746564204465785479706500000000000000000000000000600082015250565b600061245d6013836118e3565b915061246882612427565b602082019050919050565b6000602082019050818103600083015261248c81612450565b9050919050565b60006040820190506124a8600083018561188c565b6124b5602083018461188c565b9392505050565b60006124d76124d26124cd84612255565b6115a5565b611671565b9050919050565b6124e7816124bc565b82525050565b6000604082019050612502600083018561188c565b61250f60208301846124de565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061254c6020836118e3565b915061255782612516565b602082019050919050565b6000602082019050818103600083015261257b8161253f565b9050919050565b61258b81611aae565b82525050565b61259a81611671565b82525050565b6125a981611585565b82525050565b610100820160008201516125c66000850182611f1d565b5060208201516125d96020850182611f1d565b5060408201516125ec6040850182612582565b5060608201516125ff6060850182611f1d565b5060808201516126126080850182612591565b5060a082015161262560a0850182612591565b5060c082015161263860c0850182612591565b5060e082015161264b60e08501826125a0565b50505050565b60006101008201905061266760008301846125af565b92915050565b600081600f0b9050919050565b600061269561269061268b84612255565b6115a5565b61266d565b9050919050565b6126a58161267a565b82525050565b60006126c66126c16126bc84611eb6565b6115a5565b61266d565b9050919050565b6126d6816126ab565b82525050565b60006080820190506126f1600083018761269c565b6126fe60208301866126cd565b61270b6040830185611df1565b6127186060830184611ee2565b95945050505050565b6000608082019050612736600083018761188c565b6127436020830186611df1565b612750604083018561188c565b61275d6060830184611ee2565b9594505050505056fea2646970667358221220fdc828b24cef1e183ffdd9fbce48319b389037bef4b66addee6105b9c2b82bea64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e000000000000000000000000d9e1ce17f2641f24ae83637ab66a2cca9c378b9f
-----Decoded View---------------
Arg [0] : _addressesProvider (address): 0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e
Arg [1] : _uniswapV2Router (address): 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e
Arg [1] : 000000000000000000000000d9e1ce17f2641f24ae83637ab66a2cca9c378b9f
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
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.