Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
This contract contains unverified libraries: FlashLoanLogic
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
FlashLoanLogic
Compiler Version
v0.8.12+commit.f00d7308
ZkSolc Version
v1.5.0
Optimization Enabled:
Yes with Mode 3
Other Settings:
berlin EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {GPv2SafeERC20} from '../../../dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {SafeCast} from '../../../dependencies/openzeppelin/contracts/SafeCast.sol';import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';import {IAToken} from '../../../interfaces/IAToken.sol';import {IFlashLoanReceiver} from '../../../flashloan/interfaces/IFlashLoanReceiver.sol';import {IFlashLoanSimpleReceiver} from '../../../flashloan/interfaces/IFlashLoanSimpleReceiver.sol';import {IPoolAddressesProvider} from '../../../interfaces/IPoolAddressesProvider.sol';import {UserConfiguration} from '../configuration/UserConfiguration.sol';import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';import {Errors} from '../helpers/Errors.sol';import {WadRayMath} from '../math/WadRayMath.sol';import {PercentageMath} from '../math/PercentageMath.sol';import {DataTypes} from '../types/DataTypes.sol';import {ValidationLogic} from './ValidationLogic.sol';import {BorrowLogic} from './BorrowLogic.sol';import {ReserveLogic} from './ReserveLogic.sol';/*** @title FlashLoanLogic library* @author Aave* @notice Implements the logic for the flash loans*/library FlashLoanLogic {
12345678910111213141516171819// SPDX-License-Identifier: MIT// Chainlink Contracts v0.8pragma solidity ^0.8.0;interface AggregatorInterface {function latestAnswer() external view returns (int256);function latestTimestamp() external view returns (uint256);function latestRound() external view returns (uint256);function getAnswer(uint256 roundId) external view returns (int256);function getTimestamp(uint256 roundId) external view returns (uint256);event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: LGPL-3.0-or-laterpragma solidity 0.8.12;import {IERC20} from '../../openzeppelin/contracts/IERC20.sol';/// @title Gnosis Protocol v2 Safe ERC20 Transfer Library/// @author Gnosis Developers/// @dev Gas-efficient version of Openzeppelin's SafeERC20 contract.library GPv2SafeERC20 {/// @dev Wrapper around a call to the ERC20 function `transfer` that reverts/// also when the token returns `false`.function safeTransfer(IERC20 token, address to, uint256 value) internal {bytes4 selector_ = token.transfer.selector;// solhint-disable-next-line no-inline-assemblyassembly {let freeMemoryPointer := mload(0x40)mstore(freeMemoryPointer, selector_)mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff))mstore(add(freeMemoryPointer, 36), value)if iszero(call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)) {returndatacopy(0, 0, returndatasize())revert(0, returndatasize())}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.8.12;import './IAccessControl.sol';import './Context.sol';import './Strings.sol';import './ERC165.sol';/*** @dev Contract module that allows children to implement role-based access* control mechanisms. This is a lightweight version that doesn't allow enumerating role* members except through off-chain means by accessing the contract event logs. Some* applications may benefit from on-chain enumerability, for those cases see* {AccessControlEnumerable}.** Roles are referred to by their `bytes32` identifier. These should be exposed* in the external API and be unique. The best way to achieve this is by* using `public constant` hash digests:** ```* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");* ```** Roles can be used to represent a set of permissions. To restrict access to a* function call, use {hasRole}:
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)pragma solidity ^0.8.0;/*** @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* ====*/
1234567891011121314151617181920212223// SPDX-License-Identifier: MITpragma solidity 0.8.12;/** @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 payable(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: MITpragma solidity 0.8.12;import './IERC165.sol';/*** @dev Implementation of the {IERC165} interface.** Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check* for the additional interface id that will be supported. For example:** ```solidity* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);* }* ```** Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.*/abstract contract ERC165 is IERC165 {/*** @dev See {IERC165-supportsInterface}.*/function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {return interfaceId == type(IERC165).interfaceId;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.8.12;import './Context.sol';import './IERC20.sol';import './SafeMath.sol';import './Address.sol';/*** @dev Implementation of the {IERC20} interface.** This implementation is agnostic to the way tokens are created. This means* that a supply mechanism has to be added in a derived contract using {_mint}.* For a generic mechanism see {ERC20PresetMinterPauser}.** TIP: For a detailed writeup see our guide* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How* to implement supply mechanisms].** We have followed general OpenZeppelin guidelines: functions revert instead* of returning `false` on failure. This behavior is nonetheless conventional* and does not conflict with the expectations of ERC20 applications.** Additionally, an {Approval} event is emitted on calls to {transferFrom}.* This allows applications to reconstruct the allowance for all accounts just
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.8.12;/*** @dev External interface of AccessControl declared to support ERC165 detection.*/interface IAccessControl {/*** @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`** `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite* {RoleAdminChanged} not being emitted signaling this.** _Available since v3.1._*/event RoleAdminChanged(bytes32 indexed role,bytes32 indexed previousAdminRole,bytes32 indexed newAdminRole);/*** @dev Emitted when `account` is granted `role`.** `sender` is the account that originated the contract call, an admin role
123456789101112131415161718192021222324// SPDX-License-Identifier: MITpragma solidity 0.8.12;/*** @dev Interface of the ERC165 standard, as defined in the* https://eips.ethereum.org/EIPS/eip-165[EIP].** Implementers can declare support of contract interfaces, which can then be* queried by others ({ERC165Checker}).** For an implementation, see {ERC165}.*/interface IERC165 {/*** @dev Returns true if this contract implements the interface defined by* `interfaceId`. See the corresponding* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]* to learn more about how these ids are created.** This function call must use less than 30 000 gas.*/function supportsInterface(bytes4 interfaceId) external view returns (bool);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;/*** @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.8.12;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.8.12;import './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.*/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.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)pragma solidity 0.8.12;/*** @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow* checks.** Downcasting from uint256/int256 in Solidity does not revert on overflow. This can* easily result in undesired exploitation or bugs, since developers usually* assume that overflows raise errors. `SafeCast` restores this intuition by* reverting the transaction when such 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.** Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing* all math on `uint256` and `int256` and then downcasting.*/library SafeCast {/*** @dev Returns the downcasted uint224 from uint256, reverting on* overflow (when the input is greater than largest uint224).** Counterpart to Solidity's `uint224` operator.*
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)pragma solidity ^0.8.0;import './IERC20.sol';import './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(
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity 0.8.12;/// @title Optimized overflow and underflow safe math operations/// @notice Contains methods for doing math operations that revert on overflow or underflow for minimal gas costlibrary SafeMath {/// @notice Returns x + y, reverts if sum overflows uint256/// @param x The augend/// @param y The addend/// @return z The sum of x and yfunction add(uint256 x, uint256 y) internal pure returns (uint256 z) {unchecked {require((z = x + y) >= x);}}/// @notice Returns x - y, reverts if underflows/// @param x The minuend/// @param y The subtrahend/// @return z The difference of x and yfunction sub(uint256 x, uint256 y) internal pure returns (uint256 z) {unchecked {require((z = x - y) <= x);}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.8.12;/*** @dev String operations.*/library Strings {bytes16 private constant _HEX_SYMBOLS = '0123456789abcdef';/*** @dev Converts a `uint256` to its ASCII `string` decimal representation.*/function toString(uint256 value) internal pure returns (string memory) {// Inspired by OraclizeAPI's implementation - MIT licence// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.solif (value == 0) {return '0';}uint256 temp = value;uint256 digits;while (temp != 0) {digits++;temp /= 10;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity 0.8.12;import './UpgradeabilityProxy.sol';/*** @title BaseAdminUpgradeabilityProxy* @dev This contract combines an upgradeability proxy with an authorization* mechanism for administrative tasks.* All external functions in this contract must be guarded by the* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity* feature proposal that would enable this to be done automatically.*/contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {/*** @dev Emitted when the administration has been transferred.* @param previousAdmin Address of the previous admin.* @param newAdmin Address of the new admin.*/event AdminChanged(address previousAdmin, address newAdmin);/*** @dev Storage slot with the admin of the contract.* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is* validated in the constructor.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity 0.8.12;import './Proxy.sol';import '../contracts/Address.sol';/*** @title BaseUpgradeabilityProxy* @dev This contract implements a proxy that allows to change the* implementation address to which it will delegate.* Such a change is called an implementation upgrade.*/contract BaseUpgradeabilityProxy is Proxy {/*** @dev Emitted when the implementation is upgraded.* @param implementation Address of the new implementation.*/event Upgraded(address indexed implementation);/*** @dev Storage slot with the address of the current implementation.* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is* validated in the constructor.*/bytes32 internal constant IMPLEMENTATION_SLOT =0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity 0.8.12;import './BaseAdminUpgradeabilityProxy.sol';import './InitializableUpgradeabilityProxy.sol';/*** @title InitializableAdminUpgradeabilityProxy* @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for* initializing the implementation, admin, and init data.*/contract InitializableAdminUpgradeabilityProxy isBaseAdminUpgradeabilityProxy,InitializableUpgradeabilityProxy{/*** Contract initializer.* @param logic address of the initial implementation.* @param admin Address of the proxy administrator.* @param data Data to send as msg.data to the implementation to initialize the proxied contract.* It should include the signature and the parameters of the function to be called, as described in* https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.* This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.*/function initialize(address logic, address admin, bytes memory data) public payable {require(_implementation() == address(0));
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity 0.8.12;import './BaseUpgradeabilityProxy.sol';/*** @title InitializableUpgradeabilityProxy* @dev Extends BaseUpgradeabilityProxy with an initializer for initializing* implementation and init data.*/contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy {/*** @dev Contract initializer.* @param _logic Address of the initial implementation.* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.* It should include the signature and the parameters of the function to be called, as described in* https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.* This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.*/function initialize(address _logic, bytes memory _data) public payable {require(_implementation() == address(0));assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1));_setImplementation(_logic);if (_data.length > 0) {(bool success, ) = _logic.delegatecall(_data);require(success);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity 0.8.12;/*** @title Proxy* @dev Implements delegation of calls to other contracts, with proper* forwarding of return values and bubbling of failures.* It defines a fallback function that delegates all calls to the address* returned by the abstract _implementation() internal function.*/abstract contract Proxy {/*** @dev Fallback function.* Will run if no other function in the contract matches the call data.* Implemented entirely in `_fallback`.*/fallback() external payable {_fallback();}/*** @return The Address of the implementation.*/function _implementation() internal view virtual returns (address);/**
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity 0.8.12;import './BaseUpgradeabilityProxy.sol';/*** @title UpgradeabilityProxy* @dev Extends BaseUpgradeabilityProxy with a constructor for initializing* implementation and init data.*/contract UpgradeabilityProxy is BaseUpgradeabilityProxy {/*** @dev Contract constructor.* @param _logic Address of the initial implementation.* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.* It should include the signature and the parameters of the function to be called, as described in* https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.* This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.*/constructor(address _logic, bytes memory _data) payable {assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1));_setImplementation(_logic);if (_data.length > 0) {(bool success, ) = _logic.delegatecall(_data);require(success);}
1234567891011121314151617181920212223242526// Copyright (C) 2015, 2016, 2017 Dapphub// This program is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// (at your option) any later version.// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with this program. If not, see <http://www.gnu.org/licenses/>.pragma solidity 0.8.12;contract WETH9 {string public name = 'Wrapped Ether';string public symbol = 'WETH';uint8 public decimals = 18;event Approval(address indexed src, address indexed guy, uint256 wad);event Transfer(address indexed src, address indexed dst, uint256 wad);event Deposit(address indexed dst, uint256 wad);event Withdrawal(address indexed src, uint256 wad);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {PoolConfigurator} from '../protocol/pool/PoolConfigurator.sol';import {Ownable} from '../dependencies/openzeppelin/contracts/Ownable.sol';/*** @title ReservesSetupHelper* @author Aave* @notice Deployment helper to setup the assets risk parameters at PoolConfigurator in batch.* @dev The ReservesSetupHelper is an Ownable contract, so only the deployer or future owners can call this contract.*/contract ReservesSetupHelper is Ownable {struct ConfigureReserveInput {address asset;uint256 baseLTV;uint256 liquidationThreshold;uint256 liquidationBonus;uint256 reserveFactor;uint256 borrowCap;uint256 supplyCap;bool stableBorrowingEnabled;bool borrowingEnabled;bool flashLoanEnabled;}
123456789101112131415161718192021// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.10;import {IFlashLoanReceiver} from '../interfaces/IFlashLoanReceiver.sol';import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';import {IPool} from '../../interfaces/IPool.sol';/*** @title FlashLoanReceiverBase* @author Aave* @notice Base contract to develop a flashloan-receiver contract.*/abstract contract FlashLoanReceiverBase is IFlashLoanReceiver {IPoolAddressesProvider public immutable override ADDRESSES_PROVIDER;IPool public immutable override POOL;constructor(IPoolAddressesProvider provider) {ADDRESSES_PROVIDER = provider;POOL = IPool(provider.getPool());}}
123456789101112131415161718192021// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.10;import {IFlashLoanSimpleReceiver} from '../interfaces/IFlashLoanSimpleReceiver.sol';import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';import {IPool} from '../../interfaces/IPool.sol';/*** @title FlashLoanSimpleReceiverBase* @author Aave* @notice Base contract to develop a flashloan-receiver contract.*/abstract contract FlashLoanSimpleReceiverBase is IFlashLoanSimpleReceiver {IPoolAddressesProvider public immutable override ADDRESSES_PROVIDER;IPool public immutable override POOL;constructor(IPoolAddressesProvider provider) {ADDRESSES_PROVIDER = provider;POOL = IPool(provider.getPool());}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';import {IPool} from '../../interfaces/IPool.sol';/*** @title IFlashLoanReceiver* @author Aave* @notice Defines the basic interface of a flashloan-receiver contract.* @dev Implement this interface to develop a flashloan-compatible flashLoanReceiver contract*/interface IFlashLoanReceiver {/*** @notice Executes an operation after receiving the flash-borrowed assets* @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 assets The addresses of the flash-borrowed assets* @param amounts The amounts of the flash-borrowed assets* @param premiums The fee of each 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[] calldata assets,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma 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,
12345678910111213141516171819// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;/*** @title IAaveIncentivesController* @author Aave* @notice Defines the basic interface for an Aave Incentives Controller.* @dev It only contains one single function, needed as a hook on aToken and debtToken transfers.*/interface IAaveIncentivesController {/*** @dev Called by the corresponding asset on transfer hook in order to update the rewards distribution.* @dev The units of `totalSupply` and `userBalance` should be the same.* @param user The address of the user whose asset balance has changed* @param totalSupply The total supply of the asset prior to user balance change* @param userBalance The previous user balance prior to balance change*/function handleAction(address user, uint256 totalSupply, uint256 userBalance) external;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IPriceOracleGetter} from './IPriceOracleGetter.sol';import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';/*** @title IAaveOracle* @author Aave* @notice Defines the basic interface for the Aave Oracle*/interface IAaveOracle is IPriceOracleGetter {/*** @dev Emitted after the base currency is set* @param baseCurrency The base currency of used for price quotes* @param baseCurrencyUnit The unit of the base currency*/event BaseCurrencySet(address indexed baseCurrency, uint256 baseCurrencyUnit);/*** @dev Emitted after the price source of an asset is updated* @param asset The address of the asset* @param source The price source of the asset*/event AssetSourceUpdated(address indexed asset, address indexed source);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';/*** @title IACLManager* @author Aave* @notice Defines the basic interface for the ACL Manager*/interface IACLManager {/*** @notice Returns the contract address of the PoolAddressesProvider* @return The address of the PoolAddressesProvider*/function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);/*** @notice Returns the identifier of the PoolAdmin role* @return The id of the PoolAdmin role*/function POOL_ADMIN_ROLE() external view returns (bytes32);/*** @notice Returns the identifier of the EmergencyAdmin role* @return The id of the EmergencyAdmin role
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';import {IScaledBalanceToken} from './IScaledBalanceToken.sol';import {IInitializableAToken} from './IInitializableAToken.sol';/*** @title IAToken* @author Aave* @notice Defines the basic interface for an AToken.*/interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken {/*** @dev Emitted during the transfer action* @param from The user whose tokens are being transferred* @param to The recipient* @param value The scaled amount being transferred* @param index The next liquidity index of the reserve*/event BalanceTransfer(address indexed from, address indexed to, uint256 value, uint256 index);/*** @notice Mints `amount` aTokens to `user`* @param caller The address performing the mint* @param onBehalfOf The address of the user that will receive the minted aTokens
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;/*** @title ICreditDelegationToken* @author Aave* @notice Defines the basic interface for a token supporting credit delegation.*/interface ICreditDelegationToken {/*** @dev Emitted on `approveDelegation` and `borrowAllowance* @param fromUser The address of the delegator* @param toUser The address of the delegatee* @param asset The address of the delegated asset* @param amount The amount being delegated*/event BorrowAllowanceDelegated(address indexed fromUser,address indexed toUser,address indexed asset,uint256 amount);/*** @notice Delegates borrowing power to a user on the specific debt token.* Delegation will still respect the liquidation constraints (even if delegated, a
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IReserveInterestRateStrategy} from './IReserveInterestRateStrategy.sol';import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';/*** @title IDefaultInterestRateStrategy* @author Aave* @notice Defines the basic interface of the DefaultReserveInterestRateStrategy*/interface IDefaultInterestRateStrategy is IReserveInterestRateStrategy {/*** @notice Returns the usage ratio at which the pool aims to obtain most competitive borrow rates.* @return The optimal usage ratio, expressed in ray.*/function OPTIMAL_USAGE_RATIO() external view returns (uint256);/*** @notice Returns the optimal stable to total debt ratio of the reserve.* @return The optimal stable to total debt ratio, expressed in ray.*/function OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO() external view returns (uint256);/*** @notice Returns the excess usage ratio above the optimal.
123456789101112131415// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;/*** @title IDelegationToken* @author Aave* @notice Implements an interface for tokens with delegation COMP/UNI compatible*/interface IDelegationToken {/*** @notice Delegate voting power to a delegatee* @param delegatee The address of the delegatee*/function delegate(address delegatee) external;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';/*** @title IERC20WithPermit* @author Aave* @notice Interface for the permit function (EIP-2612)*/interface IERC20WithPermit is IERC20 {/*** @notice Allow passing a signed message to approve spending* @dev implements the permit function as for* https://github.com/ethereum/EIPs/blob/8a34d644aacf0f9f8f00815307fd7dd5da07655f/EIPS/eip-2612.md* @param owner The owner of the funds* @param spender The spender* @param value The amount* @param deadline The deadline timestamp, type(uint256).max for max deadline* @param v Signature param* @param s Signature param* @param r Signature param*/function permit(address owner,address spender,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IAaveIncentivesController} from './IAaveIncentivesController.sol';import {IPool} from './IPool.sol';/*** @title IInitializableAToken* @author Aave* @notice Interface for the initialize function on AToken*/interface IInitializableAToken {/*** @dev Emitted when an aToken is initialized* @param underlyingAsset The address of the underlying asset* @param pool The address of the associated 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.8.0;import {IAaveIncentivesController} from './IAaveIncentivesController.sol';import {IPool} from './IPool.sol';/*** @title IInitializableDebtToken* @author Aave* @notice Interface for the initialize function common between debt tokens*/interface IInitializableDebtToken {/*** @dev Emitted when a debt token is initialized* @param underlyingAsset The address of the underlying asset* @param pool The address of the associated pool* @param incentivesController The address of the incentives controller for this aToken* @param debtTokenDecimals The decimals of the debt token* @param debtTokenName The name of the debt token* @param debtTokenSymbol The symbol of the debt token* @param params A set of encoded parameters for additional initialization*/event Initialized(address indexed underlyingAsset,address indexed pool,address incentivesController,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;/*** @title IL2Pool* @author Aave* @notice Defines the basic extension interface for an L2 Aave Pool.*/interface IL2Pool {/*** @notice Calldata efficient wrapper of the supply function on behalf of the caller* @param args Arguments for the supply function packed in one bytes32* 96 bits 16 bits 128 bits 16 bits* | 0-padding | referralCode | shortenedAmount | assetId |* @dev the shortenedAmount is cast to 256 bits at decode time, if type(uint128).max the value will be expanded to* type(uint256).max* @dev assetId is the index of the asset in the reservesList.*/function supply(bytes32 args) external;/*** @notice Calldata efficient wrapper of the supplyWithPermit function on behalf of the caller* @param args Arguments for the supply function packed in one bytes32* 56 bits 8 bits 32 bits 16 bits 128 bits 16 bits* | 0-padding | permitV | shortenedDeadline | referralCode | shortenedAmount | assetId |* @dev the shortenedAmount is cast to 256 bits at decode time, if type(uint128).max the value will be expanded to
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma 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
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma 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
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;/*** @title IPoolAddressesProviderRegistry* @author Aave* @notice Defines the basic interface for an Aave Pool Addresses Provider Registry.*/interface IPoolAddressesProviderRegistry {/*** @dev Emitted when a new AddressesProvider is registered.* @param addressesProvider The address of the registered PoolAddressesProvider* @param id The id of the registered PoolAddressesProvider*/event AddressesProviderRegistered(address indexed addressesProvider, uint256 indexed id);/*** @dev Emitted when an AddressesProvider is unregistered.* @param addressesProvider The address of the unregistered PoolAddressesProvider* @param id The id of the unregistered PoolAddressesProvider*/event AddressesProviderUnregistered(address indexed addressesProvider, uint256 indexed id);/*** @notice Returns the list of registered addresses providers* @return The list of addresses providers
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {ConfiguratorInputTypes} from '../protocol/libraries/types/ConfiguratorInputTypes.sol';/*** @title IPoolConfigurator* @author Aave* @notice Defines the basic interface for a Pool configurator.*/interface IPoolConfigurator {/*** @dev Emitted when a reserve is initialized.* @param asset The address of the underlying asset of the reserve* @param aToken The address of the associated aToken contract* @param stableDebtToken The address of the associated stable rate debt token* @param variableDebtToken The address of the associated variable rate debt token* @param interestRateStrategyAddress The address of the interest rate strategy for the reserve*/event ReserveInitialized(address indexed asset,address indexed aToken,address stableDebtToken,address variableDebtToken,address interestRateStrategyAddress);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';/*** @title IPoolDataProvider* @author Aave* @notice Defines the basic interface of a PoolDataProvider*/interface IPoolDataProvider {struct TokenData {string symbol;address tokenAddress;}/*** @notice Returns the address for the PoolAddressesProvider contract.* @return The address for the PoolAddressesProvider contract*/function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);/*** @notice Returns the list of the existing reserves in the pool.* @dev Handling MKR and ETH in a different way since they do not have standard `symbol` functions.* @return The list of reserves, pairs of symbols and addresses
1234567891011121314151617181920212223// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;/*** @title IPriceOracle* @author Aave* @notice Defines the basic interface for a Price oracle.*/interface IPriceOracle {/*** @notice Returns the asset price in the base currency* @param asset The address of the asset* @return The price of the asset*/function getAssetPrice(address asset) external view returns (uint256);/*** @notice Set the price of the asset* @param asset The address of the asset* @param price The price of the asset*/function setAssetPrice(address asset, uint256 price) external;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;/*** @title IPriceOracleGetter* @author Aave* @notice Interface for the Aave price oracle.*/interface IPriceOracleGetter {/*** @notice Returns the base currency address* @dev Address 0x0 is reserved for USD as base currency.* @return Returns the base currency address.*/function BASE_CURRENCY() external view returns (address);/*** @notice Returns the base currency unit* @dev 1 ether for ETH, 1e8 for USD.* @return Returns the base currency unit.*/function BASE_CURRENCY_UNIT() external view returns (uint256);/*** @notice Returns the asset price in the base currency* @param asset The address of the asset
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';/*** @title IPriceOracleSentinel* @author Aave* @notice Defines the basic interface for the PriceOracleSentinel*/interface IPriceOracleSentinel {/*** @dev Emitted after the sequencer oracle is updated* @param newSequencerOracle The new sequencer oracle*/event SequencerOracleUpdated(address newSequencerOracle);/*** @dev Emitted after the grace period is updated* @param newGracePeriod The new grace period value*/event GracePeriodUpdated(uint256 newGracePeriod);/*** @notice Returns the PoolAddressesProvider* @return The address of the PoolAddressesProvider contract
12345678910111213141516171819202122// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {DataTypes} from '../protocol/libraries/types/DataTypes.sol';/*** @title IReserveInterestRateStrategy* @author Aave* @notice Interface for the calculation of the interest rates*/interface IReserveInterestRateStrategy {/*** @notice Calculates the interest rates depending on the reserve's state and configurations* @param params The parameters needed to calculate interest rates* @return liquidityRate The liquidity rate expressed in rays* @return stableBorrowRate The stable borrow rate expressed in rays* @return variableBorrowRate The variable borrow rate expressed in rays*/function calculateInterestRates(DataTypes.CalculateInterestRatesParams memory params) external view returns (uint256, uint256, uint256);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;/*** @title IScaledBalanceToken* @author Aave* @notice Defines the basic interface for a scaled-balance token.*/interface IScaledBalanceToken {/*** @dev Emitted after the mint action* @param caller The address performing the mint* @param onBehalfOf The address of the user that will receive the minted tokens* @param value The scaled-up amount being minted (based on user entered amount and balance increase from interest)* @param balanceIncrease The increase in scaled-up balance since the last action of 'onBehalfOf'* @param index The next liquidity index of the reserve*/event Mint(address indexed caller,address indexed onBehalfOf,uint256 value,uint256 balanceIncrease,uint256 index);/**
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IInitializableDebtToken} from './IInitializableDebtToken.sol';/*** @title IStableDebtToken* @author Aave* @notice Defines the interface for the stable debt token* @dev It does not inherit from IERC20 to save in code size*/interface IStableDebtToken is IInitializableDebtToken {/*** @dev Emitted when new stable debt is minted* @param user The address of the user who triggered the minting* @param onBehalfOf The recipient of stable debt tokens* @param amount The amount minted (user entered amount + balance increase from interest)* @param currentBalance The balance of the user based on the previous balance and balance increase from interest* @param balanceIncrease The increase in balance since the last action of the user 'onBehalfOf'* @param newRate The rate of the debt after the minting* @param avgStableRate The next average stable rate after the minting* @param newTotalSupply The next total supply of the stable debt token after the action*/event Mint(address indexed user,address indexed onBehalfOf,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IScaledBalanceToken} from './IScaledBalanceToken.sol';import {IInitializableDebtToken} from './IInitializableDebtToken.sol';/*** @title IVariableDebtToken* @author Aave* @notice Defines the basic interface for a variable debt token.*/interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken {/*** @notice Mints debt token to the `onBehalfOf` address* @param user The address receiving the borrowed underlying, being the delegatee in case* of credit delegate, or same as `onBehalfOf` otherwise* @param onBehalfOf The address receiving the debt tokens* @param amount The amount of debt being minted* @param index The variable debt index of the reserve* @return True if the previous balance of the user is 0, false otherwise* @return The scaled total debt of the reserve*/function mint(address user,address onBehalfOf,uint256 amount,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {AggregatorInterface} from '../dependencies/chainlink/AggregatorInterface.sol';import {Errors} from '../protocol/libraries/helpers/Errors.sol';import {IACLManager} from '../interfaces/IACLManager.sol';import {IPoolAddressesProvider} from '../interfaces/IPoolAddressesProvider.sol';import {IPriceOracleGetter} from '../interfaces/IPriceOracleGetter.sol';import {IAaveOracle} from '../interfaces/IAaveOracle.sol';/*** @title AaveOracle* @author Aave* @notice Contract to get asset prices, manage price sources and update the fallback oracle* - Use of Chainlink Aggregators as first source of price* - If the returned price by a Chainlink aggregator is <= 0, the call is forwarded to a fallback oracle* - Owned by the Aave governance*/contract AaveOracle is IAaveOracle {IPoolAddressesProvider public immutable ADDRESSES_PROVIDER;// Map of asset price sources (asset => priceSource)mapping(address => AggregatorInterface) private assetsSources;IPriceOracleGetter private _fallbackOracle;address public immutable override BASE_CURRENCY;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IERC20Detailed} from '../dependencies/openzeppelin/contracts/IERC20Detailed.sol';import {ReserveConfiguration} from '../protocol/libraries/configuration/ReserveConfiguration.sol';import {UserConfiguration} from '../protocol/libraries/configuration/UserConfiguration.sol';import {DataTypes} from '../protocol/libraries/types/DataTypes.sol';import {WadRayMath} from '../protocol/libraries/math/WadRayMath.sol';import {IPoolAddressesProvider} from '../interfaces/IPoolAddressesProvider.sol';import {IStableDebtToken} from '../interfaces/IStableDebtToken.sol';import {IVariableDebtToken} from '../interfaces/IVariableDebtToken.sol';import {IPool} from '../interfaces/IPool.sol';import {IPoolDataProvider} from '../interfaces/IPoolDataProvider.sol';/*** @title AaveProtocolDataProvider* @author Aave* @notice Peripheral contract to collect and pre-process information from the Pool.*/contract AaveProtocolDataProvider is IPoolDataProvider {using ReserveConfiguration for DataTypes.ReserveConfigurationMap;using UserConfiguration for DataTypes.UserConfigurationMap;using WadRayMath for uint256;address constant MKR = 0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2;address constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
123456789101112// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;interface IWETH {function deposit() external payable;function withdraw(uint256) external;function approve(address guy, uint256 wad) external returns (bool);function transferFrom(address src, address dst, uint256 wad) external returns (bool);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {SafeCast} from '../dependencies/openzeppelin/contracts/SafeCast.sol';import {IPool} from '../interfaces/IPool.sol';import {DataTypes} from '../protocol/libraries/types/DataTypes.sol';/*** @title L2Encoder* @author Aave* @notice Helper contract to encode calldata, used to optimize calldata size in L2Pool for transaction cost reduction* only indented to help generate calldata for uses/frontends.*/contract L2Encoder {using SafeCast for uint256;IPool public immutable POOL;/*** @dev Constructor.* @param pool The address of the Pool contract*/constructor(IPool pool) {POOL = pool;}/**
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';import {GPv2SafeERC20} from '../../dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';import {FlashLoanReceiverBase} from '../../flashloan/base/FlashLoanReceiverBase.sol';import {MintableERC20} from '../tokens/MintableERC20.sol';contract MockFlashLoanReceiver is FlashLoanReceiverBase {using GPv2SafeERC20 for IERC20;event ExecutedWithFail(address[] _assets, uint256[] _amounts, uint256[] _premiums);event ExecutedWithSuccess(address[] _assets, uint256[] _amounts, uint256[] _premiums);bool internal _failExecution;uint256 internal _amountToApprove;bool internal _simulateEOA;constructor(IPoolAddressesProvider provider) FlashLoanReceiverBase(provider) {}function setFailExecutionTransfer(bool fail) public {_failExecution = fail;}function setAmountToApprove(uint256 amountToApprove) public {
12345678// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IAaveIncentivesController} from '../../interfaces/IAaveIncentivesController.sol';contract MockIncentivesController is IAaveIncentivesController {function handleAction(address, uint256, uint256) external override {}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {ReserveConfiguration} from '../../protocol/libraries/configuration/ReserveConfiguration.sol';import {DataTypes} from '../../protocol/libraries/types/DataTypes.sol';contract MockReserveConfiguration {using ReserveConfiguration for DataTypes.ReserveConfigurationMap;DataTypes.ReserveConfigurationMap public configuration;function setLtv(uint256 ltv) external {DataTypes.ReserveConfigurationMap memory config = configuration;config.setLtv(ltv);configuration = config;}function getLtv() external view returns (uint256) {return configuration.getLtv();}function setLiquidationBonus(uint256 bonus) external {DataTypes.ReserveConfigurationMap memory config = configuration;config.setLiquidationBonus(bonus);configuration = config;}
12345678910111213141516171819202122232425// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;contract MockAggregator {int256 private _latestAnswer;event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);constructor(int256 initialAnswer) {_latestAnswer = initialAnswer;emit AnswerUpdated(initialAnswer, 0, block.timestamp);}function latestAnswer() external view returns (int256) {return _latestAnswer;}function getTokenType() external pure returns (uint256) {return 1;}function decimals() external pure returns (uint8) {return 8;}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IPriceOracle} from '../../interfaces/IPriceOracle.sol';contract PriceOracle is IPriceOracle {// Map of asset prices (asset => price)mapping(address => uint256) internal prices;uint256 internal ethPriceUsd;event AssetPriceUpdated(address asset, uint256 price, uint256 timestamp);event EthPriceUpdated(uint256 price, uint256 timestamp);function getAssetPrice(address asset) external view override returns (uint256) {return prices[asset];}function setAssetPrice(address asset, uint256 price) external override {prices[asset] = price;emit AssetPriceUpdated(asset, price, block.timestamp);}function getEthUsdPrice() external view returns (uint256) {return ethPriceUsd;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {ERC20} from '../../dependencies/openzeppelin/contracts/ERC20.sol';import {IDelegationToken} from '../../interfaces/IDelegationToken.sol';/*** @title MintableDelegationERC20* @dev ERC20 minting logic with delegation*/contract MintableDelegationERC20 is IDelegationToken, ERC20 {address public delegatee;constructor(string memory name, string memory symbol, uint8 decimals) ERC20(name, symbol) {_setupDecimals(decimals);}/*** @dev Function to mint tokens* @param value The amount of tokens to mint.* @return A boolean that indicates if the operation was successful.*/function mint(uint256 value) public returns (bool) {_mint(msg.sender, value);return true;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {ERC20} from '../../dependencies/openzeppelin/contracts/ERC20.sol';import {IERC20WithPermit} from '../../interfaces/IERC20WithPermit.sol';/*** @title ERC20Mintable* @dev ERC20 minting logic*/contract MintableERC20 is IERC20WithPermit, ERC20 {bytes public constant EIP712_REVISION = bytes('1');bytes32 internal constant EIP712_DOMAIN =keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)');bytes32 public constant PERMIT_TYPEHASH =keccak256('Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)');// Map of address nonces (address => nonce)mapping(address => uint256) internal _nonces;bytes32 public DOMAIN_SEPARATOR;constructor(string memory name, string memory symbol, uint8 decimals) ERC20(name, symbol) {uint256 chainId = block.chainid;DOMAIN_SEPARATOR = keccak256(
12345678910111213141516171819// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {WETH9} from '../../dependencies/weth/WETH9.sol';contract WETH9Mocked is WETH9 {// Mint not backed by Ether: only for testing purposesfunction mint(uint256 value) public returns (bool) {balanceOf[msg.sender] += value;emit Transfer(address(0), msg.sender, value);return true;}function mint(address account, uint256 value) public returns (bool) {balanceOf[account] += value;emit Transfer(address(0), account, value);return true;}}
12345678910111213// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {AToken} from '../../protocol/tokenization/AToken.sol';import {IPool} from '../../interfaces/IPool.sol';contract MockAToken is AToken {constructor(IPool pool) AToken(pool) {}function getRevision() internal pure override returns (uint256) {return 0x2;}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {VersionedInitializable} from '../../protocol/libraries/aave-upgradeability/VersionedInitializable.sol';contract MockInitializableImple is VersionedInitializable {uint256 public value;string public text;uint256[] public values;uint256 public constant REVISION = 1;/*** @dev returns the revision number of the contract* Needs to be defined in the inherited class as a constant.*/function getRevision() internal pure override returns (uint256) {return REVISION;}function initialize(uint256 val, string memory txt, uint256[] memory vals) external initializer {value = val;text = txt;values = vals;}
12345678910111213// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {StableDebtToken} from '../../protocol/tokenization/StableDebtToken.sol';import {IPool} from '../../interfaces/IPool.sol';contract MockStableDebtToken is StableDebtToken {constructor(IPool pool) StableDebtToken(pool) {}function getRevision() internal pure override returns (uint256) {return 0x3;}}
12345678910111213// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {VariableDebtToken} from '../../protocol/tokenization/VariableDebtToken.sol';import {IPool} from '../../interfaces/IPool.sol';contract MockVariableDebtToken is VariableDebtToken {constructor(IPool pool) VariableDebtToken(pool) {}function getRevision() internal pure override returns (uint256) {return 0x3;}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {AccessControl} from '../../dependencies/openzeppelin/contracts/AccessControl.sol';import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';import {IACLManager} from '../../interfaces/IACLManager.sol';import {Errors} from '../libraries/helpers/Errors.sol';/*** @title ACLManager* @author Aave* @notice Access Control List Manager. Main registry of system roles and permissions.*/contract ACLManager is AccessControl, IACLManager {bytes32 public constant override POOL_ADMIN_ROLE = keccak256('POOL_ADMIN');bytes32 public constant override EMERGENCY_ADMIN_ROLE = keccak256('EMERGENCY_ADMIN');bytes32 public constant override RISK_ADMIN_ROLE = keccak256('RISK_ADMIN');bytes32 public constant override FLASH_BORROWER_ROLE = keccak256('FLASH_BORROWER');bytes32 public constant override BRIDGE_ROLE = keccak256('BRIDGE');bytes32 public constant override ASSET_LISTING_ADMIN_ROLE = keccak256('ASSET_LISTING_ADMIN');IPoolAddressesProvider public immutable ADDRESSES_PROVIDER;/*** @dev Constructor* @dev The ACL admin should be initialized at the addressesProvider beforehand
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {Ownable} from '../../dependencies/openzeppelin/contracts/Ownable.sol';import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';import {InitializableImmutableAdminUpgradeabilityProxy} from '../libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol';/*** @title PoolAddressesProvider* @author Aave* @notice Main registry of addresses part of or connected to the protocol, including permissioned roles* @dev Acts as factory of proxies and admin of those, so with right to change its implementations* @dev Owned by the Aave Governance*/contract PoolAddressesProvider is Ownable, IPoolAddressesProvider {// Identifier of the Aave Marketstring private _marketId;// Map of registered addresses (identifier => registeredAddress)mapping(bytes32 => address) private _addresses;// Main identifiersbytes32 private constant POOL = 'POOL';bytes32 private constant POOL_CONFIGURATOR = 'POOL_CONFIGURATOR';bytes32 private constant PRICE_ORACLE = 'PRICE_ORACLE';bytes32 private constant ACL_MANAGER = 'ACL_MANAGER';
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {Ownable} from '../../dependencies/openzeppelin/contracts/Ownable.sol';import {Errors} from '../libraries/helpers/Errors.sol';import {IPoolAddressesProviderRegistry} from '../../interfaces/IPoolAddressesProviderRegistry.sol';/*** @title PoolAddressesProviderRegistry* @author Aave* @notice Main registry of PoolAddressesProvider of Aave markets.* @dev Used for indexing purposes of Aave protocol's markets. The id assigned to a PoolAddressesProvider refers to the* market it is connected with, for example with `1` for the Aave main market and `2` for the next created.*/contract PoolAddressesProviderRegistry is Ownable, IPoolAddressesProviderRegistry {// Map of address provider ids (addressesProvider => id)mapping(address => uint256) private _addressesProviderToId;// Map of id to address provider (id => addressesProvider)mapping(uint256 => address) private _idToAddressesProvider;// List of addresses providersaddress[] private _addressesProvidersList;// Map of address provider list indexes (addressesProvider => indexInList)mapping(address => uint256) private _addressesProvidersIndexes;/*** @dev Constructor.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity 0.8.12;import {BaseUpgradeabilityProxy} from '../../../dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol';/*** @title BaseImmutableAdminUpgradeabilityProxy* @author Aave, inspired by the OpenZeppelin upgradeability proxy pattern* @notice This contract combines an upgradeability proxy with an authorization* mechanism for administrative tasks.* @dev The admin role is stored in an immutable, which helps saving transactions costs* All external functions in this contract must be guarded by the* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity* feature proposal that would enable this to be done automatically.*/contract BaseImmutableAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {address internal immutable _admin;/*** @dev Constructor.* @param admin The address of the admin*/constructor(address admin) {_admin = admin;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity 0.8.12;import {InitializableUpgradeabilityProxy} from '../../../dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol';import {Proxy} from '../../../dependencies/openzeppelin/upgradeability/Proxy.sol';import {BaseImmutableAdminUpgradeabilityProxy} from './BaseImmutableAdminUpgradeabilityProxy.sol';/*** @title InitializableAdminUpgradeabilityProxy* @author Aave* @dev Extends BaseAdminUpgradeabilityProxy with an initializer function*/contract InitializableImmutableAdminUpgradeabilityProxy isBaseImmutableAdminUpgradeabilityProxy,InitializableUpgradeabilityProxy{/*** @dev Constructor.* @param admin The address of the admin*/constructor(address admin) BaseImmutableAdminUpgradeabilityProxy(admin) {// Intentionally left blank}/// @inheritdoc BaseImmutableAdminUpgradeabilityProxyfunction _willFallback() internal override(BaseImmutableAdminUpgradeabilityProxy, Proxy) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity 0.8.12;/*** @title VersionedInitializable* @author Aave, inspired by the OpenZeppelin Initializable contract* @notice Helper contract to implement initializer functions. To use it, replace* the constructor with a function that has the `initializer` modifier.* @dev 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.*/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.*/bool private initializing;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;import {Errors} from '../helpers/Errors.sol';import {DataTypes} from '../types/DataTypes.sol';/*** @title ReserveConfiguration library* @author Aave* @notice Implements the bitmap logic to handle the reserve configuration*/library ReserveConfiguration {uint256 internal constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignoreuint256 internal constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignoreuint256 internal constant LIQUIDATION_BONUS_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFF; // prettier-ignoreuint256 internal constant DECIMALS_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF; // prettier-ignoreuint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignoreuint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignoreuint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignoreuint256 internal constant STABLE_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFF; // prettier-ignoreuint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignoreuint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignoreuint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignoreuint256 internal constant FLASHLOAN_ENABLED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFFF; // prettier-ignoreuint256 internal constant RESERVE_FACTOR_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFF; // prettier-ignoreuint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;import {Errors} from '../helpers/Errors.sol';import {DataTypes} from '../types/DataTypes.sol';import {ReserveConfiguration} from './ReserveConfiguration.sol';/*** @title UserConfiguration library* @author Aave* @notice Implements the bitmap logic to handle the user configuration*/library UserConfiguration {using ReserveConfiguration for DataTypes.ReserveConfigurationMap;uint256 internal constant BORROWING_MASK =0x5555555555555555555555555555555555555555555555555555555555555555;uint256 internal constant COLLATERAL_MASK =0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;/*** @notice Sets if the user is borrowing the reserve identified by reserveIndex* @param self The configuration object* @param reserveIndex The index of the reserve in the bitmap* @param borrowing True if the user is borrowing the reserve, false otherwise*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;/*** @title Errors library* @author Aave* @notice Defines the error messages emitted by the different contracts of the Aave protocol*/library Errors {string public constant CALLER_NOT_POOL_ADMIN = '1'; // 'The caller of the function is not a pool admin'string public constant CALLER_NOT_EMERGENCY_ADMIN = '2'; // 'The caller of the function is not an emergency admin'string public constant CALLER_NOT_POOL_OR_EMERGENCY_ADMIN = '3'; // 'The caller of the function is not a pool or emergency admin'string public constant CALLER_NOT_RISK_OR_POOL_ADMIN = '4'; // 'The caller of the function is not a risk or pool admin'string public constant CALLER_NOT_ASSET_LISTING_OR_POOL_ADMIN = '5'; // 'The caller of the function is not an asset listing or pool admin'string public constant CALLER_NOT_BRIDGE = '6'; // 'The caller of the function is not a bridge'string public constant ADDRESSES_PROVIDER_NOT_REGISTERED = '7'; // 'Pool addresses provider is not registered'string public constant INVALID_ADDRESSES_PROVIDER_ID = '8'; // 'Invalid id for the pool addresses provider'string public constant NOT_CONTRACT = '9'; // 'Address is not a contract'string public constant CALLER_NOT_POOL_CONFIGURATOR = '10'; // 'The caller of the function is not the pool configurator'string public constant CALLER_NOT_ATOKEN = '11'; // 'The caller of the function is not an AToken'string public constant INVALID_ADDRESSES_PROVIDER = '12'; // 'The address of the pool addresses provider is invalid'string public constant INVALID_FLASHLOAN_EXECUTOR_RETURN = '13'; // 'Invalid return value of the flashloan executor function'string public constant RESERVE_ALREADY_ADDED = '14'; // 'Reserve has already been added to reserve list'string public constant NO_MORE_RESERVES_ALLOWED = '15'; // 'Maximum amount of reserves in the pool reached'string public constant EMODE_CATEGORY_RESERVED = '16'; // 'Zero eMode category is reserved for volatile heterogeneous assets'string public constant INVALID_EMODE_CATEGORY_ASSIGNMENT = '17'; // 'Invalid eMode category assignment to asset'
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';import {DataTypes} from '../types/DataTypes.sol';/*** @title Helpers library* @author Aave*/library Helpers {/*** @notice Fetches the user current stable and variable debt balances* @param user The user address* @param reserveCache The reserve cache data object* @return The stable debt balance* @return The variable debt balance*/function getUserCurrentDebt(address user,DataTypes.ReserveCache memory reserveCache) internal view returns (uint256, uint256) {return (IERC20(reserveCache.stableDebtTokenAddress).balanceOf(user),IERC20(reserveCache.variableDebtTokenAddress).balanceOf(user));
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {GPv2SafeERC20} from '../../../dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {SafeCast} from '../../../dependencies/openzeppelin/contracts/SafeCast.sol';import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';import {IStableDebtToken} from '../../../interfaces/IStableDebtToken.sol';import {IVariableDebtToken} from '../../../interfaces/IVariableDebtToken.sol';import {IAToken} from '../../../interfaces/IAToken.sol';import {UserConfiguration} from '../configuration/UserConfiguration.sol';import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';import {Helpers} from '../helpers/Helpers.sol';import {DataTypes} from '../types/DataTypes.sol';import {ValidationLogic} from './ValidationLogic.sol';import {ReserveLogic} from './ReserveLogic.sol';import {IsolationModeLogic} from './IsolationModeLogic.sol';/*** @title BorrowLogic library* @author Aave* @notice Implements the base logic for all the actions related to borrowing*/library BorrowLogic {using ReserveLogic for DataTypes.ReserveCache;using ReserveLogic for DataTypes.ReserveData;using GPv2SafeERC20 for IERC20;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';import {GPv2SafeERC20} from '../../../dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {SafeCast} from '../../../dependencies/openzeppelin/contracts/SafeCast.sol';import {IAToken} from '../../../interfaces/IAToken.sol';import {DataTypes} from '../types/DataTypes.sol';import {UserConfiguration} from '../configuration/UserConfiguration.sol';import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';import {WadRayMath} from '../math/WadRayMath.sol';import {PercentageMath} from '../math/PercentageMath.sol';import {Errors} from '../helpers/Errors.sol';import {ValidationLogic} from './ValidationLogic.sol';import {ReserveLogic} from './ReserveLogic.sol';library BridgeLogic {using ReserveLogic for DataTypes.ReserveCache;using ReserveLogic for DataTypes.ReserveData;using UserConfiguration for DataTypes.UserConfigurationMap;using ReserveConfiguration for DataTypes.ReserveConfigurationMap;using WadRayMath for uint256;using PercentageMath for uint256;using SafeCast for uint256;using GPv2SafeERC20 for IERC20;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;/*** @title CalldataLogic library* @author Aave* @notice Library to decode calldata, used to optimize calldata size in L2Pool for transaction cost reduction*/library CalldataLogic {/*** @notice Decodes compressed supply params to standard params* @param reservesList The addresses of all the active reserves* @param args The packed supply params* @return The address of the underlying reserve* @return The amount to supply* @return The referralCode*/function decodeSupplyParams(mapping(uint256 => address) storage reservesList,bytes32 args) internal view returns (address, uint256, uint16) {uint16 assetId;uint256 amount;uint16 referralCode;assembly {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IPool} from '../../../interfaces/IPool.sol';import {IInitializableAToken} from '../../../interfaces/IInitializableAToken.sol';import {IInitializableDebtToken} from '../../../interfaces/IInitializableDebtToken.sol';import {InitializableImmutableAdminUpgradeabilityProxy} from '../aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol';import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';import {DataTypes} from '../types/DataTypes.sol';import {ConfiguratorInputTypes} from '../types/ConfiguratorInputTypes.sol';/*** @title ConfiguratorLogic library* @author Aave* @notice Implements the functions to initialize reserves and update aTokens and debtTokens*/library ConfiguratorLogic {using ReserveConfiguration for DataTypes.ReserveConfigurationMap;// See `IPoolConfigurator` for descriptionsevent ReserveInitialized(address indexed asset,address indexed aToken,address stableDebtToken,address variableDebtToken,address interestRateStrategyAddress
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {GPv2SafeERC20} from '../../../dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';import {IPriceOracleGetter} from '../../../interfaces/IPriceOracleGetter.sol';import {UserConfiguration} from '../configuration/UserConfiguration.sol';import {Errors} from '../helpers/Errors.sol';import {WadRayMath} from '../math/WadRayMath.sol';import {PercentageMath} from '../math/PercentageMath.sol';import {DataTypes} from '../types/DataTypes.sol';import {ValidationLogic} from './ValidationLogic.sol';import {ReserveLogic} from './ReserveLogic.sol';/*** @title EModeLogic library* @author Aave* @notice Implements the base logic for all the actions related to the eMode*/library EModeLogic {using ReserveLogic for DataTypes.ReserveCache;using ReserveLogic for DataTypes.ReserveData;using GPv2SafeERC20 for IERC20;using UserConfiguration for DataTypes.UserConfigurationMap;using WadRayMath for uint256;using PercentageMath for uint256;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';import {IScaledBalanceToken} from '../../../interfaces/IScaledBalanceToken.sol';import {IPriceOracleGetter} from '../../../interfaces/IPriceOracleGetter.sol';import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';import {UserConfiguration} from '../configuration/UserConfiguration.sol';import {PercentageMath} from '../math/PercentageMath.sol';import {WadRayMath} from '../math/WadRayMath.sol';import {DataTypes} from '../types/DataTypes.sol';import {ReserveLogic} from './ReserveLogic.sol';import {EModeLogic} from './EModeLogic.sol';/*** @title GenericLogic library* @author Aave* @notice Implements protocol-level logic to calculate and validate the state of a user*/library GenericLogic {using ReserveLogic for DataTypes.ReserveData;using WadRayMath for uint256;using PercentageMath for uint256;using ReserveConfiguration for DataTypes.ReserveConfigurationMap;using UserConfiguration for DataTypes.UserConfigurationMap;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {DataTypes} from '../types/DataTypes.sol';import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';import {UserConfiguration} from '../configuration/UserConfiguration.sol';import {SafeCast} from '../../../dependencies/openzeppelin/contracts/SafeCast.sol';/*** @title IsolationModeLogic library* @author Aave* @notice Implements the base logic for handling repayments for assets borrowed in isolation mode*/library IsolationModeLogic {using ReserveConfiguration for DataTypes.ReserveConfigurationMap;using UserConfiguration for DataTypes.UserConfigurationMap;using SafeCast for uint256;// See `IPool` for descriptionsevent IsolationModeTotalDebtUpdated(address indexed asset, uint256 totalDebt);/*** @notice updated the isolated debt whenever a position collateralized by an isolated asset is repaid or liquidated* @param reservesData The state of all the reserves* @param reservesList The addresses of all the active reserves* @param userConfig The user configuration mapping
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IERC20} from '../../../dependencies/openzeppelin/contracts//IERC20.sol';import {GPv2SafeERC20} from '../../../dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {PercentageMath} from '../../libraries/math/PercentageMath.sol';import {WadRayMath} from '../../libraries/math/WadRayMath.sol';import {Helpers} from '../../libraries/helpers/Helpers.sol';import {DataTypes} from '../../libraries/types/DataTypes.sol';import {ReserveLogic} from './ReserveLogic.sol';import {ValidationLogic} from './ValidationLogic.sol';import {GenericLogic} from './GenericLogic.sol';import {IsolationModeLogic} from './IsolationModeLogic.sol';import {EModeLogic} from './EModeLogic.sol';import {UserConfiguration} from '../../libraries/configuration/UserConfiguration.sol';import {ReserveConfiguration} from '../../libraries/configuration/ReserveConfiguration.sol';import {IAToken} from '../../../interfaces/IAToken.sol';import {IStableDebtToken} from '../../../interfaces/IStableDebtToken.sol';import {IVariableDebtToken} from '../../../interfaces/IVariableDebtToken.sol';import {IPriceOracleGetter} from '../../../interfaces/IPriceOracleGetter.sol';/*** @title LiquidationLogic library* @author Aave* @notice Implements actions involving management of collateral in the protocol, the main one being the liquidations*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {GPv2SafeERC20} from '../../../dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {Address} from '../../../dependencies/openzeppelin/contracts/Address.sol';import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';import {IAToken} from '../../../interfaces/IAToken.sol';import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';import {Errors} from '../helpers/Errors.sol';import {WadRayMath} from '../math/WadRayMath.sol';import {DataTypes} from '../types/DataTypes.sol';import {ReserveLogic} from './ReserveLogic.sol';import {ValidationLogic} from './ValidationLogic.sol';import {GenericLogic} from './GenericLogic.sol';/*** @title PoolLogic library* @author Aave* @notice Implements the logic for Pool specific functions*/library PoolLogic {using GPv2SafeERC20 for IERC20;using WadRayMath for uint256;using ReserveLogic for DataTypes.ReserveData;using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';import {GPv2SafeERC20} from '../../../dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {IStableDebtToken} from '../../../interfaces/IStableDebtToken.sol';import {IVariableDebtToken} from '../../../interfaces/IVariableDebtToken.sol';import {IReserveInterestRateStrategy} from '../../../interfaces/IReserveInterestRateStrategy.sol';import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';import {MathUtils} from '../math/MathUtils.sol';import {WadRayMath} from '../math/WadRayMath.sol';import {PercentageMath} from '../math/PercentageMath.sol';import {Errors} from '../helpers/Errors.sol';import {DataTypes} from '../types/DataTypes.sol';import {SafeCast} from '../../../dependencies/openzeppelin/contracts/SafeCast.sol';/*** @title ReserveLogic library* @author Aave* @notice Implements the logic to update the reserves state*/library ReserveLogic {using WadRayMath for uint256;using PercentageMath for uint256;using SafeCast for uint256;using GPv2SafeERC20 for IERC20;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';import {GPv2SafeERC20} from '../../../dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {IAToken} from '../../../interfaces/IAToken.sol';import {Errors} from '../helpers/Errors.sol';import {UserConfiguration} from '../configuration/UserConfiguration.sol';import {DataTypes} from '../types/DataTypes.sol';import {WadRayMath} from '../math/WadRayMath.sol';import {PercentageMath} from '../math/PercentageMath.sol';import {ValidationLogic} from './ValidationLogic.sol';import {ReserveLogic} from './ReserveLogic.sol';import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';/*** @title SupplyLogic library* @author Aave* @notice Implements the base logic for supply/withdraw*/library SupplyLogic {using ReserveLogic for DataTypes.ReserveCache;using ReserveLogic for DataTypes.ReserveData;using GPv2SafeERC20 for IERC20;using UserConfiguration for DataTypes.UserConfigurationMap;using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';import {Address} from '../../../dependencies/openzeppelin/contracts/Address.sol';import {GPv2SafeERC20} from '../../../dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {IReserveInterestRateStrategy} from '../../../interfaces/IReserveInterestRateStrategy.sol';import {IStableDebtToken} from '../../../interfaces/IStableDebtToken.sol';import {IScaledBalanceToken} from '../../../interfaces/IScaledBalanceToken.sol';import {IPriceOracleGetter} from '../../../interfaces/IPriceOracleGetter.sol';import {IAToken} from '../../../interfaces/IAToken.sol';import {IPriceOracleSentinel} from '../../../interfaces/IPriceOracleSentinel.sol';import {IPoolAddressesProvider} from '../../../interfaces/IPoolAddressesProvider.sol';import {IAccessControl} from '../../../dependencies/openzeppelin/contracts/IAccessControl.sol';import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';import {UserConfiguration} from '../configuration/UserConfiguration.sol';import {Errors} from '../helpers/Errors.sol';import {WadRayMath} from '../math/WadRayMath.sol';import {PercentageMath} from '../math/PercentageMath.sol';import {DataTypes} from '../types/DataTypes.sol';import {ReserveLogic} from './ReserveLogic.sol';import {GenericLogic} from './GenericLogic.sol';import {SafeCast} from '../../../dependencies/openzeppelin/contracts/SafeCast.sol';import {IncentivizedERC20} from '../../tokenization/base/IncentivizedERC20.sol';/**
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;import {WadRayMath} from './WadRayMath.sol';/*** @title MathUtils library* @author Aave* @notice Provides functions to perform linear and compounded interest calculations*/library MathUtils {using WadRayMath for uint256;/// @dev Ignoring leap yearsuint256 internal constant SECONDS_PER_YEAR = 365 days;/*** @dev Function to calculate the interest accumulated using a linear interest rate formula* @param rate The interest rate, in ray* @param lastUpdateTimestamp The timestamp of the last update of the interest* @return The interest rate linearly accumulated during the timeDelta, in ray*/function calculateLinearInterest(uint256 rate,uint40 lastUpdateTimestamp) internal view returns (uint256) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;/*** @title PercentageMath library* @author Aave* @notice Provides functions to perform percentage calculations* @dev Percentages are defined by default with 2 decimals of precision (100.00). The precision is indicated by PERCENTAGE_FACTOR* @dev Operations are rounded. If a value is >=.5, will be rounded up, otherwise rounded down.*/library PercentageMath {// Maximum percentage factor (100.00%)uint256 internal constant PERCENTAGE_FACTOR = 1e4;// Half percentage factor (50.00%)uint256 internal constant HALF_PERCENTAGE_FACTOR = 0.5e4;/*** @notice Executes a percentage multiplication* @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328* @param value The value of which the percentage needs to be calculated* @param percentage The percentage of the value to be calculated* @return result value percentmul percentage*/function percentMul(uint256 value, uint256 percentage) internal pure returns (uint256 result) {// to avoid overflow, value <= (type(uint256).max - HALF_PERCENTAGE_FACTOR) / percentage
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;/*** @title WadRayMath library* @author Aave* @notice Provides functions to perform calculations with Wad and Ray units* @dev Provides mul and div function for wads (decimal numbers with 18 digits of precision) and rays (decimal numbers* with 27 digits of precision)* @dev Operations are rounded. If a value is >=.5, will be rounded up, otherwise rounded down.*/library WadRayMath {// HALF_WAD and HALF_RAY expressed with extended notation as constant with operations are not supported in Yul assemblyuint256 internal constant WAD = 1e18;uint256 internal constant HALF_WAD = 0.5e18;uint256 internal constant RAY = 1e27;uint256 internal constant HALF_RAY = 0.5e27;uint256 internal constant WAD_RAY_RATIO = 1e9;/*** @dev Multiplies two wad, rounding half up to the nearest wad* @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328* @param a Wad* @param b Wad
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;library ConfiguratorInputTypes {struct InitReserveInput {address aTokenImpl;address stableDebtTokenImpl;address variableDebtTokenImpl;uint8 underlyingAssetDecimals;address interestRateStrategyAddress;address underlyingAsset;address treasury;address incentivesController;string aTokenName;string aTokenSymbol;string variableDebtTokenName;string variableDebtTokenSymbol;string stableDebtTokenName;string stableDebtTokenSymbol;bytes params;}struct UpdateATokenInput {address asset;address treasury;address incentivesController;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;library DataTypes {struct ReserveData {//stores the reserve configurationReserveConfigurationMap configuration;//the liquidity index. Expressed in rayuint128 liquidityIndex;//the current supply rate. Expressed in rayuint128 currentLiquidityRate;//variable borrow index. Expressed in rayuint128 variableBorrowIndex;//the current variable borrow rate. Expressed in rayuint128 currentVariableBorrowRate;//the current stable borrow rate. Expressed in rayuint128 currentStableBorrowRate;//timestamp of last updateuint40 lastUpdateTimestamp;//the id of the reserve. Represents the position in the list of the active reservesuint16 id;//aToken addressaddress aTokenAddress;//stableDebtToken addressaddress stableDebtTokenAddress;//variableDebtToken address
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';import {WadRayMath} from '../libraries/math/WadRayMath.sol';import {PercentageMath} from '../libraries/math/PercentageMath.sol';import {DataTypes} from '../libraries/types/DataTypes.sol';import {Errors} from '../libraries/helpers/Errors.sol';import {IDefaultInterestRateStrategy} from '../../interfaces/IDefaultInterestRateStrategy.sol';import {IReserveInterestRateStrategy} from '../../interfaces/IReserveInterestRateStrategy.sol';import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';/*** @title DefaultReserveInterestRateStrategy contract* @author Aave* @notice Implements the calculation of the interest rates depending on the reserve state* @dev The model of interest rate is based on 2 slopes, one before the `OPTIMAL_USAGE_RATIO`* point of usage and another from that one to 100%.* - An instance of this same contract, can't be used across different Aave markets, due to the caching* of the PoolAddressesProvider*/contract DefaultReserveInterestRateStrategy is IDefaultInterestRateStrategy {using WadRayMath for uint256;using PercentageMath for uint256;/// @inheritdoc IDefaultInterestRateStrategy
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.10;import {Pool} from './Pool.sol';import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';import {IL2Pool} from '../../interfaces/IL2Pool.sol';import {CalldataLogic} from '../libraries/logic/CalldataLogic.sol';/*** @title L2Pool* @author Aave* @notice Calldata optimized extension of the Pool contract allowing users to pass compact calldata representation* to reduce transaction costs on rollups.*/contract L2Pool is Pool, IL2Pool {/*** @dev Constructor.* @param provider The address of the PoolAddressesProvider contract*/constructor(IPoolAddressesProvider provider) Pool(provider) {// Intentionally left blank}/// @inheritdoc IL2Poolfunction supply(bytes32 args) external override {(address asset, uint256 amount, uint16 referralCode) = CalldataLogic.decodeSupplyParams(
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol';import {Errors} from '../libraries/helpers/Errors.sol';import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';import {PoolLogic} from '../libraries/logic/PoolLogic.sol';import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol';import {EModeLogic} from '../libraries/logic/EModeLogic.sol';import {SupplyLogic} from '../libraries/logic/SupplyLogic.sol';import {FlashLoanLogic} from '../libraries/logic/FlashLoanLogic.sol';import {BorrowLogic} from '../libraries/logic/BorrowLogic.sol';import {LiquidationLogic} from '../libraries/logic/LiquidationLogic.sol';import {DataTypes} from '../libraries/types/DataTypes.sol';import {BridgeLogic} from '../libraries/logic/BridgeLogic.sol';import {IERC20WithPermit} from '../../interfaces/IERC20WithPermit.sol';import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';import {IPool} from '../../interfaces/IPool.sol';import {IACLManager} from '../../interfaces/IACLManager.sol';import {PoolStorage} from './PoolStorage.sol';/*** @title Pool contract* @author Aave* @notice Main point of interaction with an Aave protocol's market* - Users can:
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol';import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';import {Errors} from '../libraries/helpers/Errors.sol';import {PercentageMath} from '../libraries/math/PercentageMath.sol';import {DataTypes} from '../libraries/types/DataTypes.sol';import {ConfiguratorLogic} from '../libraries/logic/ConfiguratorLogic.sol';import {ConfiguratorInputTypes} from '../libraries/types/ConfiguratorInputTypes.sol';import {IPoolConfigurator} from '../../interfaces/IPoolConfigurator.sol';import {IPool} from '../../interfaces/IPool.sol';import {IACLManager} from '../../interfaces/IACLManager.sol';import {IPoolDataProvider} from '../../interfaces/IPoolDataProvider.sol';/*** @title PoolConfigurator* @author Aave* @dev Implements the configuration methods for the Aave protocol*/contract PoolConfigurator is VersionedInitializable, IPoolConfigurator {using PercentageMath for uint256;using ReserveConfiguration for DataTypes.ReserveConfigurationMap;IPoolAddressesProvider internal _addressesProvider;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {UserConfiguration} from '../libraries/configuration/UserConfiguration.sol';import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol';import {DataTypes} from '../libraries/types/DataTypes.sol';/*** @title PoolStorage* @author Aave* @notice Contract used as storage of the Pool contract.* @dev It defines the storage layout of the Pool contract.*/contract PoolStorage {using ReserveLogic for DataTypes.ReserveData;using ReserveConfiguration for DataTypes.ReserveConfigurationMap;using UserConfiguration for DataTypes.UserConfigurationMap;// Map of reserves and their data (underlyingAssetOfReserve => reserveData)mapping(address => DataTypes.ReserveData) internal _reserves;// Map of users address and their configuration data (userAddress => userConfiguration)mapping(address => DataTypes.UserConfigurationMap) internal _usersConfig;// List of reserves as a map (reserveId => reserve).
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';import {GPv2SafeERC20} from '../../dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {SafeCast} from '../../dependencies/openzeppelin/contracts/SafeCast.sol';import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol';import {Errors} from '../libraries/helpers/Errors.sol';import {WadRayMath} from '../libraries/math/WadRayMath.sol';import {IPool} from '../../interfaces/IPool.sol';import {IAToken} from '../../interfaces/IAToken.sol';import {IAaveIncentivesController} from '../../interfaces/IAaveIncentivesController.sol';import {IInitializableAToken} from '../../interfaces/IInitializableAToken.sol';import {ScaledBalanceTokenBase} from './base/ScaledBalanceTokenBase.sol';import {IncentivizedERC20} from './base/IncentivizedERC20.sol';import {EIP712Base} from './base/EIP712Base.sol';/*** @title Aave ERC20 AToken* @author Aave* @notice Implementation of the interest bearing token for the Aave protocol*/contract AToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base, IAToken {using WadRayMath for uint256;using SafeCast for uint256;using GPv2SafeERC20 for IERC20;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {Context} from '../../../dependencies/openzeppelin/contracts/Context.sol';import {Errors} from '../../libraries/helpers/Errors.sol';import {VersionedInitializable} from '../../libraries/aave-upgradeability/VersionedInitializable.sol';import {ICreditDelegationToken} from '../../../interfaces/ICreditDelegationToken.sol';import {EIP712Base} from './EIP712Base.sol';/*** @title DebtTokenBase* @author Aave* @notice Base contract for different types of debt tokens, like StableDebtToken or VariableDebtToken*/abstract contract DebtTokenBase isVersionedInitializable,EIP712Base,Context,ICreditDelegationToken{// Map of borrow allowances (delegator => delegatee => borrowAllowanceAmount)mapping(address => mapping(address => uint256)) internal _borrowAllowances;// Credit Delegation Typehashbytes32 public constant DELEGATION_WITH_SIG_TYPEHASH =keccak256('DelegationWithSig(address delegatee,uint256 value,uint256 nonce,uint256 deadline)');
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;/*** @title EIP712Base* @author Aave* @notice Base contract implementation of EIP712.*/abstract contract EIP712Base {bytes public constant EIP712_REVISION = bytes('1');bytes32 internal constant EIP712_DOMAIN =keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)');// Map of address nonces (address => nonce)mapping(address => uint256) internal _nonces;bytes32 internal _domainSeparator;uint256 internal immutable _chainId;/*** @dev Constructor.*/constructor() {_chainId = block.chainid;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;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 {SafeCast} from '../../../dependencies/openzeppelin/contracts/SafeCast.sol';import {WadRayMath} from '../../libraries/math/WadRayMath.sol';import {Errors} from '../../libraries/helpers/Errors.sol';import {IAaveIncentivesController} from '../../../interfaces/IAaveIncentivesController.sol';import {IPoolAddressesProvider} from '../../../interfaces/IPoolAddressesProvider.sol';import {IPool} from '../../../interfaces/IPool.sol';import {IACLManager} from '../../../interfaces/IACLManager.sol';/*** @title IncentivizedERC20* @author Aave, inspired by the Openzeppelin ERC20 implementation* @notice Basic ERC20 implementation*/abstract contract IncentivizedERC20 is Context, IERC20Detailed {using WadRayMath for uint256;using SafeCast for uint256;/*** @dev Only pool admin can call functions marked by this modifier.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IAaveIncentivesController} from '../../../interfaces/IAaveIncentivesController.sol';import {IPool} from '../../../interfaces/IPool.sol';import {IncentivizedERC20} from './IncentivizedERC20.sol';/*** @title MintableIncentivizedERC20* @author Aave* @notice Implements mint and burn functions for IncentivizedERC20*/abstract contract MintableIncentivizedERC20 is IncentivizedERC20 {/*** @dev Constructor.* @param pool The reference to the main Pool contract* @param name The name of the token* @param symbol The symbol of the token* @param decimals The number of decimals of the token*/constructor(IPool pool,string memory name,string memory symbol,uint8 decimals) IncentivizedERC20(pool, name, symbol, decimals) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {SafeCast} from '../../../dependencies/openzeppelin/contracts/SafeCast.sol';import {Errors} from '../../libraries/helpers/Errors.sol';import {WadRayMath} from '../../libraries/math/WadRayMath.sol';import {IPool} from '../../../interfaces/IPool.sol';import {IScaledBalanceToken} from '../../../interfaces/IScaledBalanceToken.sol';import {MintableIncentivizedERC20} from './MintableIncentivizedERC20.sol';/*** @title ScaledBalanceTokenBase* @author Aave* @notice Basic ERC20 implementation of scaled balance token*/abstract contract ScaledBalanceTokenBase is MintableIncentivizedERC20, IScaledBalanceToken {using WadRayMath for uint256;using SafeCast for uint256;/*** @dev Constructor.* @param pool The reference to the main Pool contract* @param name The name of the token* @param symbol The symbol of the token* @param decimals The number of decimals of the token*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IPool} from '../../interfaces/IPool.sol';import {IDelegationToken} from '../../interfaces/IDelegationToken.sol';import {AToken} from './AToken.sol';/*** @title DelegationAwareAToken* @author Aave* @notice AToken enabled to delegate voting power of the underlying asset to a different address* @dev The underlying asset needs to be compatible with the COMP delegation interface*/contract DelegationAwareAToken is AToken {/*** @dev Emitted when underlying voting power is delegated* @param delegatee The address of the delegatee*/event DelegateUnderlyingTo(address indexed delegatee);/*** @dev Constructor.* @param pool The address of the Pool contract*/constructor(IPool pool) AToken(pool) {// Intentionally left blank
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol';import {MathUtils} from '../libraries/math/MathUtils.sol';import {WadRayMath} from '../libraries/math/WadRayMath.sol';import {Errors} from '../libraries/helpers/Errors.sol';import {IAaveIncentivesController} from '../../interfaces/IAaveIncentivesController.sol';import {IInitializableDebtToken} from '../../interfaces/IInitializableDebtToken.sol';import {IStableDebtToken} from '../../interfaces/IStableDebtToken.sol';import {IPool} from '../../interfaces/IPool.sol';import {EIP712Base} from './base/EIP712Base.sol';import {DebtTokenBase} from './base/DebtTokenBase.sol';import {IncentivizedERC20} from './base/IncentivizedERC20.sol';import {SafeCast} from '../../dependencies/openzeppelin/contracts/SafeCast.sol';/*** @title StableDebtToken* @author Aave* @notice Implements a stable debt token to track the borrowing positions of users* at stable rate mode* @dev Transfer and approve functionalities are disabled since its a non-transferable token*/contract StableDebtToken is DebtTokenBase, IncentivizedERC20, IStableDebtToken {using WadRayMath for uint256;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity 0.8.12;import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';import {SafeCast} from '../../dependencies/openzeppelin/contracts/SafeCast.sol';import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol';import {WadRayMath} from '../libraries/math/WadRayMath.sol';import {Errors} from '../libraries/helpers/Errors.sol';import {IPool} from '../../interfaces/IPool.sol';import {IAaveIncentivesController} from '../../interfaces/IAaveIncentivesController.sol';import {IInitializableDebtToken} from '../../interfaces/IInitializableDebtToken.sol';import {IVariableDebtToken} from '../../interfaces/IVariableDebtToken.sol';import {EIP712Base} from './base/EIP712Base.sol';import {DebtTokenBase} from './base/DebtTokenBase.sol';import {ScaledBalanceTokenBase} from './base/ScaledBalanceTokenBase.sol';/*** @title VariableDebtToken* @author Aave* @notice Implements a variable debt token to track the borrowing positions of users* at variable rate mode* @dev Transfer and approve functionalities are disabled since its a non-transferable token*/contract VariableDebtToken is DebtTokenBase, ScaledBalanceTokenBase, IVariableDebtToken {using WadRayMath for uint256;using SafeCast for uint256;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {DataTypes} from '@zerolendxyz/core-v3/contracts/protocol/libraries/types/DataTypes.sol';import {FlashLoanSimpleReceiverBase} from '@zerolendxyz/core-v3/contracts/flashloan/base/FlashLoanSimpleReceiverBase.sol';import {GPv2SafeERC20} from '@zerolendxyz/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';import {IERC20Detailed} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol';import {IERC20WithPermit} from '@zerolendxyz/core-v3/contracts/interfaces/IERC20WithPermit.sol';import {IPoolAddressesProvider} from '@zerolendxyz/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';import {IPriceOracleGetter} from '@zerolendxyz/core-v3/contracts/interfaces/IPriceOracleGetter.sol';import {SafeMath} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/SafeMath.sol';import {Ownable} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol';/*** @title BaseParaSwapAdapter* @notice Utility functions for adapters using ParaSwap* @author Jason Raymond Bell*/abstract contract BaseParaSwapAdapter is FlashLoanSimpleReceiverBase, Ownable {using SafeMath for uint256;using GPv2SafeERC20 for IERC20;using GPv2SafeERC20 for IERC20Detailed;using GPv2SafeERC20 for IERC20WithPermit;struct PermitSignature {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {SafeERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/SafeERC20.sol';import {SafeMath} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/SafeMath.sol';import {PercentageMath} from '@zerolendxyz/core-v3/contracts/protocol/libraries/math/PercentageMath.sol';import {IPoolAddressesProvider} from '@zerolendxyz/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';import {IERC20Detailed} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol';import {IParaSwapAugustus} from './interfaces/IParaSwapAugustus.sol';import {IParaSwapAugustusRegistry} from './interfaces/IParaSwapAugustusRegistry.sol';import {BaseParaSwapAdapter} from './BaseParaSwapAdapter.sol';/*** @title BaseParaSwapBuyAdapter* @notice Implements the logic for buying tokens on ParaSwap*/abstract contract BaseParaSwapBuyAdapter is BaseParaSwapAdapter {using PercentageMath for uint256;using SafeMath for uint256;using SafeERC20 for IERC20Detailed;IParaSwapAugustusRegistry public immutable AUGUSTUS_REGISTRY;constructor(IPoolAddressesProvider addressesProvider,IParaSwapAugustusRegistry augustusRegistry
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {SafeERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/SafeERC20.sol';import {SafeMath} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/SafeMath.sol';import {PercentageMath} from '@zerolendxyz/core-v3/contracts/protocol/libraries/math/PercentageMath.sol';import {IPoolAddressesProvider} from '@zerolendxyz/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';import {IERC20Detailed} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol';import {IParaSwapAugustus} from './interfaces/IParaSwapAugustus.sol';import {IParaSwapAugustusRegistry} from './interfaces/IParaSwapAugustusRegistry.sol';import {BaseParaSwapAdapter} from './BaseParaSwapAdapter.sol';/*** @title BaseParaSwapSellAdapter* @notice Implements the logic for selling tokens on ParaSwap* @author Jason Raymond Bell*/abstract contract BaseParaSwapSellAdapter is BaseParaSwapAdapter {using PercentageMath for uint256;using SafeMath for uint256;using SafeERC20 for IERC20Detailed;IParaSwapAugustusRegistry public immutable AUGUSTUS_REGISTRY;constructor(IPoolAddressesProvider addressesProvider,
123456// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;interface IParaSwapAugustus {function getTokenTransferProxy() external view returns (address);}
123456// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;interface IParaSwapAugustusRegistry {function isValidAugustus(address augustus) external view returns (bool);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IERC20Detailed} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol';import {IERC20WithPermit} from '@zerolendxyz/core-v3/contracts/interfaces/IERC20WithPermit.sol';import {IPoolAddressesProvider} from '@zerolendxyz/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';import {SafeERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/SafeERC20.sol';import {SafeMath} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/SafeMath.sol';import {BaseParaSwapSellAdapter} from './BaseParaSwapSellAdapter.sol';import {IParaSwapAugustusRegistry} from './interfaces/IParaSwapAugustusRegistry.sol';import {IParaSwapAugustus} from './interfaces/IParaSwapAugustus.sol';import {ReentrancyGuard} from '../../dependencies/openzeppelin/ReentrancyGuard.sol';/*** @title ParaSwapLiquiditySwapAdapter* @notice Adapter to swap liquidity using ParaSwap.* @author Jason Raymond Bell*/contract ParaSwapLiquiditySwapAdapter is BaseParaSwapSellAdapter, ReentrancyGuard {using SafeMath for uint256;using SafeERC20 for IERC20Detailed;constructor(IPoolAddressesProvider addressesProvider,IParaSwapAugustusRegistry augustusRegistry,address owner
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {DataTypes} from '@zerolendxyz/core-v3/contracts/protocol/libraries/types/DataTypes.sol';import {IERC20Detailed} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol';import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';import {IERC20WithPermit} from '@zerolendxyz/core-v3/contracts/interfaces/IERC20WithPermit.sol';import {IPoolAddressesProvider} from '@zerolendxyz/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';import {SafeERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/SafeERC20.sol';import {SafeMath} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/SafeMath.sol';import {BaseParaSwapBuyAdapter} from './BaseParaSwapBuyAdapter.sol';import {IParaSwapAugustusRegistry} from './interfaces/IParaSwapAugustusRegistry.sol';import {IParaSwapAugustus} from './interfaces/IParaSwapAugustus.sol';import {ReentrancyGuard} from '../../dependencies/openzeppelin/ReentrancyGuard.sol';/*** @title ParaSwapRepayAdapter* @notice ParaSwap Adapter to perform a repay of a debt with collateral.* @author Aave**/contract ParaSwapRepayAdapter is BaseParaSwapBuyAdapter, ReentrancyGuard {using SafeMath for uint256;using SafeERC20 for IERC20;struct RepayParams {address collateralAsset;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.12;/*** @dev Contract module that helps prevent reentrant calls to a function.** Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier* available, which can be applied to functions to make sure there are no nested* (reentrant) calls to them.** Note that because there is a single `nonReentrant` guard, functions marked as* `nonReentrant` may not call one another. This can be worked around by making* those functions `private`, and then adding `external` `nonReentrant` entry* points to them.** TIP: If you would like to learn more about reentrancy and alternative ways* to protect against it, check out our blog post* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].*/abstract contract ReentrancyGuard {// Booleans are more expensive than uint256 or any type that takes up a full// word because each write operation emits an extra SLOAD to first read the// slot's contents, replace the bits taken up by the boolean, and then write// back. This is the compiler's defense against contract upgrades and// pointer aliasing, and it cannot be disabled.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';import {DataTypes} from '@zerolendxyz/core-v3/contracts/protocol/libraries/types/DataTypes.sol';/*** @title DataTypesHelper* @author Aave* @dev Helper library to track user current debt balance, used by WrappedTokenGatewayV3*/library DataTypesHelper {/*** @notice Fetches the user current stable and variable debt balances* @param user The user address* @param reserve The reserve data object* @return The stable debt balance* @return The variable debt balance**/function getUserCurrentDebt(address user,DataTypes.ReserveData memory reserve) internal view returns (uint256, uint256) {return (IERC20(reserve.stableDebtTokenAddress).balanceOf(user),IERC20(reserve.variableDebtTokenAddress).balanceOf(user)
12345678910111213141516171819// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;interface IEACAggregatorProxy {function decimals() external view returns (uint8);function latestAnswer() external view returns (int256);function latestTimestamp() external view returns (uint256);function latestRound() external view returns (uint256);function getAnswer(uint256 roundId) external view returns (int256);function getTimestamp(uint256 roundId) external view returns (uint256);event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);event NewRound(uint256 indexed roundId, address indexed startedBy);}
123456789101112// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';interface IERC20DetailedBytes is IERC20 {function name() external view returns (bytes32);function symbol() external view returns (bytes32);function decimals() external view returns (uint8);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IPoolAddressesProvider} from '@zerolendxyz/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';interface IUiIncentiveDataProviderV3 {struct AggregatedReserveIncentiveData {address underlyingAsset;IncentiveData aIncentiveData;IncentiveData vIncentiveData;IncentiveData sIncentiveData;}struct IncentiveData {address tokenAddress;address incentiveControllerAddress;RewardInfo[] rewardsTokenInformation;}struct RewardInfo {string rewardTokenSymbol;address rewardTokenAddress;address rewardOracleAddress;uint256 emissionPerSecond;uint256 incentivesLastUpdateTimestamp;uint256 tokenIncentivesIndex;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IPoolAddressesProvider} from '@zerolendxyz/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';interface IUiPoolDataProviderV3 {struct InterestRates {uint256 variableRateSlope1;uint256 variableRateSlope2;uint256 stableRateSlope1;uint256 stableRateSlope2;uint256 baseStableBorrowRate;uint256 baseVariableBorrowRate;uint256 optimalUsageRatio;}struct AggregatedReserveData {address underlyingAsset;string name;string symbol;uint256 decimals;uint256 baseLTVasCollateral;uint256 reserveLiquidationThreshold;uint256 reserveLiquidationBonus;uint256 reserveFactor;bool usageAsCollateralEnabled;
123456789101112// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;interface IWETH {function deposit() external payable;function withdraw(uint256) external;function approve(address guy, uint256 wad) external returns (bool);function transferFrom(address src, address dst, uint256 wad) external returns (bool);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;interface IWrappedTokenGatewayV3 {function depositETH(address pool, address onBehalfOf, uint16 referralCode) external payable;function withdrawETH(address pool, uint256 amount, address onBehalfOf) external;function repayETH(address pool,uint256 amount,uint256 rateMode,address onBehalfOf) external payable;function borrowETH(address pool,uint256 amount,uint256 interestRateMode,uint16 referralCode) external;function withdrawETHWithPermit(address pool,uint256 amount,address to,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IERC20Detailed} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol';import {IPoolAddressesProvider} from '@zerolendxyz/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';import {IPool} from '@zerolendxyz/core-v3/contracts/interfaces/IPool.sol';import {IncentivizedERC20} from '@zerolendxyz/core-v3/contracts/protocol/tokenization/base/IncentivizedERC20.sol';import {UserConfiguration} from '@zerolendxyz/core-v3/contracts/protocol/libraries/configuration/UserConfiguration.sol';import {DataTypes} from '@zerolendxyz/core-v3/contracts/protocol/libraries/types/DataTypes.sol';import {IRewardsController} from '../rewards/interfaces/IRewardsController.sol';import {IEACAggregatorProxy} from './interfaces/IEACAggregatorProxy.sol';import {IUiIncentiveDataProviderV3} from './interfaces/IUiIncentiveDataProviderV3.sol';contract UiIncentiveDataProviderV3 is IUiIncentiveDataProviderV3 {using UserConfiguration for DataTypes.UserConfigurationMap;function getFullReservesIncentiveData(IPoolAddressesProvider provider,address user)externalviewoverridereturns (AggregatedReserveIncentiveData[] memory, UserReserveIncentiveData[] memory){return (_getReservesIncentivesData(provider), _getUserReservesIncentivesData(provider, user));
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IERC20Detailed} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol';import {IPoolAddressesProvider} from '@zerolendxyz/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';import {IPool} from '@zerolendxyz/core-v3/contracts/interfaces/IPool.sol';import {IAaveOracle} from '@zerolendxyz/core-v3/contracts/interfaces/IAaveOracle.sol';import {IAToken} from '@zerolendxyz/core-v3/contracts/interfaces/IAToken.sol';import {IVariableDebtToken} from '@zerolendxyz/core-v3/contracts/interfaces/IVariableDebtToken.sol';import {IStableDebtToken} from '@zerolendxyz/core-v3/contracts/interfaces/IStableDebtToken.sol';import {DefaultReserveInterestRateStrategy} from '@zerolendxyz/core-v3/contracts/protocol/pool/DefaultReserveInterestRateStrategy.sol';import {AaveProtocolDataProvider} from '@zerolendxyz/core-v3/contracts/misc/AaveProtocolDataProvider.sol';import {WadRayMath} from '@zerolendxyz/core-v3/contracts/protocol/libraries/math/WadRayMath.sol';import {ReserveConfiguration} from '@zerolendxyz/core-v3/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';import {UserConfiguration} from '@zerolendxyz/core-v3/contracts/protocol/libraries/configuration/UserConfiguration.sol';import {DataTypes} from '@zerolendxyz/core-v3/contracts/protocol/libraries/types/DataTypes.sol';import {IEACAggregatorProxy} from './interfaces/IEACAggregatorProxy.sol';import {IERC20DetailedBytes} from './interfaces/IERC20DetailedBytes.sol';import {IUiPoolDataProviderV3} from './interfaces/IUiPoolDataProviderV3.sol';contract UiPoolDataProviderV3 is IUiPoolDataProviderV3 {using WadRayMath for uint256;using ReserveConfiguration for DataTypes.ReserveConfigurationMap;using UserConfiguration for DataTypes.UserConfigurationMap;IEACAggregatorProxy public immutable networkBaseTokenPriceInUsdProxyAggregator;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {Address} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/Address.sol';import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';import {IPoolAddressesProvider} from '@zerolendxyz/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';import {IPool} from '@zerolendxyz/core-v3/contracts/interfaces/IPool.sol';import {GPv2SafeERC20} from '@zerolendxyz/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {ReserveConfiguration} from '@zerolendxyz/core-v3/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';import {DataTypes} from '@zerolendxyz/core-v3/contracts/protocol/libraries/types/DataTypes.sol';/*** @title WalletBalanceProvider contract* @author Aave, influenced by https://github.com/wbobeirne/eth-balance-checker/blob/master/contracts/BalanceChecker.sol* @notice Implements a logic of getting multiple tokens balance for one user address* @dev NOTE: THIS CONTRACT IS NOT USED WITHIN THE AAVE PROTOCOL. It's an accessory contract used to reduce the number of calls* towards the blockchain from the Aave backend.**/contract WalletBalanceProvider {using Address for address payable;using Address for address;using GPv2SafeERC20 for IERC20;using ReserveConfiguration for DataTypes.ReserveConfigurationMap;address constant MOCK_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {Ownable} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol';import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';import {GPv2SafeERC20} from '@zerolendxyz/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {IWETH} from '@zerolendxyz/core-v3/contracts/misc/interfaces/IWETH.sol';import {IPool} from '@zerolendxyz/core-v3/contracts/interfaces/IPool.sol';import {IAToken} from '@zerolendxyz/core-v3/contracts/interfaces/IAToken.sol';import {ReserveConfiguration} from '@zerolendxyz/core-v3/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';import {UserConfiguration} from '@zerolendxyz/core-v3/contracts/protocol/libraries/configuration/UserConfiguration.sol';import {DataTypes} from '@zerolendxyz/core-v3/contracts/protocol/libraries/types/DataTypes.sol';import {IWrappedTokenGatewayV3} from './interfaces/IWrappedTokenGatewayV3.sol';import {DataTypesHelper} from '../libraries/DataTypesHelper.sol';/*** @dev This contract is an upgrade of the WrappedTokenGatewayV3 contract, with immutable pool address.* This contract keeps the same interface of the deprecated WrappedTokenGatewayV3 contract.*/contract WrappedTokenGatewayV3 is IWrappedTokenGatewayV3, Ownable {using ReserveConfiguration for DataTypes.ReserveConfigurationMap;using UserConfiguration for DataTypes.UserConfigurationMap;using GPv2SafeERC20 for IERC20;IWETH internal immutable WETH;IPool internal immutable POOL;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;import {Ownable} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol';import {TestnetERC20} from './TestnetERC20.sol';import {IFaucet} from './IFaucet.sol';/*** @title Faucet* @dev Ownable Faucet Contract*/contract Faucet is IFaucet, Ownable {/// @inheritdoc IFaucetuint256 public constant MAX_MINT_AMOUNT = 10000;// Mapping to control mint of assets (allowed by default)mapping(address => bool) internal _nonMintable;// If _permissioned is enabled, then only owner can mint Testnet ERC20 tokens// If disabled, anyone can call mint at the faucet, for PoC environmentsbool internal _permissioned;constructor(address owner, bool permissioned) {require(owner != address(0));transferOwnership(owner);_permissioned = permissioned;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;interface IFaucet {/*** @notice Returns the maximum amount of tokens per mint allowed* @return The maximum amount of tokens per mint allowed*/function MAX_MINT_AMOUNT() external pure returns (uint256);/*** @notice Function to mint Testnet tokens to the destination address* @param token The address of the token to perform the mint* @param to The address to send the minted tokens* @param amount The amount of tokens to mint* @return The amount minted**/function mint(address token, address to, uint256 amount) external returns (uint256);/*** @notice Enable or disable the need of authentication to call `mint` function* @param value If true, ask for authentication at `mint` function, if false, disable the authentication*/function setPermissioned(bool value) external;/**
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;import {Ownable} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol';import {ERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/ERC20.sol';import {IERC20WithPermit} from '@zerolendxyz/core-v3/contracts/interfaces/IERC20WithPermit.sol';/*** @title TestnetERC20* @dev ERC20 minting logic*/contract TestnetERC20 is IERC20WithPermit, ERC20, Ownable {bytes public constant EIP712_REVISION = bytes('1');bytes32 internal constant EIP712_DOMAIN =keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)');bytes32 public constant PERMIT_TYPEHASH =keccak256('Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)');// Map of address nonces (address => nonce)mapping(address => uint256) internal _nonces;bytes32 public DOMAIN_SEPARATOR;constructor(string memory name,string memory symbol,
1234567891011121314151617181920// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;import {WETH9} from '@zerolendxyz/core-v3/contracts/dependencies/weth/WETH9.sol';import {Ownable} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol';contract WETH9Mock is WETH9, Ownable {constructor(string memory mockName, string memory mockSymbol, address owner) {name = mockName;symbol = mockSymbol;transferOwnership(owner);}function mint(address account, uint256 value) public onlyOwner returns (bool) {balanceOf[account] += value;emit Transfer(address(0), account, value);return true;}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {Ownable} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol';import {IEACAggregatorProxy} from '../misc/interfaces/IEACAggregatorProxy.sol';import {IEmissionManager} from './interfaces/IEmissionManager.sol';import {ITransferStrategyBase} from './interfaces/ITransferStrategyBase.sol';import {IRewardsController} from './interfaces/IRewardsController.sol';import {RewardsDataTypes} from './libraries/RewardsDataTypes.sol';/*** @title EmissionManager* @author Aave* @notice It manages the list of admins of reward emissions and provides functions to control reward emissions.*/contract EmissionManager is Ownable, IEmissionManager {// reward => emissionAdminmapping(address => address) internal _emissionAdmins;IRewardsController internal _rewardsController;/*** @dev Only emission admin of the given reward can call functions marked by this modifier.**/modifier onlyEmissionAdmin(address reward) {require(msg.sender == _emissionAdmins[reward], 'ONLY_EMISSION_ADMIN');
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IEACAggregatorProxy} from '../../misc/interfaces/IEACAggregatorProxy.sol';import {RewardsDataTypes} from '../libraries/RewardsDataTypes.sol';import {ITransferStrategyBase} from './ITransferStrategyBase.sol';import {IRewardsController} from './IRewardsController.sol';/*** @title IEmissionManager* @author Aave* @notice Defines the basic interface for the Emission Manager*/interface IEmissionManager {/*** @dev Emitted when the admin of a reward emission is updated.* @param reward The address of the rewarding token* @param oldAdmin The address of the old emission admin* @param newAdmin The address of the new emission admin*/event EmissionAdminUpdated(address indexed reward,address indexed oldAdmin,address indexed newAdmin);
123456789101112131415// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {ITransferStrategyBase} from './ITransferStrategyBase.sol';/*** @title IPullRewardsTransferStrategy* @author Aave**/interface IPullRewardsTransferStrategy is ITransferStrategyBase {/*** @return Address of the rewards vault*/function getRewardsVault() external view returns (address);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IRewardsDistributor} from './IRewardsDistributor.sol';import {ITransferStrategyBase} from './ITransferStrategyBase.sol';import {IEACAggregatorProxy} from '../../misc/interfaces/IEACAggregatorProxy.sol';import {RewardsDataTypes} from '../libraries/RewardsDataTypes.sol';/*** @title IRewardsController* @author Aave* @notice Defines the basic interface for a Rewards Controller.*/interface IRewardsController is IRewardsDistributor {/*** @dev Emitted when a new address is whitelisted as claimer of rewards on behalf of a user* @param user The address of the user* @param claimer The address of the claimer*/event ClaimerSet(address indexed user, address indexed claimer);/*** @dev Emitted when rewards are claimed* @param user The address of the user rewards has been claimed on behalf of* @param reward The address of the token reward is claimed* @param to The address of the receiver of the rewards
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;/*** @title IRewardsDistributor* @author Aave* @notice Defines the basic interface for a Rewards Distributor.*/interface IRewardsDistributor {/*** @dev Emitted when the configuration of the rewards of an asset is updated.* @param asset The address of the incentivized asset* @param reward The address of the reward token* @param oldEmission The old emissions per second value of the reward distribution* @param newEmission The new emissions per second value of the reward distribution* @param oldDistributionEnd The old end timestamp of the reward distribution* @param newDistributionEnd The new end timestamp of the reward distribution* @param assetIndex The index of the asset distribution*/event AssetConfigUpdated(address indexed asset,address indexed reward,uint256 oldEmission,uint256 newEmission,uint256 oldDistributionEnd,uint256 newDistributionEnd,
1234567891011121314// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;interface IStakedToken {function STAKED_TOKEN() external view returns (address);function stake(address to, uint256 amount) external;function redeem(address to, uint256 amount) external;function cooldown() external;function claimRewards(address to, uint256 amount) external;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IStakedToken} from '../interfaces/IStakedToken.sol';import {ITransferStrategyBase} from './ITransferStrategyBase.sol';/*** @title IStakedTokenTransferStrategy* @author Aave**/interface IStakedTokenTransferStrategy is ITransferStrategyBase {/*** @dev Perform a MAX_UINT approval of AAVE to the Staked Aave contract.*/function renewApproval() external;/*** @dev Drop approval of AAVE to the Staked Aave contract in case of emergency.*/function dropApproval() external;/*** @return Staked Token contract address*/function getStakeContract() external view returns (address);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;interface ITransferStrategyBase {event EmergencyWithdrawal(address indexed caller,address indexed token,address indexed to,uint256 amount);/*** @dev Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation* @param to Account to transfer rewards* @param reward Address of the reward token* @param amount Amount to transfer to the "to" address parameter* @return Returns true bool if transfer logic succeeds*/function performTransfer(address to, address reward, uint256 amount) external returns (bool);/*** @return Returns the address of the Incentives Controller*/function getIncentivesController() external view returns (address);/**
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {ITransferStrategyBase} from '../interfaces/ITransferStrategyBase.sol';import {IEACAggregatorProxy} from '../../misc/interfaces/IEACAggregatorProxy.sol';library RewardsDataTypes {struct RewardsConfigInput {uint88 emissionPerSecond;uint256 totalSupply;uint32 distributionEnd;address asset;address reward;ITransferStrategyBase transferStrategy;IEACAggregatorProxy rewardOracle;}struct UserAssetBalance {address asset;uint256 userBalance;uint256 totalSupply;}struct UserData {// Liquidity index of the reward distribution for the useruint104 index;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.12;import {VersionedInitializable} from '@zerolendxyz/core-v3/contracts/protocol/libraries/aave-upgradeability/VersionedInitializable.sol';import {SafeCast} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol';import {IScaledBalanceToken} from '@zerolendxyz/core-v3/contracts/interfaces/IScaledBalanceToken.sol';import {RewardsDistributor} from './RewardsDistributor.sol';import {IRewardsController} from './interfaces/IRewardsController.sol';import {ITransferStrategyBase} from './interfaces/ITransferStrategyBase.sol';import {RewardsDataTypes} from './libraries/RewardsDataTypes.sol';import {IEACAggregatorProxy} from '../misc/interfaces/IEACAggregatorProxy.sol';/*** @title RewardsController* @notice Abstract contract template to build Distributors contracts for ERC20 rewards to protocol participants* @author Aave**/contract RewardsController is RewardsDistributor, VersionedInitializable, IRewardsController {using SafeCast for uint256;uint256 public constant REVISION = 1;// This mapping allows whitelisted addresses to claim on behalf of others// useful for contracts that hold tokens to be rewarded but don't have any native logic to claim Liquidity Mining rewardsmapping(address => address) internal _authorizedClaimers;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.12;import {IScaledBalanceToken} from '@zerolendxyz/core-v3/contracts/interfaces/IScaledBalanceToken.sol';import {IERC20Detailed} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol';import {SafeCast} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol';import {IRewardsDistributor} from './interfaces/IRewardsDistributor.sol';import {RewardsDataTypes} from './libraries/RewardsDataTypes.sol';/*** @title RewardsDistributor* @notice Accounting contract to manage multiple staking distributions with multiple rewards* @author Aave**/abstract contract RewardsDistributor is IRewardsDistributor {using SafeCast for uint256;// Manager of incentivesaddress public immutable EMISSION_MANAGER;// Deprecated: This storage slot is kept for backwards compatibility purposes.address internal _emissionManager;// Map of rewarded asset addresses and their data (assetAddress => assetData)mapping(address => RewardsDataTypes.AssetData) internal _assets;// Map of reward assets (rewardAddress => enabled)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IPullRewardsTransferStrategy} from '../interfaces/IPullRewardsTransferStrategy.sol';import {ITransferStrategyBase} from '../interfaces/ITransferStrategyBase.sol';import {TransferStrategyBase} from './TransferStrategyBase.sol';import {GPv2SafeERC20} from '@zerolendxyz/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';/*** @title PullRewardsTransferStrategy* @notice Transfer strategy that pulls ERC20 rewards from an external account to the user address.* The external account could be a smart contract or EOA that must approve to the PullRewardsTransferStrategy contract address.* @author Aave**/contract PullRewardsTransferStrategy is TransferStrategyBase, IPullRewardsTransferStrategy {using GPv2SafeERC20 for IERC20;address internal immutable REWARDS_VAULT;constructor(address incentivesController,address rewardsAdmin,address rewardsVault) TransferStrategyBase(incentivesController, rewardsAdmin) {REWARDS_VAULT = rewardsVault;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IStakedToken} from '../interfaces/IStakedToken.sol';import {IStakedTokenTransferStrategy} from '../interfaces/IStakedTokenTransferStrategy.sol';import {ITransferStrategyBase} from '../interfaces/ITransferStrategyBase.sol';import {TransferStrategyBase} from './TransferStrategyBase.sol';import {GPv2SafeERC20} from '@zerolendxyz/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';/*** @title StakedTokenTransferStrategy* @notice Transfer strategy that stakes the rewards into a staking contract and transfers the staking contract token.* The underlying token must be transferred to this contract to be able to stake it on demand.* @author Aave**/contract StakedTokenTransferStrategy is TransferStrategyBase, IStakedTokenTransferStrategy {using GPv2SafeERC20 for IERC20;IStakedToken internal immutable STAKE_CONTRACT;address internal immutable UNDERLYING_TOKEN;constructor(address incentivesController,address rewardsAdmin,IStakedToken stakeToken
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {ITransferStrategyBase} from '../interfaces/ITransferStrategyBase.sol';import {GPv2SafeERC20} from '@zerolendxyz/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol';import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';/*** @title TransferStrategyStorage* @author Aave**/abstract contract TransferStrategyBase is ITransferStrategyBase {using GPv2SafeERC20 for IERC20;address internal immutable INCENTIVES_CONTROLLER;address internal immutable REWARDS_ADMIN;constructor(address incentivesController, address rewardsAdmin) {INCENTIVES_CONTROLLER = incentivesController;REWARDS_ADMIN = rewardsAdmin;}/*** @dev Modifier for incentives controller only functions*/modifier onlyIncentivesController() {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.12;import {Ownable} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol';import {IStreamable} from './interfaces/IStreamable.sol';import {IAdminControlledEcosystemReserve} from './interfaces/IAdminControlledEcosystemReserve.sol';import {IAaveEcosystemReserveController} from './interfaces/IAaveEcosystemReserveController.sol';import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';contract AaveEcosystemReserveController is Ownable, IAaveEcosystemReserveController {/*** @notice Constructor.* @param aaveGovShortTimelock The address of the Aave's governance executor, owning this contract*/constructor(address aaveGovShortTimelock) {transferOwnership(aaveGovShortTimelock);}/// @inheritdoc IAaveEcosystemReserveControllerfunction approve(address collector,IERC20 token,address recipient,uint256 amount) external onlyOwner {IAdminControlledEcosystemReserve(collector).approve(token, recipient, amount);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-3.0pragma solidity ^0.8.12;import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';import {IStreamable} from './interfaces/IStreamable.sol';import {AdminControlledEcosystemReserve} from './AdminControlledEcosystemReserve.sol';import {ReentrancyGuard} from './libs/ReentrancyGuard.sol';import {SafeERC20} from './libs/SafeERC20.sol';/*** @title AaveEcosystemReserve v2* @notice Stores ERC20 tokens of an ecosystem reserve, adding streaming capabilities.* Modification of Sablier https://github.com/sablierhq/sablier/blob/develop/packages/protocol/contracts/Sablier.sol* Original can be found also deployed on https://etherscan.io/address/0xCD18eAa163733Da39c232722cBC4E8940b1D8888* Modifications:* - Sablier "pulls" the funds from the creator of the stream at creation. In the Aave case, we already have the funds.* - Anybody can create streams on Sablier. Here, only the funds admin (Aave governance via controller) can* - Adapted codebase to Solidity 0.8.11, mainly removing SafeMath and CarefulMath to use native safe math* - Same as with creation, on Sablier the `sender` and `recipient` can cancel a stream. Here, only fund admin and recipient* @author BGD Labs**/contract AaveEcosystemReserveV2 is AdminControlledEcosystemReserve, ReentrancyGuard, IStreamable {using SafeERC20 for IERC20;/*** Storage Properties ***/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-3.0pragma solidity ^0.8.12;import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';import {IAdminControlledEcosystemReserve} from './interfaces/IAdminControlledEcosystemReserve.sol';import {VersionedInitializable} from './libs/VersionedInitializable.sol';import {SafeERC20} from './libs/SafeERC20.sol';import {ReentrancyGuard} from './libs/ReentrancyGuard.sol';import {Address} from './libs/Address.sol';/*** @title AdminControlledEcosystemReserve* @notice Stores ERC20 tokens, and allows to dispose of them via approval or transfer dynamics* Adapted to be an implementation of a transparent proxy* @dev Done abstract to add an `initialize()` function on the child, with `initializer` modifier* @author BGD Labs**/abstract contract AdminControlledEcosystemReserve isVersionedInitializable,IAdminControlledEcosystemReserve{using SafeERC20 for IERC20;using Address for address payable;address internal _fundsAdmin;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {VersionedInitializable} from '@zerolendxyz/core-v3/contracts/protocol/libraries/aave-upgradeability/VersionedInitializable.sol';import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';import {ICollector} from './interfaces/ICollector.sol';/*** @title Collector* @notice Stores the fees collected by the protocol and allows the fund administrator* to approve or transfer the collected ERC20 tokens.* @dev Implementation contract that must be initialized using transparent proxy pattern.* @author Aave**/contract Collector is VersionedInitializable, ICollector {// Store the current funds administrator addressaddress internal _fundsAdmin;// Revision version of this implementation contractuint256 public constant REVISION = 1;/*** @dev Allow only the funds administrator address to call functions marked by this modifier*/modifier onlyFundsAdmin() {require(msg.sender == _fundsAdmin, 'ONLY_BY_FUNDS_ADMIN');
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {Ownable} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol';import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';import {ICollector} from './interfaces/ICollector.sol';/*** @title CollectorController* @notice The CollectorController contracts allows the owner of the contractto approve or transfer tokens from the specified collector proxy contract.The admin of the Collector proxy can't be the same as the fundsAdmin address.This is needed due the usage of transparent proxy pattern.* @author Aave**/contract CollectorController is Ownable {/*** @dev Constructor setups the ownership of the contract* @param owner The address of the owner of the CollectorController*/constructor(address owner) {transferOwnership(owner);}/*** @dev Transfer an amount of tokens to the recipient.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.12;import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';interface IAaveEcosystemReserveController {/*** @notice Proxy function for ERC20's approve(), pointing to a specific collector contract* @param collector The collector contract with funds (Aave ecosystem reserve)* @param token The asset address* @param recipient Allowance's recipient* @param amount Allowance to approve**/function approve(address collector, IERC20 token, address recipient, uint256 amount) external;/*** @notice Proxy function for ERC20's transfer(), pointing to a specific collector contract* @param collector The collector contract with funds (Aave ecosystem reserve)* @param token The asset address* @param recipient Transfer's recipient* @param amount Amount to transfer**/function transfer(address collector, IERC20 token, address recipient, uint256 amount) external;/*** @notice Proxy function to create a stream of token on a specific collector contract
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-3.0pragma solidity ^0.8.12;import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';interface IAdminControlledEcosystemReserve {/** @notice Emitted when the funds admin changes* @param fundsAdmin The new funds admin**/event NewFundsAdmin(address indexed fundsAdmin);/** @notice Returns the mock ETH reference address* @return address The address**/function ETH_MOCK_ADDRESS() external pure returns (address);/*** @notice Return the funds admin, only entity to be able to interact with this contract (controller of reserve)* @return address The address of the funds admin**/function getFundsAdmin() external view returns (address);/*** @dev Function for the funds admin to give ERC20 allowance to other parties* @param token The address of the token to give allowance from* @param recipient Allowance's recipient
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.12;import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';/*** @title ICollector* @notice Defines the interface of the Collector contract* @author Aave**/interface ICollector {/*** @dev Emitted during the transfer of ownership of the funds administrator address* @param fundsAdmin The new funds administrator address**/event NewFundsAdmin(address indexed fundsAdmin);/*** @dev Retrieve the current implementation Revision of the proxy* @return The revision version*/function REVISION() external view returns (uint256);/*** @dev Retrieve the current funds administrator* @return The address of the funds administrator
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.12;interface IStreamable {struct Stream {uint256 deposit;uint256 ratePerSecond;uint256 remainingBalance;uint256 startTime;uint256 stopTime;address recipient;address sender;address tokenAddress;bool isEntity;}event CreateStream(uint256 indexed streamId,address indexed sender,address indexed recipient,uint256 deposit,address tokenAddress,uint256 startTime,uint256 stopTime);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.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* ====*
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)pragma solidity ^0.8.0;/*** @dev Contract module that helps prevent reentrant calls to a function.** Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier* available, which can be applied to functions to make sure there are no nested* (reentrant) calls to them.** Note that because there is a single `nonReentrant` guard, functions marked as* `nonReentrant` may not call one another. This can be worked around by making* those functions `private`, and then adding `external` `nonReentrant` entry* points to them.** TIP: If you would like to learn more about reentrancy and alternative ways* to protect against it, check out our blog post* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].*/abstract contract ReentrancyGuard {// Booleans are more expensive than uint256 or any type that takes up a full// word because each write operation emits an extra SLOAD to first read the// slot's contents, replace the bits taken up by the boolean, and then write// back. This is the compiler's defense against contract upgrades and
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)pragma solidity ^0.8.0;import {IERC20} from '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.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 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(
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.12;/*** @title VersionedInitializable** @dev Helper contract to support 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 internal lastInitializedRevision = 0;/*** @dev Modifier to use in the initializer function of a contract.*/
123456789// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.12;/** @dev Unused empty contract to prevent Hardhat + hardhat-dependency-compiler bug at Typechain generation time. */contract EmptyContract {function get() external view returns (uint256) {return 0;}}
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/dependencies/openzeppelin/upgradeability/InitializableAdminUpgradeabilityProxy.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/dependencies/weth/WETH9.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/deployments/ReservesSetupHelper.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/misc/AaveOracle.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/misc/AaveProtocolDataProvider.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/misc/L2Encoder.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/flashloan/MockFlashLoanReceiver.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/helpers/MockIncentivesController.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/helpers/MockReserveConfiguration.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/oracle/CLAggregators/MockAggregator.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/oracle/PriceOracle.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/tokens/MintableDelegationERC20.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/tokens/MintableERC20.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/tokens/WETH9Mocked.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/upgradeability/MockAToken.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/upgradeability/MockInitializableImplementation.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/upgradeability/MockStableDebtToken.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/mocks/upgradeability/MockVariableDebtToken.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/configuration/ACLManager.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/configuration/PoolAddressesProvider.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/configuration/PoolAddressesProviderRegistry.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/libraries/logic/BorrowLogic.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/libraries/logic/BridgeLogic.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/libraries/logic/CalldataLogic.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/libraries/logic/EModeLogic.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/libraries/logic/FlashLoanLogic.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/libraries/logic/GenericLogic.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/libraries/logic/ReserveLogic.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/libraries/logic/SupplyLogic.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/libraries/logic/ValidationLogic.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/pool/DefaultReserveInterestRateStrategy.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/pool/L2Pool.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/pool/Pool.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/pool/PoolConfigurator.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/tokenization/AToken.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/tokenization/DelegationAwareAToken.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/tokenization/StableDebtToken.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/core-v3/contracts/protocol/tokenization/VariableDebtToken.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/adapters/paraswap/ParaSwapLiquiditySwapAdapter.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/adapters/paraswap/ParaSwapRepayAdapter.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/misc/interfaces/IWETH.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/misc/UiIncentiveDataProviderV3.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/misc/UiPoolDataProviderV3.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/misc/WalletBalanceProvider.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/misc/WrappedTokenGatewayV3.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/mocks/testnet-helpers/Faucet.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/mocks/testnet-helpers/TestnetERC20.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/mocks/WETH9Mock.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/rewards/EmissionManager.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/rewards/RewardsController.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/rewards/transfer-strategies/PullRewardsTransferStrategy.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/rewards/transfer-strategies/StakedTokenTransferStrategy.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/treasury/AaveEcosystemReserveController.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/treasury/AaveEcosystemReserveV2.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/treasury/Collector.sol';
123// SPDX-License-Identifier: UNLICENSEDpragma solidity >0.0.0;import '@zerolendxyz/periphery-v3/contracts/treasury/CollectorController.sol';
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.12;/// @title Multicall3/// @notice Aggregate results from multiple function calls/// @dev Multicall & Multicall2 backwards-compatible/// @dev Aggregate methods are marked `payable` to save 24 gas per call/// @author Michael Elliot <mike@makerdao.com>/// @author Joshua Levine <joshua@makerdao.com>/// @author Nick Johnson <arachnid@notdot.net>/// @author Andreas Bigger <andreas@nascent.xyz>/// @author Matt Solomon <matt@mattsolomon.dev>contract Multicall3 {struct Call {address target;bytes callData;}struct Call3 {address target;bool allowFailure;bytes callData;}struct Call3Value {address target;
1234567891011121314151617181920212223242526{"optimizer": {"enabled": true,"mode": "3"},"evmVersion": "berlin","outputSelection": {"*": {"*": ["abi"]}},"detectMissingLibraries": false,"forceEVMLA": false,"enableEraVMExtensions": false,"libraries": {"@zerolendxyz/core-v3/contracts/protocol/libraries/logic/BridgeLogic.sol": {"BridgeLogic": "0x406aD7Ed13d91BEF165f6E977e281FB7C571CfE5"},"@zerolendxyz/core-v3/contracts/protocol/libraries/logic/ConfiguratorLogic.sol": {"ConfiguratorLogic": "0x6785433E9A02daEc0e30C532284477Cfe66c6c34"},"@zerolendxyz/core-v3/contracts/protocol/libraries/logic/PoolLogic.sol": {"PoolLogic": "0xc23507911ce966e314EdeF2f28C401bCe0BEd621"},
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"enum DataTypes.InterestRateMode","name":"interestRateMode","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"premium","type":"uint256"},{"indexed":true,"internalType":"uint16","name":"referralCode","type":"uint16"}],"name":"FlashLoan","type":"event"}]
Contract Creation Code
9c4d535b0000000000000000000000000000000000000000000000000000000000000000010003bf97cf4eb24c5a9331a070697fb42276572bed7b4c282ca4451d8bef3a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x00040000000000020017000000000002000000000301001900000060043002700000036b03400197000300000031035500020000000103550000036b0040019d0000008004000039000000400040043f0000000102200190000001f70000c13d000000040230008c000002640000413d00000000020004120000000004000410000000000501043b000000e0055002700000036d0650009c000001ff0000613d0000036e0550009c000002640000c13d000000a40530008c000002640000413d000000000242004b000002640000613d0000008402100370000000000202043b0000036f0420009c000002640000213d00000004022000390000000004230049000003700540009c000002640000213d000001c00440008c000002640000413d0000024004000039000000400040043f000000000521034f000000000505043b000003710650009c000002640000213d000000800050043f0000002005200039000000000651034f000000000606043b0000036f0760009c000002640000213d00000000062600190000001f07600039000000000737004b000002640000813d000000000761034f000000000807043b0000036f0780009c000002340000213d00000005078002100000003f097000390000038409900197000003850a90009c000002340000213d0000024009900039000000400090043f000002400080043f00000020066000390000000007670019000000000937004b000002640000213d000000000808004b0000004f0000613d000000000861034f000000000808043b000003710980009c000002640000213d000000200440003900000000008404350000002006600039000000000876004b000000460000413d0000024004000039000000a00040043f0000002004500039000000000541034f000000000505043b0000036f0650009c000002640000213d00000000062500190000001f05600039000000000735004b000000000700001900000386070080410000038605500197000000000805004b00000000080000190000038608004041000003860550009c000000000807c019000000000508004b000002640000c13d000000000561034f000000000705043b0000036f0570009c000002340000213d00000005087002100000003f058000390000038409500197000000400500043d0000000009950019000000000a59004b000000000a000019000000010a0040390000036f0b90009c000002340000213d000000010aa00190000002340000c13d000000400090043f000000000075043500000020066000390000000007680019000000000837004b000002640000213d000000000876004b000000830000813d0000000008050019000000000961034f000000000909043b000000200880003900000000009804350000002006600039000000000976004b0000007c0000413d000000c00050043f0000002004400039000000000541034f000000000505043b0000036f0650009c000002640000213d00000000062500190000001f05600039000000000735004b000000000700001900000386070080410000038605500197000000000805004b00000000080000190000038608004041000003860550009c000000000807c019000000000508004b000002640000c13d000000000561034f000000000705043b0000036f0570009c000002340000213d00000005087002100000003f058000390000038409500197000000400500043d0000000009950019000000000a59004b000000000a000019000000010a0040390000036f0b90009c000002340000213d000000010aa00190000002340000c13d000000400090043f000000000075043500000020066000390000000007680019000000000837004b000002640000213d000000000876004b000000b60000813d0000000008050019000000000961034f000000000909043b000000200880003900000000009804350000002006600039000000000976004b000000af0000413d000000e00050043f0000002004400039000000000541034f000000000505043b000003710650009c000002640000213d000001000050043f0000002004400039000000000541034f000000000505043b0000036f0650009c000002640000213d00000000072500190000001f02700039000000000532004b000000000500001900000386050080410000038602200197000000000602004b00000000060000190000038606004041000003860220009c000000000605c019000000000206004b000002640000c13d000000000271034f000000000202043b0000036f0520009c000002340000213d0000001f0520003900000396055001970000003f055000390000039606500197000000400500043d0000000006650019000000000856004b000000000800001900000001080040390000036f0960009c000002340000213d0000000108800190000002340000c13d000000400060043f000000000625043600000020077000390000000008720019000000000338004b000002640000213d000000000771034f0000001f0320018f0000000508200272000000f20000613d00000005098002100000000009960019000000000a07034f000000000b06001900000000ac0a043c000000000bcb0436000000000c9b004b000000ee0000c13d000000000903004b000001010000613d0000000508800210000000000787034f00000000088600190000000303300210000000000908043300000000093901cf000000000939022f000000000707043b0000010003300089000000000737022f00000000033701cf000000000393019f000000000038043500000000022600190000000000020435000001200050043f0000002002400039000000000321034f000000000303043b0000ffff0430008c000002640000213d000001400030043f0000002003200039000000000331034f000000000303043b000001600030043f0000004003200039000000000331034f000000000303043b000001800030043f0000006003200039000000000331034f000000000303043b000001a00030043f0000008003200039000000000331034f000000000303043b000001c00030043f000000a002200039000000000321034f000000000303043b000003710430009c000002640000213d000001e00030043f0000002002200039000000000321034f000000000303043b000000ff0430008c000002640000213d000002000030043f0000002002200039000000000221034f000000000202043b000000000302004b0000000003000019000000010300c039000000000332004b000002640000c13d000002200020043f000000a00200043d001500000002001d0000000402100370000000000202043b001600000002001d0000002402100370000000000202043b000400000002001d0000004402100370000000000202043b000300000002001d0000006401100370000000000101043b000200000001001d000000400100043d000003740210009c000002340000213d000000c00200043d000000000202043300000015030000290000000043030434001400000004001d0000004004100039000000400040043f00000020041000390000038705000041000000000054043500000002040000390000000000410435000000000223004b000005470000c13d00000015010000290000000001010433000000000101004b000003fb0000c13d000000400100043d000e00000001001d000003890110009c000002340000213d0000000e03000029000000e001300039000000400010043f00000080023000390000006001000039001100000002001d0000000000120435000000c001300039000100000001001d0000000000010435000000a001300039001000000001001d00000000000104350000006001300039001300000001001d00000000000104350000004001300039000f00000001001d00000000000104350000000001030436001500000001001d0000000000010435000000a00100043d00000000020104330000036f0120009c000002340000213d00000005042002100000003f014000390000038403100197000000400100043d0000000003310019000000000513004b000000000500001900000001050040390000036f0630009c000002340000213d0000000105500190000002340000c13d000000400030043f00000000032104360000001f0240018f0000000505400272000001890000613d0000000004000031000000020440036700000005055002100000000005530019000000004604043c0000000003630436000000000653004b000001850000c13d000000000202004b0000018b0000613d00000011020000290000000000120435000000800200043d00000371022001970000000e030000290000000000230435000002200300043d000000000303004b00000000030000190000000004000019000001980000c13d000001600400043d000001800300043d000000010500002900000000004504350000001004000029000000000034043500000015030000290000000000030435000000a00600043d0000000003060433000000000303004b0000045a0000c13d000001200300043d000000c00500043d000000400900043d0000038a040000410000000004490436001700000004001d0000000404900039000000a00700003900000000007404350000000008060433000000a4079000390000000000870435001400000009001d000000c4079000390000037102200197000000000908004b000001bb0000613d00000000090000190000002006600039000000000a060433000003710aa001970000000007a704360000000109900039000000000a89004b000001b40000413d000000000647004900000014080000290000002408800039000000000068043500000000080504330000000006870436000000000708004b000001ca0000613d00000000070000190000002005500039000000000905043300000000069604360000000107700039000000000987004b000001c40000413d0000000005000411000000000746004900000014080000290000004408800039000000000078043500000000070104330000000006760436000000000807004b000001da0000613d00000000080000190000002001100039000000000901043300000000069604360000000108800039000000000978004b000001d40000413d000000000146004900000014070000290000008404700039000000000014043500000371045001970000006401700039000c00000004001d000000000041043500000000430304340000000001360436000000000503004b000001f20000613d000000000500001900000000061500190000000007540019000000000707043300000000007604350000002005500039000000000635004b000001e70000413d000000000435004b000001f20000a13d000000000413001900000000000404350000000004000414000000040520008c000004f20000c13d0000000103000031000005260000013d0000000001000416000000000101004b000002640000c13d0000002001000039000001000010044300000120000004430000036c0100004100000da80001042e000000440530008c000002640000413d000000000242004b000002640000613d0000000402100370000000000c02043b0000002402100370000000000502043b0000036f0250009c000002640000213d0000000002530049000003700420009c000002640000213d000000e40220008c000002640000413d0000016002000039000000400020043f0000000404500039000000000641034f000000000606043b000003710760009c000002640000213d000000800060043f0000002004400039000000000641034f000000000606043b000003710760009c000002640000213d000000a00060043f0000002006400039000000000661034f000000000606043b000000c00060043f0000004004400039000000000641034f000000000606043b0000036f0760009c000002640000213d00000000065600190000002305600039000000000535004b000002640000813d0000000407600039000000000571034f000000000505043b0000036f0850009c000002340000213d0000001f0850003900000396088001970000003f088000390000039608800197000003720980009c0000023a0000a13d000003940100004100000000001004350000004101000039000000040010043f000003950100004100000da9000104300000016008800039000000400080043f000001600050043f00000000065600190000002406600039000000000336004b000002640000213d0000002003700039000000000331034f0000001f0650018f000000050750027200000005077002100000024e0000613d00000180080000390000018009700039000000000a03034f00000000ab0a043c0000000008b80436000000000b98004b0000024a0000c13d000000000806004b0000025c0000613d000000000373034f00000003066002100000018007700039000000000807043300000000086801cf000000000868022f000000000303043b0000010006600089000000000363022f00000000036301cf000000000383019f000000000037043500000180035000390000000000030435000000e00020043f0000002002400039000000000321034f000000000303043b0000ffff0430008c000002660000a13d000000000100001900000da900010430000001000030043f0000002003200039000000000331034f000000000303043b000001200030043f0000004002200039000000000121034f000000000101043b000001400010043f000000400200043d000003730120009c000002340000213d0000002001200039000000400010043f00000000030c041a0000000000320435000000400100043d000003740410009c000002340000213d00170000000c001d0000004004100039000000400040043f00000020041000390000037505000041000000000054043500000002040000390000000000410435000000400500043d00000376033001980000029e0000c13d000003740150009c000002340000213d000000000702043300000000060500190000004003600039000000400030043f00000020036000390000037804000041000000000043043500000002030000390000000000360435000000400100043d0000037903700198000002b00000c13d00000377020000410000000003010019001500000003001d0000000000230435000000040130003900000020020000390000000000210435000000240230003900000000010500190da7078d0000040f0000001503000029000002a70000013d0000037702000041001600000005001d000000000025043500000004025000390000002003000039000000000032043500000024025000390da7078d0000040f000000160300002900000000013100490000036b0210009c0000036b010080410000036b0230009c0000036b0300804100000060011002100000004002300210000000000121019f00000da900010430000003740310009c000002340000213d000000000402043300000000050100190000004002500039000000400020043f00000020025000390000037a030000410000000000320435000000020200003900000000002504350000037b02400198000002c80000c13d000000400400043d001700000004001d0000037702000041000000000024043500000004034000390000002002000039000000000023043500000024024000390da7078d0000040f0000001703000029000002a70000013d000000c00100043d001600000001001d000000800100043d001403710010019b000001400100043d001500000001001d000000000101004b0000001703000029000002d50000613d000013890100008a00000015211000fa000000160110006c000002640000413d0000000401300039000000000101041a0000037c0200004100000000002004390000037101100197001300000001001d000000040010044300000000010004140000036b0210009c0000036b01008041000000c0011002100000037d011001c700008002020000390da70d9d0000040f00000001022001900000074d0000613d000000000101043b000000000101004b000002640000613d000000400300043d0000002401300039000000160200002900000000002104350000037e010000410000000000130435001200000003001d00000004013000390000001402000029000000000021043500000000010004140000001302000029000000040220008c000002f80000c13d00000001030000310000030b0000013d00000012030000290000036b0230009c0000036b02000041000000000203401900000040022002100000036b0310009c0000036b01008041000000c001100210000000000121019f0000037f011001c700000013020000290da70d980000040f000000000301001900000060033002700001036b0030019d0000036b0330019700030000000103550000000102200190000003ab0000613d0000001f0130003900000396021001970000001204200029000000000124004b00000000010000190000000101004039001300000004001d0000036f0440009c000002340000213d0000000101100190000002340000c13d0000001301000029000000400010043f000003700130009c000002640000213d000000150400002900000016414000b90000138801100039000027101810011a00000013090000290000008401900039000000e00400043d000000a00500043d000000c00600043d000000a007000039000000000071043500000000010004110000037101100197000000640790003900000000001704350000004401900039001500000008001d00000000008104350000002401900039000000000061043500000380010000410000000001190436001600000001001d000003710150019700000004059000390000000000150435000000a40190003900000000540404340000000000410435000000c401900039000000000604004b000003460000613d000000000600001900000000071600190000000008650019000000000808043300000000008704350000002006600039000000000746004b0000033b0000413d000000000546004b000003460000a13d0000000005140019000000000005043500000000050004140000001406000029000000040660008c000003820000613d0000001f0240003900000396022001970000001303000029000000000232004900000000011200190000036b0210009c0000036b0100804100000060011002100000036b0230009c0000036b0200004100000000020340190000004002200210000000000121019f0000036b0250009c0000036b05008041000000c002500210000000000121019f00000014020000290da70d980000040f000000000301001900000060033002700000036b03300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200000016090000290000036d0000613d000000000601034f0000001307000029000000006806043c0000000007870436000000000897004b000003690000c13d000000000604004b0000037c0000613d0000000505500210000000000651034f00000013055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000003cb0000613d0000001f0130003900000381021001970000001301200029000000000221004b000000000200001900000001020040390000036f0410009c000002340000213d0000000102200190000002340000c13d000000400010043f000003700230009c000002640000213d000000200230008c000002640000413d00000013020000290000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000002640000c13d000003740310009c000002340000213d0000004003100039000000400030043f00000020031000390000038204000041000000000043043500000002030000390000000000310435000000400300043d000000000202004b000003db0000c13d00000377020000410000000004030019001600000004001d00000000002404350000000402400039000000200300003900000000003204350000002402400039000002a50000013d000000400200043d0000001f0430018f00000005053002720000000505500210000003b70000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000003b30000c13d000000000604004b000003c50000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f000000000015043500000060013002100000036b0320009c0000036b020080410000004002200210000000000112019f00000da900010430000000400200043d0000001f0430018f0000000505300272000003d70000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000003d30000c13d000000000604004b000003c50000613d0000000505500210000003b90000013d000003830130009c0000001701000029000002340000213d0000000002030019000000c007200039000000c00800043d000001200300043d000000a00400043d000000800500043d000001000600043d000000400070043f0000ffff0760018f000000a00620003900000000007604350000037106500197000000800520003900000000006504350000037105400197000000600420003900000000005404350000004004200039000000000034043500000020032000390000001504000029000000000043043500000000008204350da707a10000040f000000400100043d0000036b0210009c0000036b01008041000000400110021000000da80001042e001700000000001d0000001701000029000000050110021000000014011000290000000001010433000003710110019700000000001004350000001601000029000000200010043f00000000010004140000036b0210009c0000036b01008041000000c00110021000000388011001c700008010020000390da70d9d0000040f0000000102200190000002640000613d000000400200043d000003730320009c000002340000213d000000000101043b0000002003200039000000400030043f000000000301041a0000000000320435000000400100043d000003740410009c000002340000213d0000004004100039000000400040043f00000020041000390000037505000041000000000054043500000002040000390000000000410435000000400500043d0000037603300198000004440000c13d000003740150009c000002340000213d000000000702043300000000060500190000004003600039000000400030043f00000020036000390000037804000041000000000043043500000002030000390000000000360435000000400100043d00000379037001980000044e0000613d000003740310009c000002340000213d000000000402043300000000050100190000004002500039000000400020043f00000020025000390000037a030000410000000000320435000000020200003900000000002504350000037b02400198000002bd0000613d0000001702000029001700010020003d00000015010000290000000001010433000000170110006b000003fc0000413d000001520000013d0000037702000041001300000005001d000000000025043500000004025000390000002003000039000000000032043500000024025000390da7078d0000040f0000001303000029000002a70000013d00000377020000410000000003010019001200000003001d0000000000230435000000040130003900000020020000390000000000210435000000240230003900000000010500190da7078d0000040f0000001203000029000002a70000013d0000000001000019000000c00300043d0000000002030433000000000212004b0000074e0000a13d000000050210021000000020022000390000000003320019000000000303043300000013040000290000000000340435000000e00400043d0000000005040433000000000515004b0000074e0000a13d00000000042400190000000004040433000000030540008c000007540000813d000000000404004b00000000040000190000047a0000c13d00000010040000290000000004040433000000000504004b000004770000613d0000039765400129000000000535004b000002640000413d00000000433400a90000138803300039000027103430011a000000110300002900000000030304330000000005030433000000000115004b0000074e0000a13d0000000001230019000000000041043500000015010000290000000002010433000000a00100043d0000000003010433000000000323004b0000074e0000a13d0000000502200210000000000121001900000020011000390000000001010433000003710110019700000000001004350000001601000029000000200010043f00000000010004140000036b0210009c0000036b01008041000000c00110021000000388011001c700008010020000390da70d9d0000040f0000000102200190000002640000613d00000013020000290000000002020433001200000002001d000000000101043b0000000401100039000000000101041a000000800200043d001400000002001d0000037c0200004100000000002004390000037101100197001700000001001d000000040010044300000000010004140000036b0210009c0000036b01008041000000c0011002100000037d011001c700008002020000390da70d9d0000040f0000001403000029000003710330019700000001022001900000074d0000613d000000000101043b000000000101004b000002640000613d000000400200043d0000002401200039000000120400002900000000004104350000037e010000410000000000120435001400000002001d0000000401200039000000000031043500000000010004140000001702000029000000040220008c000004c20000c13d0000000103000031000004d50000013d00000014030000290000036b0230009c0000036b02000041000000000203401900000040022002100000036b0310009c0000036b01008041000000c001100210000000000121019f0000037f011001c700000017020000290da70d980000040f000000000301001900000060033002700001036b0030019d0000036b03300197000300000001035500000001022001900000055e0000613d0000001f0130003900000396021001970000001401200029000000000221004b000000000200001900000001020040390000036f0410009c000002340000213d0000000102200190000002340000c13d000000400010043f000003700130009c000002640000213d00000015010000290000000001010433000003980210009c0000075a0000613d000000010110003900000015020000290000000000120435000000a00600043d0000000002060433000000000221004b0000045b0000413d000000110100002900000000010104330000000e020000290000000002020433000001a20000013d0000001f0330003900000396033001970000001405000029000000000353004900000000011300190000036b0310009c0000036b0100804100000060011002100000036b0350009c0000036b0300004100000000030540190000004003300210000000000131019f0000036b0340009c0000036b04008041000000c003400210000000000131019f0da70d980000040f000000000301001900000060033002700000036b03300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000005130000613d000000000601034f0000001407000029000000006806043c0000000007870436000000170870006c0000050f0000c13d000000000604004b000005220000613d0000000505500210000000000651034f00000014055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f000300000001035500000001022001900000054f0000613d0000001f0130003900000396021001970000001401200029000000000221004b000000000200001900000001020040390000036f0410009c000002340000213d0000000102200190000002340000c13d000000400010043f000003700230009c000002640000213d000000200230008c000002640000413d00000014020000290000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000002640000c13d000003740310009c000002340000213d0000004003100039000000400030043f00000020031000390000038204000041000000000043043500000002030000390000000000310435000000000202004b0000056d0000c13d000000400400043d001700000004001d00000377020000410000000000240435000000040240003900000020030000390000000000320435000002c40000013d000000400200043d0000001f0430018f00000005053002720000055b0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000005570000c13d000000000604004b000003c50000613d000003d90000013d000000400200043d0000001f0430018f00000005053002720000056a0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000005660000c13d000000000604004b000003c50000613d000003d90000013d00000015010000290000000000010435000000a00100043d0000000002010433000000000202004b000003f60000613d0000000002000019000000050320021000000020033000390000000001130019000000000101043300000371041001970000000f01000029000e00000004001d0000000000410435000000c00100043d0000000004010433000000000424004b0000074e0000a13d000000000131001900000000040104330000001301000029000d00000004001d0000000000410435000000e00100043d0000000004010433000000000224004b0000074e0000a13d00000000013100190000000001010433001200000001001d000000020110008c000007540000213d000000120100006b000005a40000613d000001c00100043d000900000001001d000001a00100043d000a00000001001d000001e00200043d000001000100043d000001400300043d000800000003001d000000400400043d0000038b03000041001000000004001d0000000003340436001700000003001d000b03710010019b00000000010004140000037102200197000000040320008c000005da0000c13d0000000103000031000006060000013d0000000e0100002900000000001004350000001601000029000000200010043f00000000010004140000036b0210009c0000036b01008041000000c00110021000000388011001c700008010020000390da70d9d0000040f0000000102200190000002640000613d00000013020000290000000003020433000000800200043d0000037104200197000000000101043b0000000f020000290000000002020433000003710520019700000015020000290000000007020433000000110200002900000000060204330000000002060433000000000272004b0000074e0000a13d000000400200043d000003830820009c000002340000213d000000050770021000000000067600190000002006600039000000000606043300000001070000290000000007070433000000c008200039000001400900043d000000400080043f0000ffff0890018f000000a00920003900000000008904350000008008200039000000000048043500000060042000390000000000540435000000400420003900000000007404350000002004200039000000000064043500000000003204350da707a10000040f000007410000013d00000010040000290000036b0340009c0000036b03000041000000000304401900000040033002100000036b0410009c0000036b01008041000000c001100210000000000131019f0000038c011001c70da70d9d0000040f000000000301001900000060033002700000036b03300197000000200430008c000000200500003900000000050340190000000504500272000005f30000613d000000000601034f0000001007000029000000006806043c0000000007870436000000170870006c000005ef0000c13d0000001f05500190000006020000613d0000000504400210000000000641034f00000010044000290000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f000300000001035500000001022001900000076f0000613d0000001f0130003900000396011001970000001004100029000000000214004b00000000020000190000000102004039001400000004001d0000036f0440009c000002340000213d0000000102200190000002340000c13d0000001402000029000000400020043f000003700230009c000002640000213d000000200230008c000002640000413d00000010020000290000000002020433001000000002001d000003710220009c000002640000213d000001e00200043d000002000400043d000700000004001d0000038d0400004100000014050000290000000004450436001700000004001d00000000040004140000037102200197000000040520008c000006550000613d00000014030000290000036b0130009c0000036b01000041000000000103401900000040011002100000036b0340009c0000036b04008041000000c003400210000000000113019f0000038c011001c70da70d9d0000040f000000000301001900000060033002700000036b03300197000000200430008c000000200500003900000000050340190000000504500272000006400000613d000000000601034f0000001407000029000000006806043c0000000007870436000000170870006c0000063c0000c13d0000001f055001900000064f0000613d0000000504400210000000000641034f00000014044000290000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f000300000001035500000001022001900000077e0000613d0000001f0130003900000381011001970000001402100029000000000112004b00000000010000190000000101004039001700000002001d0000036f0220009c000002340000213d0000000101100190000002340000c13d0000001701000029000000400010043f000000200130008c000002640000413d00000014010000290000000001010433000003710210009c000002640000213d00000017020000290000038e0220009c000002340000213d00000008020000290000ffff0220018f0000000703000029000000ff0330018f00000017050000290000018004500039000000400040043f0000016004500039000800000004001d00000000001404350000014001500039000700000001001d000000000031043500000120035000390000001001000029000600000003001d000000000013043500000100035000390000000901000029000500000003001d0000000000130435000000e0035000390000000a01000029000900000003001d0000000000130435000000a001500039000a00000001001d000000000021043500000080025000390000001201000029001400000002001d000000000012043500000060025000390000000d01000029001200000002001d000000000012043500000040025000390000000b01000029001000000002001d000000000012043500000020025000390000000c01000029000d00000002001d00000000001204350000000e010000290000000000150435000000c001500039000e00000001001d00000000000104350000037c0100004100000000001004390000038f01000041000000040010044300000000010004140000036b0210009c0000036b01008041000000c0011002100000037d011001c700008002020000390da70d9d0000040f00000001022001900000074d0000613d000000000101043b000000000101004b000002640000613d000000400300043d00000064013000390000000202000029000000000021043500000044013000390000000302000029000000000021043500000024013000390000000402000029000000000021043500000390010000410000000000130435000000040130003900000016020000290000000000210435000000170100002900000000010104330000037101100197000000840230003900000000001204350000000d0100002900000000010104330000037101100197000000a4023000390000000000120435000000100100002900000000010104330000037101100197000000c402300039000000000012043500000012010000290000000001010433001700000003001d000000e402300039000000000012043500000014010000290000000001010433000000020210008c000007540000213d0000001703000029000001040230003900000000001204350000000a0100002900000000010104330000ffff0110018f000001240230003900000000001204350000000e010000290000000001010433000000000101004b0000000001000019000000010100c0390000014402300039000000000012043500000009010000290000000001010433000001640230003900000000001204350000000501000029000000000101043300000184023000390000000000120435000000060100002900000000010104330000037101100197000001a402300039000000000012043500000007010000290000000001010433000000ff0110018f000001c4023000390000000000120435000000080100002900000000010104330000037101100197000001e40230003900000000001204350000036b0130009c0000036b010000410000000001034019000000400110021000000000020004140000036b0320009c0000036b02008041000000c002200210000000000112019f00000391011001c70000038f020000410da70da20000040f000000000301001900000060033002700001036b0030019d0000036b0330019700030000000103550000000102200190000007600000613d0000001f0130003900000381021001970000001701200029000000000221004b000000000200001900000001020040390000036f0310009c000002340000213d0000000102200190000002340000c13d000000400010043f000000130200002900000000020204330000000f0300002900000000030304330000037106300197000000800300043d000003710530019700000015030000290000000004030433000000e00300043d0000000007030433000000000747004b0000074e0000a13d0000000504400210000000000343001900000020033000390000000003030433000000020430008c000007540000213d0000004004100039000001400700043d0000000000340435000000200310003900000000002304350000000c020000290000000000210435000000600210003900000000000204350000036b0210009c0000036b01008041000000400110021000000000020004140000036b0320009c0000036b02008041000000c002200210000000000112019f00000392011001c70000ffff0770018f0000800d02000039000000040300003900000393040000410da70d980000040f0000000101200190000002640000613d00000015010000290000000001010433000003980210009c0000075a0000613d000000010210003900000015010000290000000000210435000000a00100043d0000000003010433000000000332004b000005740000413d000003f60000013d000000000001042f000003940100004100000000001004350000003201000039000000040010043f000003950100004100000da900010430000003940100004100000000001004350000002101000039000000040010043f000003950100004100000da900010430000003940100004100000000001004350000001101000039000000040010043f000003950100004100000da900010430000000400200043d0000001f0430018f00000005053002720000076c0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000007680000c13d000000000604004b000003c50000613d000003d90000013d000000400200043d0000001f0430018f000000050530027200000005055002100000077b0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000007770000c13d000000000604004b000003c50000613d000003b90000013d000000400200043d0000001f0430018f000000050530027200000005055002100000078a0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000007860000c13d000000000604004b000003c50000613d000003b90000013d00000000430104340000000001320436000000000203004b0000079d0000613d000000000200001900000000052100190000000006240019000000000606043300000000006504350000002002200039000000000532004b000007920000413d000000000232004b0000079d0000a13d000000000231001900000000000204350000001f0230003900000396022001970000000001210019000000000001042d001d000000000002001700000001001d0000002001200039000300000001001d0000000001010433001c00000001001d001a00000002001d00000040012000390000000001010433000000000201004b000007af0000613d00000397321001290000001c0220006c00000cb50000413d0000001c211000b90000138801100039000027101210011a001600000002001d0000001c0120006b00000cbd0000413d000000010200008a0000001c0120014f0000001a020000290000000002020433000400000002001d000000000112004b00000cbd0000213d000000400100043d000003990210009c00000cb70000813d0000028002100039000000400020043f000001a00210003900000000000204350000018002100039000000000002043500000160021000390000000000020435000001400210003900000000000204350000012002100039000000000002043500000100021000390000000000020435000000e0021000390000000000020435000000c0021000390000000000020435000000a0021000390000000000020435000000800210003900000000000204350000006002100039000000000002043500000040021000390000000000020435000000200210003900000000000204350000000000010435000000400200043d000003730320009c00000cb70000213d0000002003200039000000400030043f0000000000020435000001c003100039000000000023043500000260021000390000000000020435000002400210003900000000000204350000022002100039000000000002043500000200021000390000000000020435000001e0011000390000000000010435000000400700043d0000039a0170009c00000cb70000213d0000028001700039000000400010043f000001a001700039001500000001001d00000000000104350000018001700039000d00000001001d00000000000104350000016001700039000e00000001001d00000000000104350000014001700039001900000001001d00000000000104350000012001700039000f00000001001d00000000000104350000010001700039001b00000001001d0000000000010435000000e001700039000c00000001001d0000000000010435000000c001700039001200000001001d0000000000010435000000a001700039001100000001001d00000000000104350000008001700039000700000001001d00000000000104350000006001700039000a00000001001d00000000000104350000004001700039000900000001001d00000000000104350000000001070436001300000001001d0000000000010435000000400100043d000003730210009c00000cb70000213d0000002002100039000000400020043f0000000000010435000001c00270003900000000001204350000026001700039000800000001001d00000000000104350000024001700039001000000001001d00000000000104350000022001700039000000000001043500000200087000390000000000080435000001e003700039001d00000003001d0000000000030435000000400300043d000003730430009c00000cb70000213d0000002004300039000000400040043f0000001706000029000000000406041a00000000004304350000000000320435000000000203043300000040022002700000ffff0220018f000000150300002900000000002304350000000102600039001800000002001d000000000202041a0000039b032001970000001b0400002900000000003404350000000c0400002900000000003404350000000203600039000600000003001d000000000303041a0000039b04300197000000190500002900000000004504350000000f05000029000000000045043500000080022002700000000e04000029000000000024043500000080023002700000000d0300002900000000002304350000000402600039000000000202041a00000371022001970000001d0300002900000000002304350000000502600039000000000202041a000003710220019700000000002804350000000602600039000000000202041a000003710220019700000000002104350000000301600039001400000001001d000000000101041a00000080011002700000039c01100197000000100300002900000000001304350000039d01000041000000400900043d00000000051904360000000001000414000000040320008c000b00000007001d000008700000c13d0000000103000031000008a30000013d000500000008001d0000036b0390009c0000036b03000041000000000309401900000040033002100000036b0410009c0000036b01008041000000c001100210000000000131019f0000038c011001c7000200000009001d000100000005001d0da70d9d0000040f000000010a0000290000000209000029000000000301001900000060033002700000036b03300197000000200430008c000000200500003900000000050340190000001f0450018f00000005055002720000088e0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000088a0000c13d000000000604004b0000089d0000613d0000000505500210000000000651034f00000000055900190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f000300000001035500000001022001900000000b07000029000000050800002900000ceb0000613d0000001f0130003900000396011001970000000002910019000000000412004b000000000400001900000001040040390000036f0520009c00000cb70000213d000000010440019000000cb70000c13d000000400020043f000003700230009c00000cb50000213d000000200230008c00000cb50000413d00000000020904330000001304000029000000000024043500000000002704350000000002080433000000400a00043d0000039e0400004100000000064a043600000000040004140000037102200197000000040520008c000008f10000613d000200000006001d0000036b01a0009c0000036b0100004100000000010a401900000040011002100000036b0340009c0000036b04008041000000c003400210000000000113019f0000038c011001c700050000000a001d0da70d9d0000040f000000050a000029000000000301001900000060033002700000036b03300197000000800430008c000000800500003900000000050340190000001f0450018f00000005055002720000000505500210000008dc0000613d00000000065a0019000000000701034f00000000080a0019000000007907043c0000000008980436000000000968004b000008d80000c13d000000000604004b000008ea0000613d000000000651034f00000000055a00190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000000cfa0000613d0000001f01300039000003810110019700000002060000290000000002a10019000000000112004b000000000100001900000001010040390000036f0420009c00000cb70000213d000000010110019000000cb70000c13d000000400020043f000000800130008c00000cb50000413d0000006001a0003900000000010104330000039c0210009c00000cb50000213d000000000206043300000000030a04330000004004a000390000000004040433000000080500002900000000001504350000000a010000290000000000410435000000070100002900000000002104350000000901000029000000000031043500000012010000290000000000210435000000110100002900000000004104350000001401000029000000000101041a000500000001001d0000039f01000041000000000010043900000000010004140000036b0210009c0000036b01008041000000c001100210000003a0011001c70000800b020000390da70d9d0000040f000000010220019000000cd70000613d000000000101043b0000039c02100197000000050100002900000080011002700000039c01100197000000000121004b0000001701000029000000080f10003900050000000f001d00000a6d0000613d000200000002001d0000000e010000290000000002010433000000000102004b0000095d0000613d000100000002001d00000010010000290000000001010433000e00000001001d0000039f01000041000000000010043900000000010004140000036b0210009c0000036b01008041000000c001100210000003a0011001c70000800b020000390da70d9d0000040f0000000e030000290000039c03300197000000010220019000000cd70000613d000000000101043b000000000231004b000000050f000029000000010400002900000cbd0000413d00000000013100490000039832400129000000000212004b00000cbd0000413d00000000214100a9000003a12110012a000003a2011000410000000c020000290000000002020433000000000302004b000009510000613d000003a343200129000000000313004b00000cb50000413d00000000211200a9000003a402100041000003a23120012a0000001b030000290000000000130435000003a50220009c00000cc30000813d0000001803000029000000000203041a000003a602200197000000000112019f000000000013041b0000000b0b00002900000000010b0433000000000101004b000009c10000613d0000000d010000290000000001010433000d00000001001d00000010010000290000000001010433000e00000001001d0000039f01000041000000000010043900000000010004140000036b0210009c0000036b01008041000000c001100210000003a0011001c70000800b020000390da70d9d0000040f0000000e030000290000039c03300197000000010220019000000cd70000613d000000000201043b000000000132004b000000050f0000290000000b0b0000290000000d0800002900000cbd0000413d000003a201000041000000000432004b000009ae0000613d0000000001320049000000020310008a000000030210008c0000000003004019000000000208004b0000098c0000613d000003a324800129000000000284004b00000cb50000413d00000000528800a9000003a402200041000003a75220012a000000000424004b0000098d0000813d00000cb50000013d0000000002000019000000010510008a000003984610012900000000748200a9000003a404400041000003a87440012a000000000656004b00000cbd0000413d00000000651500aa0000099b0000613d0000039876500129000000000726004b00000cbd0000413d000000000636004b00000cbd0000413d00000000635300aa000009a00000613d0000039876300129000000000646004b00000cbd0000413d000000000608004b000009a50000613d0000039876800129000000000616004b00000cbd0000413d00000000525200a9000000010220027000000000433400a9000000064330011a00000000418100a9000003a14110012a00000000012100190000000001310019000003a2011000410000000f020000290000000002020433000000000302004b000009b50000613d000003a343200129000000000313004b00000cb50000413d00000000211200a9000003a402100041000003a23120012a00000019030000290000000000130435000003a90220009c00000cc30000213d0000000603000029000000000203041a000003a602200197000000000112019f000000000013041b000000400300043d000003830130009c00000cb70000213d000000c001300039000000400010043f000000a00130003900000000000104350000008002300039000000000002043500000060043000390000000000040435000000400730003900000000000704350000000006030436000000000006043500000015050000290000000005050433000000000505004b00000a660000613d00000000050b04330000000f080000290000000008080433000000000908004b000009dc0000613d000003a3a9800129000000000959004b00000cb50000413d00000000855800a9000003a405500041000003a28550012a000000000056043500000000060b043300000019080000290000000008080433000000000908004b000009e80000613d000003a3a9800129000000000969004b00000cb50000413d00000000866800a9000003a406600041000003a28660012a00000000006704350000000a070000290000000007070433000000100800002900000000080804330000039c09800197000000080800002900000000080804330000039c0a8001970000000008a9004b00000cbd0000413d000003a208000041000000000ba9004b00000a2a0000613d0000000008a90049000000020a80008a000000030980008c000000000a004019000000000907004b00000a080000613d000003a39b70012900000000097b004b00000cb50000413d00000000c97700a9000003a409900041000003a7c990012a000000000b9b004b00000a090000813d00000cb50000013d0000000009000019000000010c80008a00000398bd80012900000000eb7900a9000003a40bb00041000003a8ebb0012a000000000dcd004b00000cbd0000413d00000000dc8c00aa00000a170000613d00000398edc00129000000000e9d004b00000cbd0000413d000000000dad004b00000cbd0000413d00000000daca00aa00000a1c0000613d00000398eda00129000000000dbd004b00000cbd0000413d000000000d07004b00000a210000613d00000398ed700129000000000d8d004b00000cbd0000413d00000000c9c900a9000000010990027000000000baab00a900000006baa0011a00000000877800a9000003a18770012a00000000079700190000000007a70019000003a208700041000000000084043500000009040000290000000004040433000003a397800129000000000747004b00000cb50000413d00000000748400a9000003a404400041000003a27440012a0000000000430435000000070300002900000000030304330000039807300167000000000776004b00000cbd0000213d0000000003630019000000000653004b00000cbd0000413d0000000003530049000000000543004b00000cbd0000413d0000000003430049000000000032043500000015020000290000000002020433000000000402004b00000a480000613d0000039754200129000000000434004b00000cb50000413d00000000323200a90000138803200039000027104230011a0000000000210435000027100130008c00000a660000413d0000001b01000029000000000101043300000001031002700000039804300167000003a25440012a000000000501004b00000cb50000613d000000000424004b00000cb50000413d000003a2422000d1000000000223001900000000211200d90000039b0210009c00000cc30000213d0000039b0310016700000000020f041a0000039b04200197000000000334004b00000cbd0000213d00000000011200190000039b01100197000003a602200197000000000121019f00000000001f041b000000020100002900000080011002100000001403000029000000000203041a000003aa02200197000000000112019f000000000013041b0000001d010000290000000002010433000000400900043d000003ab01000041000000000519043600000000010004140000037102200197000000040320008c00000a780000c13d000000010300003100000aa90000013d0000036b0390009c0000036b03000041000000000309401900000040033002100000036b0410009c0000036b01008041000000c001100210000000000131019f0000038c011001c7001000000009001d000f00000005001d0da70d9d0000040f0000000f0a0000290000001009000029000000000301001900000060033002700000036b03300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200000a950000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00000a910000c13d000000000604004b00000aa40000613d0000000505500210000000000651034f00000000055900190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000000050f00002900000d090000613d0000001f0130003900000396011001970000000002910019000000000412004b000000000400001900000001040040390000036f0520009c00000cb70000213d000000010440019000000cb70000c13d000000400020043f000003700430009c00000cb50000213d000000200430008c00000cb50000413d000000000609043300000000040f041a0000039b054001970000001b070000290000000007070433000000000807004b00000ac20000613d000003a398700129000000000858004b00000cb50000413d00000000875700a9000003a407700041000003a27970012a0000039807900167000000000776004b00000cbd0000213d00000016080000290000001c07800069000003aca87000d1000003acba80012a000000000a7a004b00000cb50000c13d0000000009960019000003aca69000d1000003acba60012a00000000099a004b00000cb50000c13d0000000109600270000003980a900167000003a2baa0012a000000000b06004b00000cb50000613d00000000088a004b00000cb50000413d000003ad877000d1000000000779001900000000766700d9000003ae0760009c00000cbd0000213d000003a2076000410000001806000029000000000606041a0000039b0860019800000ae70000613d000003a3a9800129000000000979004b00000cb50000413d00000000877800a9000003a407700041000003a50870009c00000cd80000813d000003a606600197000003a28270012a000000000662019f0000001808000029000000000068041b0000001b06000029000000000026043500000001062002700000039808600167000003a29880012a000003a20770009c00000cb50000413d000000160780006c00000cb50000413d0000001607000029000003a2877000d1000000000676001900000000622600d90000039b0620009c00000cc30000213d0000039b06200167000000000565004b00000cbd0000213d00000000024200190000039b02200197000003a605400197000000000252019f00000000002f041b0000001a020000290000006002200039001600000002001d0000000002020433000003710e200197000000400b00043d000003af02b0009c00000cb70000213d0000008002b00039000000400020043f0000006002b0003900000000000204350000004005b00039001000000005001d000000000005043500000000050b0436000f00000005001d00000000000504350000001305000029000000000505043300000019060000290000000006060433000000000706004b00000b220000613d000003a387600129000000000757004b00000cb50000413d00000000655600a9000003a405500041000003a25950012a000000000092043500000017020000290000000702200039000000000202041a001703710020019b000000400800043d000003b00580009c00000cb70000213d00000004060000290000001c0d6000290000001205000029000000000a050433000000110500002900000000020b0019000000000b0504330000001505000029000000000c0504330000001d0500002900000000050504330000012006800039000000400060043f000003710650019700000100058000390000000000650435000000e0068000390000000000e60435000000c0078000390000000000c70435000000a00c8000390000000000bc0435000000800b80003900000000009b043500000060098000390000000000a90435000000200a800039001c0000000d001d0000000000da04350000008004400270000000000048043500000040048000390000000000040435000003b10d000041000000000f010019000000000103001900000000030e0019000000400e00043d000000000dde043600150000000d001d0000000008080433000000040de0003900000000008d043500000000080a0433000000240ae0003900000000008a0435000000000d030019000000000301001900000000040404330000004408e00039000000000048043500000000040904330000006408e00039000000000048043500000000040b043300000000090200190000008408e00039000000000048043500000000040c0433000000a408e0003900000000004804350000000004070433000000c407e00039000000000047043500000000040604330000037104400197000000e406e000390000000000460435000000000405043300000371044001970000010405e00039000000000045043500000000040004140000001702000029000000040520008c00000bae0000613d001200000009001d00130000000d001d0000036b01e0009c0000036b0100004100000000010e401900000040011002100000036b0340009c0000036b04008041000000c003400210000000000113019f000003b2011001c700170000000e001d0da70d9d0000040f000000170e000029000000000301001900000060033002700000036b03300197000000600430008c000000600500003900000000050340190000001f0450018f0000000505500272000000050550021000000b980000613d00000000065e0019000000000701034f00000000080e0019000000007907043c0000000008980436000000000968004b00000b940000c13d000000000604004b00000ba60000613d000000000651034f00000000055e00190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000000130d000029000000120900002900000d250000613d0000001f01300039000003810f1001970000000002ef00190000000001f2004b000000000100001900000001010040390000036f0420009c00000cb70000213d000000010110019000000cb70000c13d000000400020043f000000600130008c00000cb50000413d0000001501000029000000000201043300000000010e04330000004003e000390000000003030433000000100400002900000000003404350000000f04000029000000000024043500000000001904350000039b0410009c00000cc30000213d00000080041002100000001806000029000000000506041a0000039b05500197000000000445019f000000000046041b0000039b0420009c00000cc30000213d0000001405000029000000000405041a000003a604400197000000000424019f000000000045041b0000039b0430009c00000cc30000213d0000000606000029000000000406041a0000039b044001970000008005300210000000000454019f000000000046041b0000001b04000029000000000404043300000019050000290000000005050433000000400600043d0000008007600039000000000057043500000060056000390000000000450435000000400460003900000000003404350000002003600039000000000023043500000000001604350000036b0160009c0000036b06008041000000400160021000000000020004140000036b0320009c0000036b02008041000000c002200210000000000112019f000003b3011001c70000800d020000390000000203000039000003b40400004100000000050d00190da70d980000040f000000010120019000000cb50000613d000000160100002900000000030104330000001d0100002900000000020104330000001a010000290000008001100039001b00000001001d0000000004010433000000400100043d00000044051000390000001c060000290000000000650435000003710220019700000024051000390000000000250435000003b502000041000000000021043500000371024001970000000404100039000000000024043500000000040004140000037102300197000000040320008c00000c2c0000c13d0000000103000031000000000103004b00000c400000c13d0000037c010000410000000000100439000000040020044300000000010004140000036b0210009c0000036b01008041000000c0011002100000037d011001c700008002020000390da70d9d0000040f000000010220019000000cd70000613d000000000101043b000000000101004b00000c470000c13d000003770100004100000000001004350000002001000039000000040010043f0000001401000039000000240010043f000003b901000041000000440010043f000003b60100004100000da9000104300000036b0310009c0000036b0100804100000040011002100000036b0340009c0000036b04008041000000c003400210000000000113019f000003b6011001c7001900000002001d0da70d980000040f000000000301001900000060033002700001036b0030019d0000036b033001970003000000010355000000010220019000000d420000613d0000001902000029000000000103004b00000c130000613d000000200130008c00000d5b0000c13d0000000301000367000000000101043b0000000000100435000000000101004b00000d650000613d0000001b010000290000000001010433001900000001001d0000001d0100002900000000010104330000037c0200004100000000002004390000037101100197001d00000001001d000000040010044300000000010004140000036b0210009c0000036b01008041000000c0011002100000037d011001c700008002020000390da70d9d0000040f00000019030000290000037103300197000000010220019000000cd70000613d000000000101043b000000000101004b00000cb50000613d000000400400043d00000044014000390000001c020000290000000000210435000003b8010000410000000000140435000000240140003900000000003104350000000401400039000000000031043500000000010004140000001d02000029000000040320008c00000c6f0000c13d000000010300003100000c820000013d0000036b0340009c001c00000004001d0000036b03000041000000000304401900000040043002100000036b0310009c0000036b01008041000000c001100210000000000141019f000003b6011001c70da70d980000040f000000000301001900000060033002700001036b0030019d0000036b033001970003000000010355000000010220019000000d760000613d0000001c040000290000001f0130003900000396021001970000000001420019000000000221004b000000000200001900000001020040390000036f0410009c00000cb70000213d000000010220019000000cb70000c13d000000400010043f000003700230009c00000cb50000213d0000001a05000029000000a0025000390000000002020433000000160300002900000000030304330000001b0400002900000000040404330000000005050433000000030600002900000000060604330000006007100039000000000067043500000020061000390000000000560435000000000500041100000371055001970000000000510435000000400510003900000000000504350000036b0510009c0000036b01008041000000400110021000000000050004140000036b0650009c0000036b05008041000000c005500210000000000115019f00000392011001c7000003710540019700000371063001970000ffff0720018f0000800d02000039000000040300003900000393040000410da70d980000040f000000010120019000000cb50000613d000000000001042d000000000100001900000da900010430000003940100004100000000001004350000004101000039000000040010043f000003950100004100000da900010430000003940100004100000000001004350000001101000039000000040010043f000003950100004100000da900010430000000400100043d0000006402100039000003bb0300004100000000003204350000004402100039000003bc030000410000000000320435000000240210003900000027030000390000000000320435000003770200004100000000002104350000000402100039000000200300003900000000003204350000036b0210009c0000036b010080410000004001100210000003bd011001c700000da900010430000000000001042f0000006401200039000003bb0300004100000000003104350000004401200039000003bc030000410000000000310435000000240120003900000027030000390000000000310435000003770100004100000000001204350000000401200039000000200300003900000000003104350000036b0120009c0000036b020080410000004001200210000003bd011001c700000da900010430000000400200043d0000001f0430018f0000000505300272000000050550021000000cf70000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000cf30000c13d000000000604004b00000d850000c13d00000d910000013d000000400200043d0000001f0430018f0000000505300272000000050550021000000d060000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000d020000c13d000000000604004b00000d910000613d00000d850000013d000000400200043d0000001f0430018f000000000a0300190000000505300272000000050550021000000d160000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000d120000c13d000000000604004b00000d400000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f000000000015043500000d400000013d000000400200043d0000001f0430018f000000000a0300190000000505300272000000050550021000000d320000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000d2e0000c13d000000000604004b00000d400000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001a0021000000d920000013d0000001f0430018f0000000502300272000000050220021000000d4c0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00000d480000c13d000000000504004b00000d590000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000000da900010430000003770100004100000000001004350000002001000039000000040010043f0000001f01000039000000240010043f000003ba01000041000000440010043f000003b60100004100000da900010430000000400100043d0000004402100039000003b7030000410000000000320435000000240210003900000019030000390000000000320435000003770200004100000000002104350000000402100039000000200300003900000000003204350000036b0210009c0000036b010080410000004001100210000003b6011001c700000da900010430000000400200043d0000001f0430018f000000050530027200000d820000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000d7e0000c13d000000000604004b00000d910000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f000000000015043500000060013002100000036b0320009c0000036b020080410000004002200210000000000112019f00000da900010430000000000001042f00000d9b002104210000000102000039000000000001042d0000000002000019000000000001042d00000da0002104230000000102000039000000000001042d0000000002000019000000000001042d00000da5002104250000000102000039000000000001042d0000000002000019000000000001042d00000da70000043200000da80001042e00000da9000104300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000a1fe0e8d000000000000000000000000000000000000000000000000000000002e7263ea000000000000000000000000000000000000000000000000ffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000fffffffffffffe9f000000000000000000000000000000000000000000000000ffffffffffffffdf000000000000000000000000000000000000000000000000ffffffffffffffbf3239000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000008c379a00000000000000000000000000000000000000000000000000000000032370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000393100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000004efecaa50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000440000000000000000000000001b11d0ff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ffffffe03133000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff3f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0000000000000000000000000000000000000000000000000fffffffffffffdbf800000000000000000000000000000000000000000000000000000000000000034390000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff1f920f5c8400000000000000000000000000000000000000000000000000000000fca513a80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000005eb88d3d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fffffffffffffe7f00000000000000000000000022fb836c1cdda685ce0911e266f6e21965ca31a81e6473f90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002040000000000000000000000000200000000000000000000000000000000000080000000000000000000000000efefaba5e921573100900a3ad9cf29f222d995fb3b6045797eaea7521bd8d6f04e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec77ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000fffffffffffffd80000000000000000000000000000000000000000000000000fffffffffffffd7f00000000000000000000000000000000ffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000ffffffffffb1bf962d000000000000000000000000000000000000000000000000000000007977433800000000000000000000000000000000000000000000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d9553913202000002000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000001e133800000000000000000000000000000000000000000033b2e3c9fd0803ce8000000fffffffffffffffffffffffffffffffffffffffffe6268e1b017bfe18bffffff0000000000000000000000000000000000000000019d971e4fe8401e7400000000000000033b2e3c9fd0803ce800000000000000000000000000000000000000ffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000b6aa1293e652c95e1b2855a9a000000000000000000000000000000000000000000000612d847b578e7643c28ac0000000000000000033b2e3c9fd0803ce7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff18160ddd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000c097ce7bc90715b34b9f1000000000fffffffffffffffffffffffffffffffffffffffffcc4d1c3602f7fc317ffffff000000000000000000000000000000000000000000000000ffffffffffffff7f000000000000000000000000000000000000000000000000fffffffffffffedfa589870900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012400000000000000000000000002000000000000000000000000000000000000a0000000000000000000000000804c9b842b2748a22bb64b345453a3de7ca54a6ca45ce00d415894979e22897a23b872dd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000475076323a206661696c6564207472616e7366657246726f6d000000000000006fd9767600000000000000000000000000000000000000000000000000000000475076323a206e6f74206120636f6e7472616374000000000000000000000000475076323a206d616c666f726d6564207472616e7366657220726573756c7400323820626974730000000000000000000000000000000000000000000000000053616665436173743a2076616c756520646f65736e27742066697420696e2031000000000000000000000000000000000000008400000000000000000000000056c7f3c12fcbacc6a19035b1e6b224dcc26f71a6bb5d244ac5ade29d15786d97
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.