More Info
Private Name Tags
ContractCreator
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
329213936 | 4 hrs ago | 0.00001105 ETH | ||||
329155302 | 8 hrs ago | 0.00000073 ETH | ||||
329141393 | 9 hrs ago | 0.000002 ETH | ||||
329138562 | 9 hrs ago | 0.00000091 ETH | ||||
329056412 | 15 hrs ago | 0.0000095 ETH | ||||
329053179 | 15 hrs ago | 0.00000033 ETH | ||||
329020415 | 18 hrs ago | 0.00049504 ETH | ||||
329007033 | 18 hrs ago | 0.00000667 ETH | ||||
328937707 | 23 hrs ago | 0.00071591 ETH | ||||
328931291 | 24 hrs ago | 0.000032 ETH | ||||
328925528 | 24 hrs ago | 0.00003569 ETH | ||||
328899766 | 26 hrs ago | 0.00031878 ETH | ||||
328899432 | 26 hrs ago | 0.00031878 ETH | ||||
328834680 | 30 hrs ago | 0.00000166 ETH | ||||
328772011 | 35 hrs ago | 0.000005 ETH | ||||
328698409 | 40 hrs ago | 0.00000055 ETH | ||||
328610313 | 46 hrs ago | 0.00001 ETH | ||||
328596219 | 47 hrs ago | 0.00000054 ETH | ||||
328554031 | 2 days ago | 0.00051 ETH | ||||
328494748 | 2 days ago | 0.000365 ETH | ||||
328494693 | 2 days ago | 0.000365 ETH | ||||
328481957 | 2 days ago | 0.00001574 ETH | ||||
328480591 | 2 days ago | 0.00001574 ETH | ||||
328442482 | 2 days ago | 0.00003311 ETH | ||||
328395988 | 2 days ago | 0.00000063 ETH |
Loading...
Loading
Contract Name:
BeefySwapperTreasury
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin-4/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin-4/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin-4/contracts/access/Ownable.sol"; // Built as the treasury to accept fees from Beefy Zap and deliver Native to feeBatch. contract BeefySwapperTreasury is Ownable { using SafeERC20 for IERC20; // Addresses needed for the operation address public treasury; address public stable; address public gelato; address public router; struct Settings { uint256 gasPriceLimit; uint256 threshold; } Settings public settings; event TokenSwapped(address indexed token, uint256 amount); event Harvest(uint256 amount); constructor( address _treasury, address _stable, address _gelato, address _router ) { stable = _stable; treasury = _treasury; gelato = _gelato; router = _router; } modifier onlyGelato() { require(msg.sender == gelato); _; } function swap(address[] calldata _tokens, bytes[] calldata _data) external onlyGelato { for (uint i; i < _data.length; ++i) { emit TokenSwapped(_tokens[i], IERC20(_tokens[i]).balanceOf(address(this))); _swapViaOneInch(_tokens[i], _data[i]); } uint256 amount = IERC20(stable).balanceOf(address(this)); IERC20(stable).safeTransfer(treasury, amount); emit Harvest(amount); } function _swapViaOneInch(address _inputToken, bytes memory _callData) private { _approveTokenIfNeeded(_inputToken, address(router)); (bool success, bytes memory retData) = router.call(_callData); propagateError(success, retData, "1inch"); require(success == true, "calling 1inch got an error"); } function _approveTokenIfNeeded(address _token, address _spender) private { if (IERC20(_token).allowance(address(this), _spender) == 0) { IERC20(_token).safeApprove(_spender, type(uint).max); } } function propagateError( bool success, bytes memory data, string memory errorMessage ) public pure { // Forward error message from call/delegatecall if (!success) { if (data.length == 0) revert(errorMessage); assembly { revert(add(32, data), mload(data)) } } } function setSettings(Settings calldata _settings) external onlyOwner { settings = _settings; } function setAddresses(address _router, address _gelato, address _treasury) external onlyOwner { router = _router; gelato = _gelato; treasury = _treasury; } function inCaseTokensGetStuck(address _token, bool _native) external onlyOwner { if (_native) { uint256 _nativeAmount = address(this).balance; (bool sent,) = msg.sender.call{value: _nativeAmount}(""); require(sent, "Failed to send Ether"); } else { uint256 _amount = IERC20(_token).balanceOf(address(this)); IERC20(_token).safeTransfer(msg.sender, _amount); } } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/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. */ abstract 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() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 { _transferOwnership(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"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead 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 * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) 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 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) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_stable","type":"address"},{"internalType":"address","name":"_gelato","type":"address"},{"internalType":"address","name":"_router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenSwapped","type":"event"},{"inputs":[],"name":"gelato","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_native","type":"bool"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"string","name":"errorMessage","type":"string"}],"name":"propagateError","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_gelato","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"name":"setAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"gasPriceLimit","type":"uint256"},{"internalType":"uint256","name":"threshold","type":"uint256"}],"internalType":"struct BeefySwapperTreasury.Settings","name":"_settings","type":"tuple"}],"name":"setSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"settings","outputs":[{"internalType":"uint256","name":"gasPriceLimit","type":"uint256"},{"internalType":"uint256","name":"threshold","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stable","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"bytes[]","name":"_data","type":"bytes[]"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620012fe380380620012fe8339810160408190526200003491620000fd565b6200003f3362000090565b600280546001600160a01b03199081166001600160a01b039586161790915560018054821695851695909517909455600380548516928416929092179091556004805490931691161790556200015a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000f857600080fd5b919050565b600080600080608085870312156200011457600080fd5b6200011f85620000e0565b93506200012f60208601620000e0565b92506200013f60408601620000e0565b91506200014f60608601620000e0565b905092959194509250565b611194806200016a6000396000f3fe6080604052600436106100c65760003560e01c8063715018a61161007f578063bac86af511610059578063bac86af514610204578063e06174e414610224578063f2fde38b14610254578063f887ea401461027457600080fd5b8063715018a6146101b15780638da5cb5b146101c657806393cf97f8146101e457600080fd5b80630c85295b146100d25780631e6df053146100f457806322be3de114610114578063363bf96414610151578063573ea5751461017157806361d027b31461019157600080fd5b366100cd57005b600080fd5b3480156100de57600080fd5b506100f26100ed366004610db2565b610294565b005b34801561010057600080fd5b506100f261010f366004610e1e565b610509565b34801561012057600080fd5b50600254610134906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561015d57600080fd5b506100f261016c366004610e52565b610524565b34801561017d57600080fd5b50600354610134906001600160a01b031681565b34801561019d57600080fd5b50600154610134906001600160a01b031681565b3480156101bd57600080fd5b506100f261056b565b3480156101d257600080fd5b506000546001600160a01b0316610134565b3480156101f057600080fd5b506100f26101ff366004610f2f565b61057f565b34801561021057600080fd5b506100f261021f366004610fd0565b6105b8565b34801561023057600080fd5b5060055460065461023f919082565b60408051928352602083019190915201610148565b34801561026057600080fd5b506100f261026f366004611007565b6106e2565b34801561028057600080fd5b50600454610134906001600160a01b031681565b6003546001600160a01b031633146102ab57600080fd5b60005b81811015610441578484828181106102c8576102c8611029565b90506020020160208101906102dd9190611007565b6001600160a01b03167f5cf069f6412972a6c15aa4f5d0a340bfc369c3118f4cf8960b568ffe7ae4621386868481811061031957610319611029565b905060200201602081019061032e9190611007565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610374573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610398919061103f565b60405190815260200160405180910390a26104318585838181106103be576103be611029565b90506020020160208101906103d39190611007565b8484848181106103e5576103e5611029565b90506020028101906103f79190611058565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061075b92505050565b61043a8161109f565b90506102ae565b506002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561048b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104af919061103f565b6001546002549192506104cf916001600160a01b03908116911683610855565b6040518181527f80f97f878e16410266694f134ddf012f2be424f54f8b5cafa107eccc51d00d589060200160405180910390a15050505050565b6105116108b8565b803560055560200135600655565b505050565b61052c6108b8565b600480546001600160a01b039485166001600160a01b031991821617909155600380549385169382169390931790925560018054919093169116179055565b6105736108b8565b61057d6000610912565b565b8261051f5781516000036105b0578060405162461bcd60e51b81526004016105a791906110f2565b60405180910390fd5b815182602001fd5b6105c06108b8565b801561065d576040514790600090339083908381818185875af1925050503d806000811461060a576040519150601f19603f3d011682016040523d82523d6000602084013e61060f565b606091505b50509050806106575760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064016105a7565b50505050565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156106a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c8919061103f565b905061051f6001600160a01b0384163383610855565b5050565b6106ea6108b8565b6001600160a01b03811661074f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105a7565b61075881610912565b50565b6004546107729083906001600160a01b0316610962565b60045460405160009182916001600160a01b0390911690610794908590611125565b6000604051808303816000865af19150503d80600081146107d1576040519150601f19603f3d011682016040523d82523d6000602084013e6107d6565b606091505b5091509150610803828260405180604001604052806005815260200164062d2dcc6d60db1b81525061057f565b6001821515146106575760405162461bcd60e51b815260206004820152601a60248201527f63616c6c696e672031696e636820676f7420616e206572726f7200000000000060448201526064016105a7565b6040516001600160a01b03831660248201526044810182905261051f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526109ef565b6000546001600160a01b0316331461057d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105a7565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051636eb1769f60e11b81523060048201526001600160a01b03828116602483015283169063dd62ed3e90604401602060405180830381865afa1580156109ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d2919061103f565b6000036106de576106de6001600160a01b03831682600019610ac1565b6000610a44826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610bd69092919063ffffffff16565b80519091501561051f5780806020019051810190610a629190611141565b61051f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105a7565b801580610b3b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610b15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b39919061103f565b155b610ba65760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b60648201526084016105a7565b6040516001600160a01b03831660248201526044810182905261051f90849063095ea7b360e01b90606401610881565b6060610be58484600085610bed565b949350505050565b606082471015610c4e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105a7565b600080866001600160a01b03168587604051610c6a9190611125565b60006040518083038185875af1925050503d8060008114610ca7576040519150601f19603f3d011682016040523d82523d6000602084013e610cac565b606091505b5091509150610cbd87838387610cc8565b979650505050505050565b60608315610d37578251600003610d30576001600160a01b0385163b610d305760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a7565b5081610be5565b610be58383815115610d4c5781518083602001fd5b8060405162461bcd60e51b81526004016105a791906110f2565b60008083601f840112610d7857600080fd5b50813567ffffffffffffffff811115610d9057600080fd5b6020830191508360208260051b8501011115610dab57600080fd5b9250929050565b60008060008060408587031215610dc857600080fd5b843567ffffffffffffffff80821115610de057600080fd5b610dec88838901610d66565b90965094506020870135915080821115610e0557600080fd5b50610e1287828801610d66565b95989497509550505050565b600060408284031215610e3057600080fd5b50919050565b80356001600160a01b0381168114610e4d57600080fd5b919050565b600080600060608486031215610e6757600080fd5b610e7084610e36565b9250610e7e60208501610e36565b9150610e8c60408501610e36565b90509250925092565b801515811461075857600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115610ed457610ed4610ea3565b604051601f8501601f19908116603f01168101908282118183101715610efc57610efc610ea3565b81604052809350858152868686011115610f1557600080fd5b858560208301376000602087830101525050509392505050565b600080600060608486031215610f4457600080fd5b8335610f4f81610e95565b9250602084013567ffffffffffffffff80821115610f6c57600080fd5b818601915086601f830112610f8057600080fd5b610f8f87833560208501610eb9565b93506040860135915080821115610fa557600080fd5b508401601f81018613610fb757600080fd5b610fc686823560208401610eb9565b9150509250925092565b60008060408385031215610fe357600080fd5b610fec83610e36565b91506020830135610ffc81610e95565b809150509250929050565b60006020828403121561101957600080fd5b61102282610e36565b9392505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561105157600080fd5b5051919050565b6000808335601e1984360301811261106f57600080fd5b83018035915067ffffffffffffffff82111561108a57600080fd5b602001915036819003821315610dab57600080fd5b6000600182016110bf57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b838110156110e15781810151838201526020016110c9565b838111156106575750506000910152565b60208152600082518060208401526111118160408501602087016110c6565b601f01601f19169190910160400192915050565b600082516111378184602087016110c6565b9190910192915050565b60006020828403121561115357600080fd5b815161102281610e9556fea2646970667358221220374e2615c2d91ed8b242a754b9c7cd6574a684b6f49e247cdc5677f9013eb1b864736f6c634300080f0033000000000000000000000000c3a4fdcba79db04b4c3e352b1c467b3ba909d84a000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc8000000000000000000000000035066d430e5ca34e7bdb0756fce82186cafe1f00000000000000000000000001111111254eeb25477b68fb85ed929f73a960582
Deployed Bytecode
0x6080604052600436106100c65760003560e01c8063715018a61161007f578063bac86af511610059578063bac86af514610204578063e06174e414610224578063f2fde38b14610254578063f887ea401461027457600080fd5b8063715018a6146101b15780638da5cb5b146101c657806393cf97f8146101e457600080fd5b80630c85295b146100d25780631e6df053146100f457806322be3de114610114578063363bf96414610151578063573ea5751461017157806361d027b31461019157600080fd5b366100cd57005b600080fd5b3480156100de57600080fd5b506100f26100ed366004610db2565b610294565b005b34801561010057600080fd5b506100f261010f366004610e1e565b610509565b34801561012057600080fd5b50600254610134906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561015d57600080fd5b506100f261016c366004610e52565b610524565b34801561017d57600080fd5b50600354610134906001600160a01b031681565b34801561019d57600080fd5b50600154610134906001600160a01b031681565b3480156101bd57600080fd5b506100f261056b565b3480156101d257600080fd5b506000546001600160a01b0316610134565b3480156101f057600080fd5b506100f26101ff366004610f2f565b61057f565b34801561021057600080fd5b506100f261021f366004610fd0565b6105b8565b34801561023057600080fd5b5060055460065461023f919082565b60408051928352602083019190915201610148565b34801561026057600080fd5b506100f261026f366004611007565b6106e2565b34801561028057600080fd5b50600454610134906001600160a01b031681565b6003546001600160a01b031633146102ab57600080fd5b60005b81811015610441578484828181106102c8576102c8611029565b90506020020160208101906102dd9190611007565b6001600160a01b03167f5cf069f6412972a6c15aa4f5d0a340bfc369c3118f4cf8960b568ffe7ae4621386868481811061031957610319611029565b905060200201602081019061032e9190611007565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610374573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610398919061103f565b60405190815260200160405180910390a26104318585838181106103be576103be611029565b90506020020160208101906103d39190611007565b8484848181106103e5576103e5611029565b90506020028101906103f79190611058565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061075b92505050565b61043a8161109f565b90506102ae565b506002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561048b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104af919061103f565b6001546002549192506104cf916001600160a01b03908116911683610855565b6040518181527f80f97f878e16410266694f134ddf012f2be424f54f8b5cafa107eccc51d00d589060200160405180910390a15050505050565b6105116108b8565b803560055560200135600655565b505050565b61052c6108b8565b600480546001600160a01b039485166001600160a01b031991821617909155600380549385169382169390931790925560018054919093169116179055565b6105736108b8565b61057d6000610912565b565b8261051f5781516000036105b0578060405162461bcd60e51b81526004016105a791906110f2565b60405180910390fd5b815182602001fd5b6105c06108b8565b801561065d576040514790600090339083908381818185875af1925050503d806000811461060a576040519150601f19603f3d011682016040523d82523d6000602084013e61060f565b606091505b50509050806106575760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064016105a7565b50505050565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156106a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c8919061103f565b905061051f6001600160a01b0384163383610855565b5050565b6106ea6108b8565b6001600160a01b03811661074f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105a7565b61075881610912565b50565b6004546107729083906001600160a01b0316610962565b60045460405160009182916001600160a01b0390911690610794908590611125565b6000604051808303816000865af19150503d80600081146107d1576040519150601f19603f3d011682016040523d82523d6000602084013e6107d6565b606091505b5091509150610803828260405180604001604052806005815260200164062d2dcc6d60db1b81525061057f565b6001821515146106575760405162461bcd60e51b815260206004820152601a60248201527f63616c6c696e672031696e636820676f7420616e206572726f7200000000000060448201526064016105a7565b6040516001600160a01b03831660248201526044810182905261051f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526109ef565b6000546001600160a01b0316331461057d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105a7565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051636eb1769f60e11b81523060048201526001600160a01b03828116602483015283169063dd62ed3e90604401602060405180830381865afa1580156109ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d2919061103f565b6000036106de576106de6001600160a01b03831682600019610ac1565b6000610a44826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610bd69092919063ffffffff16565b80519091501561051f5780806020019051810190610a629190611141565b61051f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105a7565b801580610b3b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610b15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b39919061103f565b155b610ba65760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b60648201526084016105a7565b6040516001600160a01b03831660248201526044810182905261051f90849063095ea7b360e01b90606401610881565b6060610be58484600085610bed565b949350505050565b606082471015610c4e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105a7565b600080866001600160a01b03168587604051610c6a9190611125565b60006040518083038185875af1925050503d8060008114610ca7576040519150601f19603f3d011682016040523d82523d6000602084013e610cac565b606091505b5091509150610cbd87838387610cc8565b979650505050505050565b60608315610d37578251600003610d30576001600160a01b0385163b610d305760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a7565b5081610be5565b610be58383815115610d4c5781518083602001fd5b8060405162461bcd60e51b81526004016105a791906110f2565b60008083601f840112610d7857600080fd5b50813567ffffffffffffffff811115610d9057600080fd5b6020830191508360208260051b8501011115610dab57600080fd5b9250929050565b60008060008060408587031215610dc857600080fd5b843567ffffffffffffffff80821115610de057600080fd5b610dec88838901610d66565b90965094506020870135915080821115610e0557600080fd5b50610e1287828801610d66565b95989497509550505050565b600060408284031215610e3057600080fd5b50919050565b80356001600160a01b0381168114610e4d57600080fd5b919050565b600080600060608486031215610e6757600080fd5b610e7084610e36565b9250610e7e60208501610e36565b9150610e8c60408501610e36565b90509250925092565b801515811461075857600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115610ed457610ed4610ea3565b604051601f8501601f19908116603f01168101908282118183101715610efc57610efc610ea3565b81604052809350858152868686011115610f1557600080fd5b858560208301376000602087830101525050509392505050565b600080600060608486031215610f4457600080fd5b8335610f4f81610e95565b9250602084013567ffffffffffffffff80821115610f6c57600080fd5b818601915086601f830112610f8057600080fd5b610f8f87833560208501610eb9565b93506040860135915080821115610fa557600080fd5b508401601f81018613610fb757600080fd5b610fc686823560208401610eb9565b9150509250925092565b60008060408385031215610fe357600080fd5b610fec83610e36565b91506020830135610ffc81610e95565b809150509250929050565b60006020828403121561101957600080fd5b61102282610e36565b9392505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561105157600080fd5b5051919050565b6000808335601e1984360301811261106f57600080fd5b83018035915067ffffffffffffffff82111561108a57600080fd5b602001915036819003821315610dab57600080fd5b6000600182016110bf57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b838110156110e15781810151838201526020016110c9565b838111156106575750506000910152565b60208152600082518060208401526111118160408501602087016110c6565b601f01601f19169190910160400192915050565b600082516111378184602087016110c6565b9190910192915050565b60006020828403121561115357600080fd5b815161102281610e9556fea2646970667358221220374e2615c2d91ed8b242a754b9c7cd6574a684b6f49e247cdc5677f9013eb1b864736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c3a4fdcba79db04b4c3e352b1c467b3ba909d84a000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc8000000000000000000000000035066d430e5ca34e7bdb0756fce82186cafe1f00000000000000000000000001111111254eeb25477b68fb85ed929f73a960582
-----Decoded View---------------
Arg [0] : _treasury (address): 0xc3a4fdcba79DB04b4C3e352b1C467B3Ba909D84A
Arg [1] : _stable (address): 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8
Arg [2] : _gelato (address): 0x035066D430e5ca34e7BdB0756FCe82186CAfe1F0
Arg [3] : _router (address): 0x1111111254EEB25477B68fb85Ed929f73A960582
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000c3a4fdcba79db04b4c3e352b1c467b3ba909d84a
Arg [1] : 000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc8
Arg [2] : 000000000000000000000000035066d430e5ca34e7bdb0756fce82186cafe1f0
Arg [3] : 0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ARB | 9.69% | $0.999896 | 241.6165 | $241.59 | |
ARB | 6.35% | $14.58 | 10.8609 | $158.35 | |
ARB | 6.25% | $0.998341 | 156.1212 | $155.86 | |
ARB | 5.66% | $1 | 140.8182 | $140.96 | |
ARB | 5.46% | $1 | 136.2214 | $136.22 | |
ARB | 4.92% | $0.332117 | 369.489 | $122.71 | |
ARB | 4.66% | $3.55 | 32.74 | $116.23 | |
ARB | 4.50% | $1,890.28 | 0.0594 | $112.22 | |
ARB | 4.48% | $2.73 | 40.9277 | $111.73 | |
ARB | 3.80% | $0.688673 | 137.3851 | $94.61 | |
ARB | 3.46% | $1 | 86.1439 | $86.14 | |
ARB | 3.45% | $1,807.48 | 0.0476 | $86.05 | |
ARB | 3.43% | $163.96 | 0.5221 | $85.61 | |
ARB | 3.20% | $14.99 | 5.317 | $79.7 | |
ARB | 3.19% | $1.18 | 67.2884 | $79.4 | |
ARB | 2.76% | $2,168 | 0.0317 | $68.7 | |
ARB | 2.32% | $0.89898 | 64.2671 | $57.77 | |
ARB | 2.31% | $5.98 | 9.6112 | $57.48 | |
ARB | 2.17% | $2,035.01 | 0.0266 | $54.1 | |
ARB | 2.10% | $0.999935 | 52.4047 | $52.4 | |
ARB | 1.57% | $0.210705 | 185.1543 | $39.01 | |
ARB | 1.56% | $1 | 38.9816 | $38.98 | |
ARB | 1.47% | $1.17 | 31.252 | $36.56 | |
ARB | 1.23% | $0.81403 | 37.6292 | $30.63 | |
ARB | 1.07% | $0.999417 | 26.5699 | $26.55 | |
ARB | 1.01% | $2,018.28 | 0.0124 | $25.08 | |
ARB | 1.00% | $0.000009 | 2,727,337.5916 | $24.9 | |
ARB | 0.83% | $1.08 | 19.1527 | $20.67 | |
ARB | 0.66% | $93,341 | 0.0001757 | $16.4 | |
ARB | 0.65% | $1.56 | 10.416 | $16.25 | |
ARB | 0.61% | $1,800.96 | 0.00851001 | $15.33 | |
ARB | 0.59% | $0.566777 | 25.8368 | $14.64 | |
ARB | 0.54% | $1,799.85 | 0.00752479 | $13.54 | |
ARB | 0.52% | $0.023074 | 566.1445 | $13.06 | |
ARB | 0.43% | $1,981.83 | 0.00534688 | $10.6 | |
ARB | 0.29% | $1.15 | 6.376 | $7.33 | |
ARB | 0.28% | $1 | 6.8603 | $6.88 | |
ARB | 0.25% | $0.091528 | 67.052 | $6.14 | |
ARB | 0.24% | $1 | 5.8705 | $5.87 | |
ARB | 0.17% | $1 | 4.1934 | $4.21 | |
ARB | 0.15% | $93,364 | 0.00003949 | $3.69 | |
ARB | 0.14% | $4.58 | 0.7462 | $3.42 | |
ARB | 0.12% | $43.43 | 0.0671 | $2.92 | |
ARB | 0.10% | $2,140.13 | 0.00110662 | $2.37 | |
ARB | 0.08% | $2.07 | 0.9953 | $2.06 | |
ARB | 0.04% | $1 | 1.073 | $1.07 | |
ARB | 0.04% | $0.247801 | 4.2287 | $1.05 | |
ARB | 0.04% | $0.204783 | 4.7709 | $0.977 | |
ARB | 0.04% | $0.219389 | 4.344 | $0.953 | |
ARB | 0.04% | $0.668454 | 1.368 | $0.9144 | |
ARB | 0.03% | $0.005972 | 112.5436 | $0.672 | |
ARB | 0.02% | $2.08 | 0.2555 | $0.5315 | |
ARB | 0.02% | $0.0183 | 25.9785 | $0.4753 | |
ARB | 0.02% | $0.000594 | 749.829 | $0.4455 | |
ARB | 0.01% | $0.116045 | 2.5008 | $0.2902 | |
ARB | <0.01% | $0.000397 | 500 | $0.1987 | |
ARB | <0.01% | $0.99891 | 0.1008 | $0.1007 |
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.