Contract 0xe7ce7b5ee99cb8c1b6872274b9bb4d4c7a646d39

 
Ad
Ad
Txn Hash Method
Block
From
To
Value
0x2d773f598164d9871dfdfde3bd56964f7a8f45c045d9b97d99a0b0c3bbee493eSet Pair119609772021-03-02 20:22:00108 days 15 hrs agoMute: Deployer IN  0xe7ce7b5ee99cb8c1b6872274b9bb4d4c7a646d390 Ether0.005300656122
0xbea390c1af6f1c12a9fa08ce046712cceadf9942c8fab0b59d13ce47b4bd33980x60806040119363942021-02-27 1:27:43112 days 10 hrs agoMute: Deployer IN  Contract Creation0 Ether0.05765848110
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MuteVault

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
No with 200 runs

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

// File: contracts/Utils/SafeMath.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: contracts/mute/mutevault.sol

pragma solidity 0.6.12;



/**
 * @title A vault to hold and distribute tokens to uniswap pairs.
 */
contract MuteVault {
    using SafeMath for uint256;

    address public token;
    address public pair;
    uint256 public rewarded;
    address public owner;


    constructor(address _token) public {
        token = _token;
        owner = msg.sender;
    }

    function setPair(address _pair) external {
        require(msg.sender == owner, "MuteVault::setPair: Can only be called by the owner");
        pair = _pair;
    }

    function balance() public view returns (uint256) {
        return IMute(token).balanceOf(address(this));
    }

    function reward() external returns (bool) {
        require(balance() > 0, 'MuteVault::reward: Cannot reward 0 balance');
        require(msg.sender == token || msg.sender == owner, "MuteVault::reward: Can only be called by the token contract");

        rewarded = rewarded.add(balance());

        IMute(token).transfer(pair, balance());
        return true;
    }
}

interface IMute {
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewarded","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"}],"name":"setPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060405161088f38038061088f8339818101604052602081101561003357600080fd5b8101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506107ba806100d56000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b14610104578063a8aa1b3114610138578063b69ef8a81461016c578063fc0c546a1461018a5761007d565b8063228cb7331461008257806379317680146100a25780638187f516146100c0575b600080fd5b61008a6101be565b60405180821515815260200191505060405180910390f35b6100aa61043a565b6040518082815260200191505060405180910390f35b610102600480360360208110156100d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610440565b005b61010c61052a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610140610550565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610174610576565b6040518082815260200191505060405180910390f35b610192610640565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000806101c9610576565b1161021f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610720602a913960400191505060405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102c65750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61031b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061074a603b913960400191505060405180910390fd5b610337610326610576565b60025461066490919063ffffffff16565b60028190555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166103a4610576565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156103f757600080fd5b505af115801561040b573d6000803e3d6000fd5b505050506040513d602081101561042157600080fd5b8101908080519060200190929190505050506001905090565b60025481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806106ed6033913960400191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561060057600080fd5b505afa158015610614573d6000803e3d6000fd5b505050506040513d602081101561062a57600080fd5b8101908080519060200190929190505050905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808284019050838110156106e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe4d7574655661756c743a3a736574506169723a2043616e206f6e6c792062652063616c6c656420627920746865206f776e65724d7574655661756c743a3a7265776172643a2043616e6e6f742072657761726420302062616c616e63654d7574655661756c743a3a7265776172643a2043616e206f6e6c792062652063616c6c65642062792074686520746f6b656e20636f6e7472616374a264697066735822122034c6acff47f15a3dbb5537b01ae04e497b78a1034da2389ecf03d9f4fb51e08864736f6c634300060c0033000000000000000000000000a49d7499271ae71cd8ab9ac515e6694c755d400c

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000a49d7499271ae71cd8ab9ac515e6694c755d400c

-----Decoded View---------------
Arg [0] : _token (address): 0xa49d7499271ae71cd8ab9ac515e6694c755d400c

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a49d7499271ae71cd8ab9ac515e6694c755d400c


Deployed ByteCode Sourcemap

5550:951:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6124:374;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;5664:23;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5830:166;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5694:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;5638:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;6004:112;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5611:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;6124:374;6160:4;6197:1;6185:9;:7;:9::i;:::-;:13;6177:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6278:5;;;;;;;;;;6264:19;;:10;:19;;;:42;;;;6301:5;;;;;;;;;;;6287:19;;:10;:19;;;6264:42;6256:114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6394:23;6407:9;:7;:9::i;:::-;6394:8;;:12;;:23;;;;:::i;:::-;6383:8;:34;;;;6436:5;;;;;;;;;;6430:21;;;6452:4;;;;;;;;;;;6458:9;:7;:9::i;:::-;6430:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6486:4;6479:11;;6124:374;:::o;5664:23::-;;;;:::o;5830:166::-;5904:5;;;;;;;;;;;5890:19;;:10;:19;;;5882:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5983:5;5976:4;;:12;;;;;;;;;;;;;;;;;;5830:166;:::o;5694:20::-;;;;;;;;;;;;;:::o;5638:19::-;;;;;;;;;;;;;:::o;6004:112::-;6044:7;6077:5;;;;;;;;;;;6071:22;;;6102:4;6071:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6064:44;;6004:112;:::o;5611:20::-;;;;;;;;;;;;:::o;941:181::-;999:7;1019:9;1035:1;1031;:5;1019:17;;1060:1;1055;:6;;1047:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1113:1;1106:8;;;941:181;;;;:::o

Swarm Source

ipfs://34c6acff47f15a3dbb5537b01ae04e497b78a1034da2389ecf03d9f4fb51e088
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.