Overview
S Balance
0 S
S Value
-More Info
Private Name Tags
ContractCreator
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x7AF6F359...60dBaACe1 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
AaveEcosystemReserveController
Compiler Version
v0.8.10+commit.fc410830
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import {Ownable} from '@aave/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 '@aave/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 IAaveEcosystemReserveController function approve( address collector, IERC20 token, address recipient, uint256 amount ) external onlyOwner { IAdminControlledEcosystemReserve(collector).approve(token, recipient, amount); } /// @inheritdoc IAaveEcosystemReserveController function transfer( address collector, IERC20 token, address recipient, uint256 amount ) external onlyOwner { IAdminControlledEcosystemReserve(collector).transfer(token, recipient, amount); } /// @inheritdoc IAaveEcosystemReserveController function createStream( address collector, address recipient, uint256 deposit, IERC20 tokenAddress, uint256 startTime, uint256 stopTime ) external onlyOwner returns (uint256) { return IStreamable(collector).createStream( recipient, deposit, address(tokenAddress), startTime, stopTime ); } /// @inheritdoc IAaveEcosystemReserveController function withdrawFromStream( address collector, uint256 streamId, uint256 funds ) external onlyOwner returns (bool) { return IStreamable(collector).withdrawFromStream(streamId, funds); } /// @inheritdoc IAaveEcosystemReserveController function cancelStream(address collector, uint256 streamId) external onlyOwner returns (bool) { return IStreamable(collector).cancelStream(streamId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with 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/2691 return msg.data; } }
// SPDX-License-Identifier: AGPL-3.0 pragma 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); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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. */ constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), 'Ownable: caller is not the owner'); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), 'Ownable: new owner is the zero address'); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import {IERC20} from '@aave/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 * @param collector The collector contract with funds (Aave ecosystem reserve) * @param recipient The recipient of the stream of token * @param deposit Total amount to be streamed * @param tokenAddress The ERC20 token to use as streaming asset * @param startTime The unix timestamp for when the stream starts * @param stopTime The unix timestamp for when the stream stops * @return uint256 The stream id created **/ function createStream( address collector, address recipient, uint256 deposit, IERC20 tokenAddress, uint256 startTime, uint256 stopTime ) external returns (uint256); /** * @notice Proxy function to withdraw from a stream of token on a specific collector contract * @param collector The collector contract with funds (Aave ecosystem reserve) * @param streamId The id of the stream to withdraw tokens from * @param funds Amount to withdraw * @return bool If the withdrawal finished properly **/ function withdrawFromStream( address collector, uint256 streamId, uint256 funds ) external returns (bool); /** * @notice Proxy function to cancel a stream of token on a specific collector contract * @param collector The collector contract with funds (Aave ecosystem reserve) * @param streamId The id of the stream to cancel * @return bool If the cancellation happened correctly **/ function cancelStream(address collector, uint256 streamId) external returns (bool); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.10; import {IERC20} from '@aave/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 * @param amount Allowance to approve **/ function approve(IERC20 token, address recipient, uint256 amount) external; /** * @notice Function for the funds admin to transfer ERC20 tokens to other parties * @param token The address of the token to transfer * @param recipient Transfer's recipient * @param amount Amount to transfer **/ function transfer(IERC20 token, address recipient, uint256 amount) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; 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 ); event WithdrawFromStream(uint256 indexed streamId, address indexed recipient, uint256 amount); event CancelStream( uint256 indexed streamId, address indexed sender, address indexed recipient, uint256 senderBalance, uint256 recipientBalance ); function balanceOf(uint256 streamId, address who) external view returns (uint256 balance); function getStream( uint256 streamId ) external view returns ( address sender, address recipient, uint256 deposit, address token, uint256 startTime, uint256 stopTime, uint256 remainingBalance, uint256 ratePerSecond ); function createStream( address recipient, uint256 deposit, address tokenAddress, uint256 startTime, uint256 stopTime ) external returns (uint256 streamId); function withdrawFromStream(uint256 streamId, uint256 funds) external returns (bool); function cancelStream(uint256 streamId) external returns (bool); function initialize(address fundsAdmin) external; }
{ "evmVersion": "berlin", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 100000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"aaveGovShortTimelock","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"collector","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collector","type":"address"},{"internalType":"uint256","name":"streamId","type":"uint256"}],"name":"cancelStream","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collector","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deposit","type":"uint256"},{"internalType":"contract IERC20","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"stopTime","type":"uint256"}],"name":"createStream","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collector","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collector","type":"address"},{"internalType":"uint256","name":"streamId","type":"uint256"},{"internalType":"uint256","name":"funds","type":"uint256"}],"name":"withdrawFromStream","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b146100e5578063f18d03cc1461010d578063f2fde38b14610120578063fd59e1341461013357600080fd5b80632f436bfa1461008d57806359eba454146100b5578063715018a6146100ca5780637dc14a8e146100d2575b600080fd5b6100a061009b366004610993565b610154565b60405190151581526020015b60405180910390f35b6100c86100c33660046109c8565b61027b565b005b6100c8610393565b6100a06100e0366004610a19565b610483565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100ac565b6100c861011b3660046109c8565b61059d565b6100c861012e366004610a45565b610681565b610146610141366004610a62565b610832565b6040519081526020016100ac565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146101db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6040517f7a9b2c6c000000000000000000000000000000000000000000000000000000008152600481018490526024810183905273ffffffffffffffffffffffffffffffffffffffff851690637a9b2c6c906044016020604051808303816000875af115801561024f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102739190610ac7565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d2565b6040517fe1f21c6700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015283811660248301526044820183905285169063e1f21c67906064015b600060405180830381600087803b15801561037557600080fd5b505af1158015610389573d6000803e3d6000fd5b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d2565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000805473ffffffffffffffffffffffffffffffffffffffff163314610505576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d2565b6040517f6db9241b0000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff841690636db9241b906024016020604051808303816000875af1158015610572573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105969190610ac7565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461061e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d2565b6040517fbeabacc800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015283811660248301526044820183905285169063beabacc89060640161035b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d2565b73ffffffffffffffffffffffffffffffffffffffff81166107a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101d2565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146108b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d2565b6040517fcc1b4bf600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152602482018790528581166044830152606482018590526084820184905288169063cc1b4bf69060a4016020604051808303816000875af115801561093f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109639190610ae9565b979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461099057600080fd5b50565b6000806000606084860312156109a857600080fd5b83356109b38161096e565b95602085013595506040909401359392505050565b600080600080608085870312156109de57600080fd5b84356109e98161096e565b935060208501356109f98161096e565b92506040850135610a098161096e565b9396929550929360600135925050565b60008060408385031215610a2c57600080fd5b8235610a378161096e565b946020939093013593505050565b600060208284031215610a5757600080fd5b81356105968161096e565b60008060008060008060c08789031215610a7b57600080fd5b8635610a868161096e565b95506020870135610a968161096e565b9450604087013593506060870135610aad8161096e565b9598949750929560808101359460a0909101359350915050565b600060208284031215610ad957600080fd5b8151801515811461059657600080fd5b600060208284031215610afb57600080fd5b505191905056fea26469706673582212206af6dda09f7e6417703a87e7c8c4b22128dd9d9c7d7a2419a0486c74aa94f2f764736f6c634300080a0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.