Source Code
Overview
S Balance
More Info
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x3140E063...fBC5E8410 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
AToken
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';import {SafeERC20} from '../../dependencies/openzeppelin/contracts/SafeERC20.sol';import {ILendingPool} from '../../interfaces/ILendingPool.sol';import {IAToken} from '../../interfaces/IAToken.sol';import {WadRayMath} from '../libraries/math/WadRayMath.sol';import {Errors} from '../libraries/helpers/Errors.sol';import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol';import {IncentivizedERC20} from './IncentivizedERC20.sol';import {IAaveIncentivesController} from '../../interfaces/IAaveIncentivesController.sol';import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';/*** @title Aave ERC20 AToken* @dev Implementation of the interest bearing token for the Aave protocol* @author Aave*/contract AToken isVersionedInitializable,IncentivizedERC20('ATOKEN_IMPL', 'ATOKEN_IMPL', 0),IAToken{using WadRayMath for uint256;using SafeERC20 for IERC20;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;/*** @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* ====*/function isContract(address account) internal view returns (bool) {// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
1234567891011121314151617181920212223// SPDX-License-Identifier: MITpragma solidity 0.7.6;/** @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 GSN 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 payable) {return msg.sender;}function _msgData() internal view virtual returns (bytes memory) {this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691return msg.data;}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;/*** @dev Interface of the ERC20 standard as defined in the EIP.*/interface IERC20 {/*** @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 `recipient`.** Returns a boolean value indicating whether the operation succeeded.** Emits a {Transfer} event.*/function transfer(address recipient, uint256 amount) external returns (bool);
123456789101112// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;import {IERC20} from './IERC20.sol';interface IERC20Detailed is IERC20 {function name() external view returns (string memory);function symbol() external view returns (string memory);function decimals() external view returns (uint8);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.7.6;import {IERC20} from './IERC20.sol';import {SafeMath} from './SafeMath.sol';import {Address} from './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 SafeMath for uint256;using Address for address;function safeTransfer(IERC20 token,address to,uint256 value) internal {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;/*** @dev Wrappers over Solidity's arithmetic operations with added overflow* checks.** Arithmetic operations in Solidity wrap on overflow. This can easily result* in bugs, because programmers usually assume that an overflow raises an* error, which is the standard behavior in high level programming languages.* `SafeMath` restores this intuition by reverting the transaction when an* operation overflows.** Using this library instead of the unchecked operations eliminates an entire* class of bugs, so it's recommended to use it always.*/library SafeMath {/*** @dev Returns the addition of two unsigned integers, reverting on* overflow.** Counterpart to Solidity's `+` operator.** Requirements:* - Addition cannot overflow.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;pragma experimental ABIEncoderV2;interface IAaveIncentivesController {event RewardsAccrued(address indexed user, uint256 amount);event RewardsClaimed(address indexed user, address indexed to, uint256 amount);event RewardsClaimed(address indexed user,address indexed to,address indexed claimer,uint256 amount);event ClaimerSet(address indexed user, address indexed claimer);/** @dev Returns the configuration of the distribution for a certain asset* @param asset The address of the reference asset of the distribution* @return The asset index, the emission per second and the last updated timestamp**/function getAssetData(address asset)externalview
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';import {IScaledBalanceToken} from './IScaledBalanceToken.sol';import {IInitializableAToken} from './IInitializableAToken.sol';import {IAaveIncentivesController} from './IAaveIncentivesController.sol';interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken {/*** @dev Emitted after the mint action* @param from The address performing the mint* @param value The amount being* @param index The new liquidity index of the reserve**/event Mint(address indexed from, uint256 value, uint256 index);/*** @dev Mints `amount` aTokens to `user`* @param user The address receiving the minted tokens* @param amount The amount of tokens getting minted* @param index The new liquidity index of the reserve* @return `true` if the the previous balance of the user was 0*/function mint(address user,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;import {ILendingPool} from './ILendingPool.sol';import {IAaveIncentivesController} from './IAaveIncentivesController.sol';/*** @title IInitializableAToken* @notice Interface for the initialize function on AToken* @author Aave**/interface IInitializableAToken {/*** @dev Emitted when an aToken is initialized* @param underlyingAsset The address of the underlying asset* @param pool The address of the associated lending pool* @param treasury The address of the treasury* @param incentivesController The address of the incentives controller for this aToken* @param aTokenDecimals the decimals of the underlying* @param aTokenName the name of the aToken* @param aTokenSymbol the symbol of the aToken* @param params A set of encoded parameters for additional initialization**/event Initialized(address indexed underlyingAsset,address indexed pool,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;pragma experimental ABIEncoderV2;import {ILendingPoolAddressesProvider} from './ILendingPoolAddressesProvider.sol';import {DataTypes} from '../protocol/libraries/types/DataTypes.sol';interface ILendingPool {/*** @dev Emitted on deposit()* @param reserve The address of the underlying asset of the reserve* @param user The address initiating the deposit* @param onBehalfOf The beneficiary of the deposit, receiving the aTokens* @param amount The amount deposited* @param referral The referral code used**/event Deposit(address indexed reserve,address user,address indexed onBehalfOf,uint256 amount,uint16 indexed referral);/*** @dev Emitted on withdraw()
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;/*** @title LendingPoolAddressesProvider contract* @dev Main registry of addresses part of or connected to the protocol, including permissioned roles* - Acting also as factory of proxies and admin of those, so with right to change its implementations* - Owned by the Aave Governance* @author Aave**/interface ILendingPoolAddressesProvider {event MarketIdSet(string newMarketId);event LendingPoolUpdated(address indexed newAddress);event ConfigurationAdminUpdated(address indexed newAddress);event EmergencyAdminUpdated(address indexed newAddress);event LendingPoolConfiguratorUpdated(address indexed newAddress);event LendingPoolCollateralManagerUpdated(address indexed newAddress);event PriceOracleUpdated(address indexed newAddress);event LendingRateOracleUpdated(address indexed newAddress);event ProxyCreated(bytes32 id, address indexed newAddress);event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy);function getMarketId() external view returns (string memory);function setMarketId(string calldata marketId) external;
1234567891011121314151617// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;/************@title IPriceOracle interface@notice Interface for the Aave price oracle.*/interface IPriceOracle {/***********@dev returns the asset price in ETH*/function getAssetPrice(address asset) external view returns (uint256);/***********@dev sets the asset price, in wei*/function setAssetPrice(address asset, uint256 price) external;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;interface IScaledBalanceToken {/*** @dev Returns the scaled balance of the user. The scaled balance is the sum of all the* updated stored balance divided by the reserve's liquidity index at the moment of the update* @param user The user whose balance is calculated* @return The scaled balance of the user**/function scaledBalanceOf(address user) external view returns (uint256);/*** @dev Returns the scaled balance of the user and the scaled total supply.* @param user The address of the user* @return The scaled balance of the user* @return The scaled balance and the scaled total supply**/function getScaledUserBalanceAndSupply(address user) external view returns (uint256, uint256);/*** @dev Returns the scaled total supply of the variable debt token. Represents sum(debt/index)* @return The scaled total supply**/function scaledTotalSupply() external view returns (uint256);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;/*** @title VersionedInitializable** @dev Helper contract to implement initializer functions. To use it, replace* the constructor with a function that has the `initializer` modifier.* WARNING: Unlike constructors, initializer functions must be manually* invoked. This applies both to deploying an Initializable contract, as well* as extending an Initializable contract via inheritance.* WARNING: When used with inheritance, manual care must be taken to not invoke* a parent initializer twice, or ensure that all initializers are idempotent,* because this is not dealt with automatically as with constructors.** @author Aave, inspired by the OpenZeppelin Initializable contract*/abstract contract VersionedInitializable {/*** @dev Indicates that the contract has been initialized.*/uint256 private lastInitializedRevision = 0;/*** @dev Indicates that the contract is in the process of being initialized.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;/*** @title Errors library* @author Aave* @notice Defines the error messages emitted by the different contracts of the Aave protocol* @dev Error messages prefix glossary:* - VL = ValidationLogic* - MATH = Math libraries* - CT = Common errors between tokens (AToken, VariableDebtToken and StableDebtToken)* - AT = AToken* - SDT = StableDebtToken* - VDT = VariableDebtToken* - LP = LendingPool* - LPAPR = LendingPoolAddressesProviderRegistry* - LPC = LendingPoolConfiguration* - RL = ReserveLogic* - LPCM = LendingPoolCollateralManager* - P = Pausable*/library Errors {//common errorsstring public constant CALLER_NOT_POOL_ADMIN = '33'; // 'The caller must be the pool admin'string public constant BORROW_ALLOWANCE_NOT_ENOUGH = '59'; // User borrows on behalf, but allowance are too small
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;import {Errors} from '../helpers/Errors.sol';/*** @title WadRayMath library* @author Aave* @dev Provides mul and div function for wads (decimal numbers with 18 digits precision) and rays (decimals with 27 digits)**/library WadRayMath {uint256 internal constant WAD = 1e18;uint256 internal constant halfWAD = WAD / 2;uint256 internal constant RAY = 1e27;uint256 internal constant halfRAY = RAY / 2;uint256 internal constant WAD_RAY_RATIO = 1e9;/*** @return One ray, 1e27**/function ray() internal pure returns (uint256) {return RAY;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;library DataTypes {// refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.struct ReserveData {//stores the reserve configurationReserveConfigurationMap configuration;//the liquidity index. Expressed in rayuint128 liquidityIndex;//variable borrow index. Expressed in rayuint128 variableBorrowIndex;//the current supply rate. Expressed in rayuint128 currentLiquidityRate;//the current variable borrow rate. Expressed in rayuint128 currentVariableBorrowRate;//the current stable borrow rate. Expressed in rayuint128 currentStableBorrowRate;uint40 lastUpdateTimestamp;//tokens addressesaddress aTokenAddress;address stableDebtTokenAddress;address variableDebtTokenAddress;//address of the interest rate strategyaddress interestRateStrategyAddress;//the id of the reserve. Represents the position in the list of the active reserves
1234567891011121314151617181920212223242526// SPDX-License-Identifier: agpl-3.0pragma solidity 0.7.6;import {Context} from '../../dependencies/openzeppelin/contracts/Context.sol';import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';import {IERC20Detailed} from '../../dependencies/openzeppelin/contracts/IERC20Detailed.sol';import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';import {IAaveIncentivesController} from '../../interfaces/IAaveIncentivesController.sol';import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';import {IPriceOracle} from '../../interfaces/IPriceOracle.sol';import {ILendingPool} from '../../interfaces/ILendingPool.sol';/*** @title ERC20* @notice Basic ERC20 implementation* @author Aave, inspired by the Openzeppelin ERC20 implementation**/abstract contract IncentivizedERC20 is Context, IERC20, IERC20Detailed {using SafeMath for uint256;mapping(address => uint256) internal _balances;mapping(address => mapping(address => uint256)) private _allowances;uint256 internal _totalSupply;string private _name;string private _symbol;
12345678910111213141516171819202122{"optimizer": {"enabled": true,"runs": 2000},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}},"metadata": {"useLiteralContent": true},"libraries": {}}
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"BalanceTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"underlyingAsset","type":"address"},{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address","name":"treasury","type":"address"},{"indexed":false,"internalType":"address","name":"incentivesController","type":"address"},{"indexed":false,"internalType":"uint8","name":"aTokenDecimals","type":"uint8"},{"indexed":false,"internalType":"string","name":"aTokenName","type":"string"},{"indexed":false,"internalType":"string","name":"aTokenSymbol","type":"string"},{"indexed":false,"internalType":"bytes","name":"params","type":"bytes"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ATOKEN_REVISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EIP712_REVISION","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POOL","outputs":[{"internalType":"contract ILendingPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RESERVE_TREASURY_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNDERLYING_ASSET_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"receiverOfUnderlying","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAssetPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getIncentivesController","outputs":[{"internalType":"contract IAaveIncentivesController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getScaledUserBalanceAndSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"handleRepayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ILendingPool","name":"pool","type":"address"},{"internalType":"address","name":"treasury","type":"address"},{"internalType":"address","name":"underlyingAsset","type":"address"},{"internalType":"contract IAaveIncentivesController","name":"incentivesController","type":"address"},{"internalType":"uint8","name":"aTokenDecimals","type":"uint8"},{"internalType":"string","name":"aTokenName","type":"string"},{"internalType":"string","name":"aTokenSymbol","type":"string"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"mintToTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"scaledBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"scaledTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferOnLiquidation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferUnderlyingTo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c806375d264131161010f578063b16a19de116100a2578063d7020d0a11610071578063d7020d0a14610706578063dd62ed3e14610742578063e54f088014610770578063f866c31914610778576101f0565b8063b16a19de1461067f578063b1bf962d14610687578063b9844d8d1461068f578063d505accf146106b5576101f0565b806395d89b41116100de57806395d89b4114610617578063a457c2d71461061f578063a9059cbb1461064b578063ae16733514610677576101f0565b806375d26413146105b857806378160376146105c05780637df5bd3b146105c857806388dd91a1146105eb576101f0565b806323b872dd11610187578063395093511161015657806339509351146105165780634efecaa51461054257806370a082311461056e5780637535d24614610594576101f0565b806323b872dd146104b257806330adf81f146104e8578063313ce567146104f05780633644e5151461050e576101f0565b8063156e29f6116101c3578063156e29f61461030b57806318160ddd1461033d578063183fb413146103455780631da24f3e1461048c576101f0565b806306fdde03146101f5578063095ea7b3146102725780630afbcdc9146102b25780630bd7ad3b146102f1575b600080fd5b6101fd6107ae565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561023757818101518382015260200161021f565b50505050905090810190601f1680156102645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61029e6004803603604081101561028857600080fd5b506001600160a01b038135169060200135610845565b604080519115158252519081900360200190f35b6102d8600480360360208110156102c857600080fd5b50356001600160a01b0316610863565b6040805192835260208301919091528051918290030190f35b6102f9610880565b60408051918252519081900360200190f35b61029e6004803603606081101561032157600080fd5b506001600160a01b038135169060208101359060400135610885565b6102f9610a85565b61048a600480360361010081101561035c57600080fd5b6001600160a01b038235811692602081013582169260408201358316926060830135169160ff6080820135169181019060c0810160a08201356401000000008111156103a757600080fd5b8201836020820111156103b957600080fd5b803590602001918460018302840111640100000000831117156103db57600080fd5b9193909290916020810190356401000000008111156103f957600080fd5b82018360208201111561040b57600080fd5b8035906020019184600183028401116401000000008311171561042d57600080fd5b91939092909160208101903564010000000081111561044b57600080fd5b82018360208201111561045d57600080fd5b8035906020019184600183028401116401000000008311171561047f57600080fd5b509092509050610b33565b005b6102f9600480360360208110156104a257600080fd5b50356001600160a01b0316610ecc565b61029e600480360360608110156104c857600080fd5b506001600160a01b03813581169160208101359091169060400135610ed7565b6102f9610fa9565b6104f8610fcd565b6040805160ff9092168252519081900360200190f35b6102f9610fd6565b61029e6004803603604081101561052c57600080fd5b506001600160a01b038135169060200135610fdc565b6102f96004803603604081101561055857600080fd5b506001600160a01b03813516906020013561102a565b6102f96004803603602081101561058457600080fd5b50356001600160a01b03166110d5565b61059c61116a565b604080516001600160a01b039092168252519081900360200190f35b61059c61117e565b6101fd61118d565b61048a600480360360408110156105de57600080fd5b50803590602001356111c6565b61048a6004803603604081101561060157600080fd5b506001600160a01b038135169060200135611304565b6101fd611393565b61029e6004803603604081101561063557600080fd5b506001600160a01b0381351690602001356113f4565b61029e6004803603604081101561066157600080fd5b506001600160a01b03813516906020013561145c565b61059c6114cb565b61059c6114da565b6102f96114e9565b6102f9600480360360208110156106a557600080fd5b50356001600160a01b03166114f3565b61048a600480360360e08110156106cb57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611505565b61048a6004803603608081101561071c57600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561178e565b6102f96004803603604081101561075857600080fd5b506001600160a01b0381358116916020013516611965565b6102f9611990565b61048a6004803603606081101561078e57600080fd5b506001600160a01b03813581169160208101359091169060400135611b34565b60378054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561083a5780601f1061080f5761010080835404028352916020019161083a565b820191906000526020600020905b81548152906001019060200180831161081d57829003601f168201915b505050505090505b90565b6000610859610852611c1c565b8484611c20565b5060015b92915050565b60008061086f83611d0c565b610877611d27565b91509150915091565b600181565b60395460009061010090046001600160a01b03166108a1611c1c565b6001600160a01b03161460405180604001604052806002815260200161323960f01b8152509061094f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109145781810151838201526020016108fc565b50505050905090810190601f1680156109415780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600061095b85611d0c565b905060006109698585611d2d565b60408051808201909152600281527f35360000000000000000000000000000000000000000000000000000000000006020820152909150816109ec5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109145781810151838201526020016108fc565b506109f78682611e6a565b6040805186815290516001600160a01b038816916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3604080518681526020810186905281516001600160a01b038916927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a25015949350505050565b600080610a90611d27565b905080610aa1576000915050610842565b603954603a546040805163d15e005360e01b81526001600160a01b0392831660048201529051610b2d9361010090049092169163d15e005391602480820192602092909190829003018186803b158015610afa57600080fd5b505afa158015610b0e573d6000803e3d6000fd5b505050506040513d6020811015610b2457600080fd5b50518290611fc6565b91505090565b6000610b3d6120b2565b60015490915060ff1680610b545750610b546120b7565b80610b60575060005481115b610b9b5760405162461bcd60e51b815260040180806020018281038252602e815260200180612aab602e913960400191505060405180910390fd5b60015460ff16158015610bba576001805460ff19168117905560008290555b60004690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f898960405180838380828437808301925050509250505060405180910390206040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525080519060200120833060405160200180868152602001858152602001848152602001838152602001826001600160a01b031681526020019550505050505060405160208183030381529060405280519060200120603c81905550610cce89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120bd92505050565b610d0d87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120d092505050565b610d168a6120e3565b8d603960016101000a8154816001600160a01b0302191690836001600160a01b031602179055508c603d60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508b603a60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508a603e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508d6001600160a01b03168c6001600160a01b03167fb19e051f8af41150ccccb3fc2c2d8d15f4a4cf434f32a559ba75fe73d6eea20b8f8e8e8e8e8e8e8e8e604051808a6001600160a01b03168152602001896001600160a01b031681526020018860ff16815260200180602001806020018060200184810384528a8a82818152602001925080828437600083820152601f01601f191690910185810384528881526020019050888880828437600083820152601f01601f191690910185810383528681526020019050868680828437600083820152604051601f909101601f19169092018290039e50909c50505050505050505050505050a3508015610ebd576001805460ff191690555b50505050505050505050505050565b600061085d82611d0c565b6000610ee48484846120f9565b610f5484610ef0611c1c565b610f4f85604051806060016040528060288152602001612a83602891396001600160a01b038a16600090815260356020526040812090610f2e611c1c565b6001600160a01b031681526020810191909152604001600020549190612106565b611c20565b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60395460ff1690565b603c5481565b6000610859610fe9611c1c565b84610f4f8560356000610ffa611c1c565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490612160565b60395460009061010090046001600160a01b0316611046611c1c565b6001600160a01b03161460405180604001604052806002815260200161323960f01b815250906110b75760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109145781810151838201526020016108fc565b50603a546110cf906001600160a01b031684846121c1565b50919050565b603954603a546040805163d15e005360e01b81526001600160a01b039283166004820152905160009361085d93610100909104169163d15e0053916024808301926020929190829003018186803b15801561112f57600080fd5b505afa158015611143573d6000803e3d6000fd5b505050506040513d602081101561115957600080fd5b505161116484611d0c565b90611fc6565b60395461010090046001600160a01b031690565b6000611188612241565b905090565b6040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b60395461010090046001600160a01b03166111df611c1c565b6001600160a01b03161460405180604001604052806002815260200161323960f01b815250906112505760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109145781810151838201526020016108fc565b508161125b57611300565b603d546001600160a01b031661127a816112758585611d2d565b611e6a565b6040805184815290516001600160a01b038316916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3604080518481526020810184905281516001600160a01b038416927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a2505b5050565b60395461010090046001600160a01b031661131d611c1c565b6001600160a01b03161460405180604001604052806002815260200161323960f01b8152509061138e5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109145781810151838201526020016108fc565b505050565b60388054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561083a5780601f1061080f5761010080835404028352916020019161083a565b6000610859611401611c1c565b84610f4f85604051806060016040528060258152602001612b6d602591396035600061142b611c1c565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612106565b6000611470611469611c1c565b84846120f9565b826001600160a01b0316611482611c1c565b6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350600192915050565b603d546001600160a01b031690565b603a546001600160a01b031690565b6000611188611d27565b603b6020526000908152604090205481565b6001600160a01b038716611560576040805162461bcd60e51b815260206004820152600d60248201527f494e56414c49445f4f574e455200000000000000000000000000000000000000604482015290519081900360640190fd5b834211156115b5576040805162461bcd60e51b815260206004820152601260248201527f494e56414c49445f45585049524154494f4e0000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038088166000818152603b6020908152604080832054603c5482517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958c166060860152608085018b905260a0850181905260c08086018b90528251808703909101815260e0860183528051908401207f19010000000000000000000000000000000000000000000000000000000000006101008701526101028601969096526101228086019690965281518086039096018652610142850180835286519684019690962093909552610162840180825283905260ff88166101828501526101a284018790526101c284018690525191926001926101e28083019392601f198301929081900390910190855afa1580156116e5573d6000803e3d6000fd5b505050602060405103516001600160a01b0316896001600160a01b031614611754576040805162461bcd60e51b815260206004820152601160248201527f494e56414c49445f5349474e4154555245000000000000000000000000000000604482015290519081900360640190fd5b61175f826001612160565b6001600160a01b038a166000908152603b6020526040902055611783898989611c20565b505050505050505050565b60395461010090046001600160a01b03166117a7611c1c565b6001600160a01b03161460405180604001604052806002815260200161323960f01b815250906118185760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109145781810151838201526020016108fc565b5060006118258383611d2d565b60408051808201909152600281527f35380000000000000000000000000000000000000000000000000000000000006020820152909150816118a85760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109145781810151838201526020016108fc565b506118b38582612250565b603a546118ca906001600160a01b031685856121c1565b6040805184815290516000916001600160a01b038816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3836001600160a01b0316856001600160a01b03167f5d624aa9c148153ab3446c1b154f660ee7701e549fe9b62dab7171b1c80e6fa28585604051808381526020018281526020019250505060405180910390a35050505050565b6001600160a01b03918216600090815260356020908152604080832093909416825291909152205490565b600080603960019054906101000a90046001600160a01b03166001600160a01b031663fe65acfe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119e157600080fd5b505afa1580156119f5573d6000803e3d6000fd5b505050506040513d6020811015611a0b57600080fd5b5051604080517ffca513a800000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0384169163fca513a8916004808301926020929190829003018186803b158015611a6c57600080fd5b505afa158015611a80573d6000803e3d6000fd5b505050506040513d6020811015611a9657600080fd5b5051603a54604080517fb3596f070000000000000000000000000000000000000000000000000000000081526001600160a01b03928316600482015290519293509083169163b3596f0791602480820192602092909190829003018186803b158015611b0157600080fd5b505afa158015611b15573d6000803e3d6000fd5b505050506040513d6020811015611b2b57600080fd5b50519250505090565b60395461010090046001600160a01b0316611b4d611c1c565b6001600160a01b03161460405180604001604052806002815260200161323960f01b81525090611bbe5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109145781810151838201526020016108fc565b50611bcc83838360006122f9565b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b3390565b6001600160a01b038316611c655760405162461bcd60e51b8152600401808060200182810382526024815260200180612b1f6024913960400191505060405180910390fd5b6001600160a01b038216611caa5760405162461bcd60e51b8152600401808060200182810382526022815260200180612a3b6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260356020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b031660009081526034602052604090205490565b60365490565b60408051808201909152600281527f3530000000000000000000000000000000000000000000000000000000000000602082015260009082611db05760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109145781810151838201526020016108fc565b506040805180820190915260028082527f343800000000000000000000000000000000000000000000000000000000000060208301528304906b033b2e3c9fd0803ce8000000821904851115611e475760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109145781810151838201526020016108fc565b5082816b033b2e3c9fd0803ce800000086020181611e6157fe5b04949350505050565b6001600160a01b038216611ec5576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611ed16000838361138e565b603654600090611ee19083612160565b60368190556001600160a01b03841660009081526034602052604081205491925090611f0d9084612160565b6001600160a01b0385166000908152603460205260408120829055909150611f33612241565b6001600160a01b031614611fc057611f49612241565b6001600160a01b03166331873e2e8583856040518463ffffffff1660e01b815260040180846001600160a01b031681526020018381526020018281526020019350505050600060405180830381600087803b158015611fa757600080fd5b505af1158015611fbb573d6000803e3d6000fd5b505050505b50505050565b6000821580611fd3575081155b15611fe05750600061085d565b817ffffffffffffffffffffffffffffffffffffffffffe6268e1b017bfe18bffffff8161200957fe5b048311156040518060400160405280600281526020017f34380000000000000000000000000000000000000000000000000000000000008152509061208f5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109145781810151838201526020016108fc565b50506b033b2e3c9fd0803ce800000091026b019d971e4fe8401e74000000010490565b600190565b303b1590565b8051611300906037906020840190612954565b8051611300906038906020840190612954565b6039805460ff191660ff92909216919091179055565b61138e83838360016122f9565b600081848411156121585760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109145781810151838201526020016108fc565b505050900390565b6000828201838110156121ba576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261138e9084906124c1565b603e546001600160a01b031690565b6001600160a01b0382166122955760405162461bcd60e51b8152600401808060200182810382526021815260200180612ad96021913960400191505060405180910390fd5b6122a18260008361138e565b6036546000906122b19083612678565b9050806036819055506000611f0d83604051806060016040528060228152602001612a19602291396001600160a01b0387166000908152603460205260409020549190612106565b603a546039546040805163d15e005360e01b81526001600160a01b03938416600482018190529151919361010090930490921691600091839163d15e0053916024808301926020929190829003018186803b15801561235757600080fd5b505afa15801561236b573d6000803e3d6000fd5b505050506040513d602081101561238157600080fd5b505190506000612394826111648a611d0c565b905060006123a5836111648a611d0c565b90506123bb89896123b68a87611d2d565b6126ba565b851561246357604080517fd5ed39330000000000000000000000000000000000000000000000000000000081526001600160a01b0387811660048301528b811660248301528a81166044830152606482018a90526084820185905260a4820184905291519186169163d5ed39339160c48082019260009290919082900301818387803b15801561244a57600080fd5b505af115801561245e573d6000803e3d6000fd5b505050505b876001600160a01b0316896001600160a01b03167f4beccb90f994c31aced7a23b5611020728a23d8ec5cddd1a3e9d97b96fda86668986604051808381526020018281526020019250505060405180910390a3505050505050505050565b6124d3826001600160a01b0316612918565b612524576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600080836001600160a01b0316836040518082805190602001908083835b602083106125615780518252601f199092019160209182019101612542565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146125c3576040519150601f19603f3d011682016040523d82523d6000602084013e6125c8565b606091505b50915091508161261f576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611fc05780806020019051602081101561263b57600080fd5b5051611fc05760405162461bcd60e51b815260040180806020018281038252602a815260200180612b43602a913960400191505060405180910390fd5b60006121ba83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612106565b6001600160a01b0383166126ff5760405162461bcd60e51b8152600401808060200182810382526025815260200180612afa6025913960400191505060405180910390fd5b6001600160a01b0382166127445760405162461bcd60e51b81526004018080602001828103825260238152602001806129f66023913960400191505060405180910390fd5b61274f83838361138e565b600061278e82604051806060016040528060268152602001612a5d602691396001600160a01b0387166000908152603460205260409020549190612106565b6001600160a01b03808616600090815260346020526040808220849055918616815290812054919250906127c29084612160565b6001600160a01b03851660009081526034602052604081208290559091506127e8612241565b6001600160a01b03161461291157603654612801612241565b6001600160a01b03166331873e2e8785846040518463ffffffff1660e01b815260040180846001600160a01b031681526020018381526020018281526020019350505050600060405180830381600087803b15801561285f57600080fd5b505af1158015612873573d6000803e3d6000fd5b50505050846001600160a01b0316866001600160a01b03161461290f57612898612241565b6001600160a01b03166331873e2e8684846040518463ffffffff1660e01b815260040180846001600160a01b031681526020018381526020018281526020019350505050600060405180830381600087803b1580156128f657600080fd5b505af115801561290a573d6000803e3d6000fd5b505050505b505b5050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061294c57508115155b949350505050565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261298a57600085556129d0565b82601f106129a357805160ff19168380011785556129d0565b828001600101855582156129d0579182015b828111156129d05782518255916020019190600101906129b5565b506129dc9291506129e0565b5090565b5b808211156129dc57600081556001016129e156fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656445524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122001df8f6d4fde2ff76b07b5bdf6af00aefee892a7096fc586f9dfe0e18e2de0d764736f6c63430007060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.