Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
EcosystemReserveController
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 1 runs
Other Settings:
istanbul EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.12;
import "./IEcosystemReserve.sol";
import "./IERC20.sol";
import {Ownable} from "./Ownable.sol";
/*
* @title EcosystemReserveController
* @dev Proxy smart contract to control the EcosystemReserve, in order for the governance to call its
* user-face functions (as the governance is also the proxy admin of the EcosystemReserve)
* @author Moonwell
*/
contract EcosystemReserveController is Ownable {
IEcosystemReserve public ECOSYSTEM_RESERVE;
bool public initialized;
function setEcosystemReserve(address ecosystemReserve) external onlyOwner {
require(!initialized, "ECOSYSTEM_RESERVE has been initialized");
initialized = true;
ECOSYSTEM_RESERVE = IEcosystemReserve(ecosystemReserve);
}
function approve(
IERC20 token,
address recipient,
uint256 amount
) external onlyOwner {
ECOSYSTEM_RESERVE.approve(token, recipient, amount);
}
function transfer(
IERC20 token,
address recipient,
uint256 amount
) external onlyOwner {
ECOSYSTEM_RESERVE.transfer(token, recipient, amount);
}
function setFundsAdmin(address admin) external onlyOwner {
ECOSYSTEM_RESERVE.setFundsAdmin(admin);
}
}// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.12;
import "./IERC20.sol";
interface IEcosystemReserve {
function approve(IERC20 token, address recipient, uint256 amount) external;
function transfer(IERC20 token, address recipient, uint256 amount) external;
function setFundsAdmin(address admin) external;
}// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.12;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
* From https://github.com/OpenZeppelin/openzeppelin-contracts
*/
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: agpl-3.0
pragma solidity 0.6.12;
import {Context} from "./Context.sol";
/**
* @dev From https://github.com/OpenZeppelin/openzeppelin-contracts
* 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() public {
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: agpl-3.0
pragma solidity 0.6.12;
/**
* @dev From https://github.com/OpenZeppelin/openzeppelin-contracts
* Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}{
"remappings": [
"@forge-std/=lib/forge-std/src/",
"@openzeppelin-contracts/=lib/openzeppelin-contracts/",
"@openzeppelin/=lib/openzeppelin-contracts/",
"@openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"@wormhole/=lib/wormhole/ethereum/contracts/",
"@protocol/=src/",
"@test/=test/",
"@proposals/=src/proposals/",
"@utils/=src/utils/",
"@zelt/=lib/zelt/",
"@zelt-src/=lib/zelt/src/",
"@zelt-test/=lib/zelt/test/",
"ds-test/=lib/solmate/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
"solmate/=lib/solmate/src/",
"wormhole/=lib/wormhole/",
"zelt/=lib/zelt/src/"
],
"optimizer": {
"enabled": true,
"runs": 1
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "istanbul",
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"ECOSYSTEM_RESERVE","outputs":[{"internalType":"contract IEcosystemReserve","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"ecosystemReserve","type":"address"}],"name":"setEcosystemReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"setFundsAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"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"}]Contract Creation Code
608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b61073c8061007d6000396000f3fe608060405234801561001057600080fd5b50600436106100835760003560e01c8063158ef93e146100885780634f8d2323146100a4578063715018a6146100c85780638da5cb5b146100d2578063be989000146100da578063beabacc814610100578063e1f21c6714610136578063ed0d23711461016c578063f2fde38b14610192575b600080fd5b6100906101b8565b604080519115158252519081900360200190f35b6100ac6101c8565b604080516001600160a01b039092168252519081900360200190f35b6100d06101d7565b005b6100ac610267565b6100d0600480360360208110156100f057600080fd5b50356001600160a01b0316610276565b6100d06004803603606081101561011657600080fd5b506001600160a01b03813581169160208101359091169060400135610348565b6100d06004803603606081101561014c57600080fd5b506001600160a01b0381358116916020810135909116906040013561041a565b6100d06004803603602081101561018257600080fd5b50356001600160a01b03166104cf565b6100d0600480360360208110156101a857600080fd5b50356001600160a01b0316610590565b600154600160a01b900460ff1681565b6001546001600160a01b031681565b6101df610676565b6000546001600160a01b0390811691161461022f576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116906000805160206106e7833981519152908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b61027e610676565b6000546001600160a01b039081169116146102ce576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b600154600160a01b900460ff16156103175760405162461bcd60e51b81526004018080602001828103825260268152602001806106a16026913960400191505060405180910390fd5b60018054600160a01b60ff60a01b19909116176001600160a01b0319166001600160a01b0392909216919091179055565b610350610676565b6000546001600160a01b039081169116146103a0576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b600154604080516317d5759960e31b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163beabacc891606480830192600092919082900301818387803b1580156103fd57600080fd5b505af1158015610411573d6000803e3d6000fd5b50505050505050565b610422610676565b6000546001600160a01b03908116911614610472576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b6001546040805163e1f21c6760e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163e1f21c6791606480830192600092919082900301818387803b1580156103fd57600080fd5b6104d7610676565b6000546001600160a01b03908116911614610527576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b6001546040805163ed0d237160e01b81526001600160a01b0384811660048301529151919092169163ed0d237191602480830192600092919082900301818387803b15801561057557600080fd5b505af1158015610589573d6000803e3d6000fd5b5050505050565b610598610676565b6000546001600160a01b039081169116146105e8576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b6001600160a01b03811661062d5760405162461bcd60e51b815260040180806020018281038252602681526020018061067b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206106e783398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345434f53595354454d5f5245534552564520686173206265656e20696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220e8c43350acaff8fbbc283e1785b9946db8c206b87003867c63857f576d57b35b64736f6c634300060c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100835760003560e01c8063158ef93e146100885780634f8d2323146100a4578063715018a6146100c85780638da5cb5b146100d2578063be989000146100da578063beabacc814610100578063e1f21c6714610136578063ed0d23711461016c578063f2fde38b14610192575b600080fd5b6100906101b8565b604080519115158252519081900360200190f35b6100ac6101c8565b604080516001600160a01b039092168252519081900360200190f35b6100d06101d7565b005b6100ac610267565b6100d0600480360360208110156100f057600080fd5b50356001600160a01b0316610276565b6100d06004803603606081101561011657600080fd5b506001600160a01b03813581169160208101359091169060400135610348565b6100d06004803603606081101561014c57600080fd5b506001600160a01b0381358116916020810135909116906040013561041a565b6100d06004803603602081101561018257600080fd5b50356001600160a01b03166104cf565b6100d0600480360360208110156101a857600080fd5b50356001600160a01b0316610590565b600154600160a01b900460ff1681565b6001546001600160a01b031681565b6101df610676565b6000546001600160a01b0390811691161461022f576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116906000805160206106e7833981519152908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b61027e610676565b6000546001600160a01b039081169116146102ce576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b600154600160a01b900460ff16156103175760405162461bcd60e51b81526004018080602001828103825260268152602001806106a16026913960400191505060405180910390fd5b60018054600160a01b60ff60a01b19909116176001600160a01b0319166001600160a01b0392909216919091179055565b610350610676565b6000546001600160a01b039081169116146103a0576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b600154604080516317d5759960e31b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163beabacc891606480830192600092919082900301818387803b1580156103fd57600080fd5b505af1158015610411573d6000803e3d6000fd5b50505050505050565b610422610676565b6000546001600160a01b03908116911614610472576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b6001546040805163e1f21c6760e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163e1f21c6791606480830192600092919082900301818387803b1580156103fd57600080fd5b6104d7610676565b6000546001600160a01b03908116911614610527576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b6001546040805163ed0d237160e01b81526001600160a01b0384811660048301529151919092169163ed0d237191602480830192600092919082900301818387803b15801561057557600080fd5b505af1158015610589573d6000803e3d6000fd5b5050505050565b610598610676565b6000546001600160a01b039081169116146105e8576040805162461bcd60e51b815260206004820181905260248201526000805160206106c7833981519152604482015290519081900360640190fd5b6001600160a01b03811661062d5760405162461bcd60e51b815260040180806020018281038252602681526020018061067b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206106e783398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345434f53595354454d5f5245534552564520686173206265656e20696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220e8c43350acaff8fbbc283e1785b9946db8c206b87003867c63857f576d57b35b64736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.