Polygon Sponsored slots available. Book your slot here!
Overview
POL Balance
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
AAVEYieldImplementation
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: CC0-1.0 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/IAToken.sol"; import "../interfaces/ILendingPool.sol"; import "../interfaces/ILegacyERC20.sol"; import "../interfaces/IYieldImplementation.sol"; /** * @title AAVEYieldImplementation * @dev This contract contains token-specific logic for investing ERC20 tokens into AAVE V2/V3 protocol. */ contract AAVEYieldImplementation is IYieldImplementation { using SafeERC20 for IERC20; using SafeERC20 for IAToken; uint256[200] internal __gap__; mapping(address => address) internal interestToken; ILendingPool public immutable lendingPool; constructor(address _lendingPoolAddress) { lendingPool = ILendingPool(_lendingPoolAddress); } /** * @dev Initializes yield earning for the particular token through AAVE. * @param _token address of the invested token contract. */ function initialize(address _token) external { uint256[12] memory reserveData = lendingPool.getReserveData(_token); // 7th slot for AAVE v2, 8th slot for AAVE v3 address aToken = address(uint160(reserveData[reserveData[7] <= type(uint16).max ? 8 : 7])); require(IAToken(aToken).UNDERLYING_ASSET_ADDRESS() == _token); interestToken[_token] = aToken; // SafeERC20.safeApprove does not work here in case of possible interest reinitialization, // since it does not allow positive->positive allowance change. However, it would be safe to make such change here. ILegacyERC20(_token).approve(address(lendingPool), type(uint256).max); } /** * @dev Tells the current amount of underlying tokens that was invested into the AAVE protocol. * @param _token address of the underlying token. * @return currently invested value. */ function investedAmount(address _token) external view override returns (uint256) { return IAToken(interestToken[_token]).balanceOf(address(this)); } /** * @dev Invests the given amount of tokens to the AAVE protocol. * Converts _amount of TOKENs into aTOKENs. * @param _token address of the invested token contract. * @param _amount amount of tokens to invest. */ function invest(address _token, uint256 _amount) external override { lendingPool.deposit(_token, _amount, address(this), 0); } /** * @dev Withdraws at least _amount of tokens from the AAVE protocol. * Converts aTOKENs into _amount of TOKENs. * @param _token address of the invested token contract. * @param _amount minimal amount of tokens to withdraw. */ function withdraw(address _token, uint256 _amount) external override { uint256 balance = IERC20(_token).balanceOf(address(this)); lendingPool.withdraw(_token, _amount, address(this)); uint256 redeemed = IERC20(_token).balanceOf(address(this)) - balance; require(redeemed >= _amount); } function farmExtra(address _token, address _to, bytes calldata _data) external returns (bytes memory) { revert("not supported"); } /** * @dev Redeems full token balance from the yield earning protocol, effectively disabling it. * @param _token address of the invested token contract, for which interest should be disabled. */ function exit(address _token) external { address aToken = interestToken[_token]; uint256 aTokenBalance = IAToken(aToken).balanceOf(address(this)); if (aTokenBalance > 0) { // redeem all aTokens // it is safe to specify uint256(-1) as max amount of redeemed tokens // since the withdraw method of the pool contract will return the entire balance lendingPool.withdraw(_token, type(uint256).max, address(this)); } IERC20(_token).safeApprove(address(lendingPool), 0); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: CC0-1.0 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IAToken is IERC20 { // solhint-disable-next-line func-name-mixedcase function UNDERLYING_ASSET_ADDRESS() external returns (address); }
// SPDX-License-Identifier: CC0-1.0 pragma solidity 0.8.15; interface ILegacyERC20 { function approve(address spender, uint256 amount) external; // returns (bool); function transfer(address to, uint256 amount) external; // returns (bool); }
// SPDX-License-Identifier: CC0-1.0 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface ILendingPool { function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external; function withdraw(address asset, uint256 amount, address to) external returns (uint256); function borrow( address asset, uint256 amount, uint256 interestRateMode, uint16 referralCode, address onBehalfOf ) external returns (uint256); function repay(address asset, uint256 amount, uint256 rateMode, address onBehalfOf) external returns (uint256); // workaround to omit usage of abicoder v2 // see real signature at https://github.com/aave/protocol-v2/blob/master/contracts/protocol/libraries/types/DataTypes.sol function getReserveData(address asset) external returns (uint256[12] memory); }
// SPDX-License-Identifier: CC0-1.0 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IYieldImplementation { function initialize(address _token) external; function exit(address _token) external; function invest(address _token, uint256 _amount) external; function withdraw(address _token, uint256 _amount) external; function farmExtra(address _token, address _to, bytes calldata _data) external returns (bytes memory); function investedAmount(address _token) external returns (uint256); }
{ "remappings": [ "@gnosis/=lib/@gnosis/", "@gnosis/auction/=lib/@gnosis/auction/contracts/", "@openzeppelin/=lib/@openzeppelin/contracts/", "@openzeppelin/contracts/=lib/@openzeppelin/contracts/contracts/", "@uniswap/=lib/@uniswap/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_lendingPoolAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"farmExtra","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"investedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lendingPool","outputs":[{"internalType":"contract ILendingPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b50604051610e9d380380610e9d83398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051610de96100b46000396000818160870152818161020601528181610284015281816102e201528181610364015281816104c901526106940152610de96000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063c4d66de81161005b578063c4d66de8146100ee578063cff7744414610101578063d594930f14610122578063f3fef3a31461014257600080fd5b8063a59a997314610082578063b42652e9146100c6578063b9b8c246146100db575b600080fd5b6100a97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100d96100d4366004610b2a565b610155565b005b6100d96100e9366004610b4e565b6102af565b6100d96100fc366004610b2a565b610342565b61011461010f366004610b2a565b610539565b6040519081526020016100bd565b610135610130366004610b7a565b6105ba565b6040516100bd9190610c64565b6100d9610150366004610b4e565b6105fa565b6001600160a01b03818116600090815260c860205260408082205490516370a0823160e01b815230600482015292169182906370a0823190602401602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610c77565b9050801561027557604051631a4ca37b60e21b81526001600160a01b03848116600483015260001960248301523060448301527f000000000000000000000000000000000000000000000000000000000000000016906369328dec906064016020604051808303816000875af115801561024f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102739190610c77565b505b6102aa6001600160a01b0384167f00000000000000000000000000000000000000000000000000000000000000006000610790565b505050565b60405163e8eda9df60e01b81526001600160a01b03838116600483015260248201839052306044830152600060648301527f0000000000000000000000000000000000000000000000000000000000000000169063e8eda9df90608401600060405180830381600087803b15801561032657600080fd5b505af115801561033a573d6000803e3d6000fd5b505050505050565b6040516335ea6a7560e01b81526001600160a01b0382811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906335ea6a7590602401610180604051808303816000875af11580156103b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d49190610c90565b905060008161ffff816007602002015111156103f15760076103f4565b60085b60ff16600c811061040757610407610d1d565b60200201519050826001600160a01b0316816001600160a01b031663b16a19de6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610458573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047c9190610d33565b6001600160a01b03161461048f57600080fd5b6001600160a01b03838116600081815260c860205260409081902080546001600160a01b0319168585161790555163095ea7b360e01b81527f0000000000000000000000000000000000000000000000000000000000000000909216600483015260001960248301529063095ea7b390604401600060405180830381600087803b15801561051c57600080fd5b505af1158015610530573d6000803e3d6000fd5b50505050505050565b6001600160a01b03818116600090815260c860205260408082205490516370a0823160e01b8152306004820152919216906370a0823190602401602060405180830381865afa158015610590573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b49190610c77565b92915050565b60405162461bcd60e51b815260206004820152600d60248201526c1b9bdd081cdd5c1c1bdc9d1959609a1b60448201526060906064015b60405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610641573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106659190610c77565b604051631a4ca37b60e21b81526001600160a01b038581166004830152602482018590523060448301529192507f0000000000000000000000000000000000000000000000000000000000000000909116906369328dec906064016020604051808303816000875af11580156106df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107039190610c77565b506040516370a0823160e01b815230600482015260009082906001600160a01b038616906370a0823190602401602060405180830381865afa15801561074d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107719190610c77565b61077b9190610d50565b90508281101561078a57600080fd5b50505050565b80158061080a5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108089190610c77565b155b6108755760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b60648201526084016105f1565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663095ea7b360e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526102aa92869291600091610905918516908490610982565b8051909150156102aa57808060200190518101906109239190610d75565b6102aa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105f1565b60606109918484600085610999565b949350505050565b6060824710156109fa5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105f1565b600080866001600160a01b03168587604051610a169190610d97565b60006040518083038185875af1925050503d8060008114610a53576040519150601f19603f3d011682016040523d82523d6000602084013e610a58565b606091505b5091509150610a6987838387610a74565b979650505050505050565b60608315610ae3578251600003610adc576001600160a01b0385163b610adc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105f1565b5081610991565b6109918383815115610af85781518083602001fd5b8060405162461bcd60e51b81526004016105f19190610c64565b6001600160a01b0381168114610b2757600080fd5b50565b600060208284031215610b3c57600080fd5b8135610b4781610b12565b9392505050565b60008060408385031215610b6157600080fd5b8235610b6c81610b12565b946020939093013593505050565b60008060008060608587031215610b9057600080fd5b8435610b9b81610b12565b93506020850135610bab81610b12565b9250604085013567ffffffffffffffff80821115610bc857600080fd5b818701915087601f830112610bdc57600080fd5b813581811115610beb57600080fd5b886020828501011115610bfd57600080fd5b95989497505060200194505050565b60005b83811015610c27578181015183820152602001610c0f565b8381111561078a5750506000910152565b60008151808452610c50816020860160208601610c0c565b601f01601f19169290920160200192915050565b602081526000610b476020830184610c38565b600060208284031215610c8957600080fd5b5051919050565b6000610180808385031215610ca457600080fd5b83601f840112610cb357600080fd5b60405181810181811067ffffffffffffffff82111715610ce357634e487b7160e01b600052604160045260246000fd5b604052908301908085831115610cf857600080fd5b845b83811015610d12578051825260209182019101610cfa565b509095945050505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610d4557600080fd5b8151610b4781610b12565b600082821015610d7057634e487b7160e01b600052601160045260246000fd5b500390565b600060208284031215610d8757600080fd5b81518015158114610b4757600080fd5b60008251610da9818460208701610c0c565b919091019291505056fea26469706673582212208dd3d5362a9bd114e100c25040cc1444b71cfcea6a2483dc0d01b856fb3aaf3564736f6c634300080f0033000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063c4d66de81161005b578063c4d66de8146100ee578063cff7744414610101578063d594930f14610122578063f3fef3a31461014257600080fd5b8063a59a997314610082578063b42652e9146100c6578063b9b8c246146100db575b600080fd5b6100a97f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100d96100d4366004610b2a565b610155565b005b6100d96100e9366004610b4e565b6102af565b6100d96100fc366004610b2a565b610342565b61011461010f366004610b2a565b610539565b6040519081526020016100bd565b610135610130366004610b7a565b6105ba565b6040516100bd9190610c64565b6100d9610150366004610b4e565b6105fa565b6001600160a01b03818116600090815260c860205260408082205490516370a0823160e01b815230600482015292169182906370a0823190602401602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610c77565b9050801561027557604051631a4ca37b60e21b81526001600160a01b03848116600483015260001960248301523060448301527f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad16906369328dec906064016020604051808303816000875af115801561024f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102739190610c77565b505b6102aa6001600160a01b0384167f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad6000610790565b505050565b60405163e8eda9df60e01b81526001600160a01b03838116600483015260248201839052306044830152600060648301527f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad169063e8eda9df90608401600060405180830381600087803b15801561032657600080fd5b505af115801561033a573d6000803e3d6000fd5b505050505050565b6040516335ea6a7560e01b81526001600160a01b0382811660048301526000917f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad909116906335ea6a7590602401610180604051808303816000875af11580156103b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d49190610c90565b905060008161ffff816007602002015111156103f15760076103f4565b60085b60ff16600c811061040757610407610d1d565b60200201519050826001600160a01b0316816001600160a01b031663b16a19de6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610458573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047c9190610d33565b6001600160a01b03161461048f57600080fd5b6001600160a01b03838116600081815260c860205260409081902080546001600160a01b0319168585161790555163095ea7b360e01b81527f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad909216600483015260001960248301529063095ea7b390604401600060405180830381600087803b15801561051c57600080fd5b505af1158015610530573d6000803e3d6000fd5b50505050505050565b6001600160a01b03818116600090815260c860205260408082205490516370a0823160e01b8152306004820152919216906370a0823190602401602060405180830381865afa158015610590573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b49190610c77565b92915050565b60405162461bcd60e51b815260206004820152600d60248201526c1b9bdd081cdd5c1c1bdc9d1959609a1b60448201526060906064015b60405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610641573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106659190610c77565b604051631a4ca37b60e21b81526001600160a01b038581166004830152602482018590523060448301529192507f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad909116906369328dec906064016020604051808303816000875af11580156106df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107039190610c77565b506040516370a0823160e01b815230600482015260009082906001600160a01b038616906370a0823190602401602060405180830381865afa15801561074d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107719190610c77565b61077b9190610d50565b90508281101561078a57600080fd5b50505050565b80158061080a5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108089190610c77565b155b6108755760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b60648201526084016105f1565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663095ea7b360e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526102aa92869291600091610905918516908490610982565b8051909150156102aa57808060200190518101906109239190610d75565b6102aa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105f1565b60606109918484600085610999565b949350505050565b6060824710156109fa5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105f1565b600080866001600160a01b03168587604051610a169190610d97565b60006040518083038185875af1925050503d8060008114610a53576040519150601f19603f3d011682016040523d82523d6000602084013e610a58565b606091505b5091509150610a6987838387610a74565b979650505050505050565b60608315610ae3578251600003610adc576001600160a01b0385163b610adc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105f1565b5081610991565b6109918383815115610af85781518083602001fd5b8060405162461bcd60e51b81526004016105f19190610c64565b6001600160a01b0381168114610b2757600080fd5b50565b600060208284031215610b3c57600080fd5b8135610b4781610b12565b9392505050565b60008060408385031215610b6157600080fd5b8235610b6c81610b12565b946020939093013593505050565b60008060008060608587031215610b9057600080fd5b8435610b9b81610b12565b93506020850135610bab81610b12565b9250604085013567ffffffffffffffff80821115610bc857600080fd5b818701915087601f830112610bdc57600080fd5b813581811115610beb57600080fd5b886020828501011115610bfd57600080fd5b95989497505060200194505050565b60005b83811015610c27578181015183820152602001610c0f565b8381111561078a5750506000910152565b60008151808452610c50816020860160208601610c0c565b601f01601f19169290920160200192915050565b602081526000610b476020830184610c38565b600060208284031215610c8957600080fd5b5051919050565b6000610180808385031215610ca457600080fd5b83601f840112610cb357600080fd5b60405181810181811067ffffffffffffffff82111715610ce357634e487b7160e01b600052604160045260246000fd5b604052908301908085831115610cf857600080fd5b845b83811015610d12578051825260209182019101610cfa565b509095945050505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610d4557600080fd5b8151610b4781610b12565b600082821015610d7057634e487b7160e01b600052601160045260246000fd5b500390565b600060208284031215610d8757600080fd5b81518015158114610b4757600080fd5b60008251610da9818460208701610c0c565b919091019291505056fea26469706673582212208dd3d5362a9bd114e100c25040cc1444b71cfcea6a2483dc0d01b856fb3aaf3564736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad
-----Decoded View---------------
Arg [0] : _lendingPoolAddress (address): 0x794a61358D6845594F94dc1DB02A252b5b4814aD
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.