MOVR Price: $11.27 (+0.69%)
Gas: 3 GWei

Contract

0xB6Fb58eea08b5539f371A744bb9Ef86283F1B3c2

Overview

MOVR Balance

Moonriver Chain LogoMoonriver Chain LogoMoonriver Chain Logo0 MOVR

MOVR Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...8725022021-11-08 19:55:30988 days ago1636401330IN
Beefy.Finance: Treasury
0 MOVR0.000026691
Transfer Ownersh...8323192021-11-01 13:17:42996 days ago1635772662IN
Beefy.Finance: Treasury
0 MOVR0.000026671
0x608060408323112021-11-01 13:15:30996 days ago1635772530IN
 Create: BeefyTreasury
0 MOVR0.000358051

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BeefyTreasury

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at moonriver.moonscan.io on 2021-11-02
*/

// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/utils/Context.sol


pragma solidity >=0.6.0 <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 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;
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol


pragma solidity >=0.6.0 <0.8.0;

/**
 * @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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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;
    }
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


pragma solidity >=0.6.0 <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);
}

// File: contracts/BIFI/infra/BeefyTreasury.sol


pragma solidity ^0.6.12;



contract BeefyTreasury is Ownable {

    function withdrawTokens(address _token, address _to, uint256 _amount) external onlyOwner {
        IERC20(_token).transfer(_to, _amount);
    }

    function withdrawNative(address payable _to, uint256 _amount) external onlyOwner {
        _to.transfer(_amount);
    }

    receive () external payable {}
}

Contract Security Audit

Contract ABI

[{"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":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b6105158061007d6000396000f3fe60806040526004361061004e5760003560e01c806307b18bde1461005a5780635e35359e14610095578063715018a6146100d85780638da5cb5b146100ed578063f2fde38b1461011e57610055565b3661005557005b600080fd5b34801561006657600080fd5b506100936004803603604081101561007d57600080fd5b506001600160a01b038135169060200135610151565b005b3480156100a157600080fd5b50610093600480360360608110156100b857600080fd5b506001600160a01b038135811691602081013590911690604001356101ee565b3480156100e457600080fd5b506100936102d8565b3480156100f957600080fd5b50610102610384565b604080516001600160a01b039092168252519081900360200190f35b34801561012a57600080fd5b506100936004803603602081101561014157600080fd5b50356001600160a01b0316610393565b610159610495565b6001600160a01b031661016a610384565b6001600160a01b0316146101b3576040805162461bcd60e51b815260206004820181905260248201526000805160206104c0833981519152604482015290519081900360640190fd5b6040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156101e9573d6000803e3d6000fd5b505050565b6101f6610495565b6001600160a01b0316610207610384565b6001600160a01b031614610250576040805162461bcd60e51b815260206004820181905260248201526000805160206104c0833981519152604482015290519081900360640190fd5b826001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050506040513d60208110156102d157600080fd5b5050505050565b6102e0610495565b6001600160a01b03166102f1610384565b6001600160a01b03161461033a576040805162461bcd60e51b815260206004820181905260248201526000805160206104c0833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b61039b610495565b6001600160a01b03166103ac610384565b6001600160a01b0316146103f5576040805162461bcd60e51b815260206004820181905260248201526000805160206104c0833981519152604482015290519081900360640190fd5b6001600160a01b03811661043a5760405162461bcd60e51b815260040180806020018281038252602681526020018061049a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220a17a4acf9d78e902685ac95bad049e1fe348cdf06b37a243de7eca37cfde014964736f6c634300060c0033

Deployed Bytecode

0x60806040526004361061004e5760003560e01c806307b18bde1461005a5780635e35359e14610095578063715018a6146100d85780638da5cb5b146100ed578063f2fde38b1461011e57610055565b3661005557005b600080fd5b34801561006657600080fd5b506100936004803603604081101561007d57600080fd5b506001600160a01b038135169060200135610151565b005b3480156100a157600080fd5b50610093600480360360608110156100b857600080fd5b506001600160a01b038135811691602081013590911690604001356101ee565b3480156100e457600080fd5b506100936102d8565b3480156100f957600080fd5b50610102610384565b604080516001600160a01b039092168252519081900360200190f35b34801561012a57600080fd5b506100936004803603602081101561014157600080fd5b50356001600160a01b0316610393565b610159610495565b6001600160a01b031661016a610384565b6001600160a01b0316146101b3576040805162461bcd60e51b815260206004820181905260248201526000805160206104c0833981519152604482015290519081900360640190fd5b6040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156101e9573d6000803e3d6000fd5b505050565b6101f6610495565b6001600160a01b0316610207610384565b6001600160a01b031614610250576040805162461bcd60e51b815260206004820181905260248201526000805160206104c0833981519152604482015290519081900360640190fd5b826001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050506040513d60208110156102d157600080fd5b5050505050565b6102e0610495565b6001600160a01b03166102f1610384565b6001600160a01b03161461033a576040805162461bcd60e51b815260206004820181905260248201526000805160206104c0833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b61039b610495565b6001600160a01b03166103ac610384565b6001600160a01b0316146103f5576040805162461bcd60e51b815260206004820181905260248201526000805160206104c0833981519152604482015290519081900360640190fd5b6001600160a01b03811661043a5760405162461bcd60e51b815260040180806020018281038252602681526020018061049a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220a17a4acf9d78e902685ac95bad049e1fe348cdf06b37a243de7eca37cfde014964736f6c634300060c0033

Deployed Bytecode Sourcemap

6229:358:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6425:121;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6425:121:0;;;;;;;;:::i;:::-;;6272:145;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6272:145:0;;;;;;;;;;;;;;;;;:::i;2781:148::-;;;;;;;;;;;;;:::i;2130:87::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;2130:87:0;;;;;;;;;;;;;;3084:244;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3084:244:0;-1:-1:-1;;;;;3084:244:0;;:::i;6425:121::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2342:68:0;;;;;;;;;;;;;;;6517:21:::1;::::0;-1:-1:-1;;;;;6517:12:0;::::1;::::0;:21;::::1;;;::::0;6530:7;;6517:21:::1;::::0;;;6530:7;6517:12;:21;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;6425:121:::0;;:::o;6272:145::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2342:68:0;;;;;;;;;;;;;;;6379:6:::1;-1:-1:-1::0;;;;;6372:23:0::1;;6396:3;6401:7;6372:37;;;;;;;;;;;;;-1:-1:-1::0;;;;;6372:37:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;;;;;6272:145:0:o;2781:148::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2342:68:0;;;;;;;;;;;;;;;2888:1:::1;2872:6:::0;;2851:40:::1;::::0;-1:-1:-1;;;;;2872:6:0;;::::1;::::0;2851:40:::1;::::0;2888:1;;2851:40:::1;2919:1;2902:19:::0;;-1:-1:-1;;;;;;2902:19:0::1;::::0;;2781:148::o;2130:87::-;2176:7;2203:6;-1:-1:-1;;;;;2203:6:0;2130:87;:::o;3084:244::-;2361:12;:10;:12::i;:::-;-1:-1:-1;;;;;2350:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2350:23:0;;2342:68;;;;;-1:-1:-1;;;2342:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2342:68:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;3173:22:0;::::1;3165:73;;;;-1:-1:-1::0;;;3165:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3275:6;::::0;;3254:38:::1;::::0;-1:-1:-1;;;;;3254:38:0;;::::1;::::0;3275:6;::::1;::::0;3254:38:::1;::::0;::::1;3303:6;:17:::0;;-1:-1:-1;;;;;;3303:17:0::1;-1:-1:-1::0;;;;;3303:17:0;;;::::1;::::0;;;::::1;::::0;;3084:244::o;667:106::-;755:10;667:106;:::o

Swarm Source

ipfs://a17a4acf9d78e902685ac95bad049e1fe348cdf06b37a243de7eca37cfde0149

Block Transaction Gas Used Reward
view all blocks collator

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.