ETH Price: $2,463.40 (+4.13%)

Contract

0x1772657c2CB31A415A3283eaDa6ADb0060A6Cf72
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...121011612021-03-24 11:01:251260 days ago1616583685IN
0x1772657c...060A6Cf72
0 ETH0.00523277170
Set Swaps121011592021-03-24 11:00:511260 days ago1616583651IN
0x1772657c...060A6Cf72
0 ETH0.00737205170
0x60806040121011522021-03-24 10:59:271260 days ago1616583567IN
 Create: Vault
0 ETH0.0679575170

Latest 4 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
124155602021-05-11 21:34:251212 days ago1620768865
0x1772657c...060A6Cf72
0.5 ETH
124154172021-05-11 21:02:471212 days ago1620766967
0x1772657c...060A6Cf72
0.5 ETH
122931462021-04-23 0:02:581231 days ago1619136178
0x1772657c...060A6Cf72
9 ETH
122443582021-04-15 11:21:311238 days ago1618485691
0x1772657c...060A6Cf72
9 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vault

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
File 1 of 3 : Vault.sol
pragma solidity ^0.5.7;

import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "./IERC20.sol";

contract Vault is Ownable {
    address public swaps;

    modifier onlySwaps() {
        require(msg.sender == swaps);
        _;
    }

    function() external payable {}

    function tokenFallback(address, uint, bytes calldata) external {}

    function setSwaps(address _swaps) public onlyOwner {
        swaps = _swaps;
    }

    function withdraw(address _token, address _receiver, uint _amount)
        public
        onlySwaps
    {
        if (_token == address(0)) {
            address(uint160(_receiver)).transfer(_amount);
        } else {
            IERC20(_token).transfer(_receiver, _amount);
        }
    }
}

File 2 of 3 : IERC20.sol
pragma solidity ^0.5.6;

/**
 * @title ERC20 interface without bool returns
 * @dev see https://eips.ethereum.org/EIPS/eip-20
 */
interface IERC20 {
    function transfer(address to, uint256 value) external;

    function approve(address spender, uint256 value) external;

    function transferFrom(address from, address to, uint256 value) external;

    function totalSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
}

File 3 of 3 : Ownable.sol
pragma solidity ^0.5.2;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @return the address of the owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner());
        _;
    }

    /**
     * @return true if `msg.sender` is the owner of the contract.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Allows the current owner to relinquish control of the contract.
     * It will not be possible to call the functions with the `onlyOwner`
     * modifier anymore.
     * @notice Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0));
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

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"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_swaps","type":"address"}],"name":"setSwaps","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"swaps","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"tokenFallback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

60806040819052600080546001600160a01b03191633178082556001600160a01b0316917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36105dd806100576000396000f3fe60806040526004361061007b5760003560e01c8063c0ee0b8a1161004e578063c0ee0b8a1461010e578063d9caed12146101ad578063f1615f21146101fd578063f2fde38b1461023d5761007b565b80634c9841851461007d578063715018a6146100bb5780638da5cb5b146100d05780638f32d59b146100e5575b005b34801561008957600080fd5b5061009261027d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100c757600080fd5b5061007b610299565b3480156100dc57600080fd5b50610092610319565b3480156100f157600080fd5b506100fa610335565b604080519115158252519081900360200190f35b34801561011a57600080fd5b5061007b6004803603606081101561013157600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561016e57600080fd5b82018360208201111561018057600080fd5b803590602001918460018302840111640100000000831117156101a257600080fd5b509092509050610353565b3480156101b957600080fd5b5061007b600480360360608110156101d057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610359565b34801561020957600080fd5b5061007b6004803603602081101561022057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610486565b34801561024957600080fd5b5061007b6004803603602081101561026057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104de565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6102a1610335565b6102aa57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60005473ffffffffffffffffffffffffffffffffffffffff16331490565b50505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461037d57600080fd5b73ffffffffffffffffffffffffffffffffffffffff83166103e15760405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156103db573d6000803e3d6000fd5b50610481565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561046857600080fd5b505af115801561047c573d6000803e3d6000fd5b505050505b505050565b61048e610335565b61049757600080fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6104e6610335565b6104ef57600080fd5b6104f8816104fb565b50565b73ffffffffffffffffffffffffffffffffffffffff811661051b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905556fea265627a7a72315820b9c9ebc21c33dc3d0101cc593bb64f542ccd46c4e2f3fa79546db5551337d77c64736f6c63430005110032

Deployed Bytecode

0x60806040526004361061007b5760003560e01c8063c0ee0b8a1161004e578063c0ee0b8a1461010e578063d9caed12146101ad578063f1615f21146101fd578063f2fde38b1461023d5761007b565b80634c9841851461007d578063715018a6146100bb5780638da5cb5b146100d05780638f32d59b146100e5575b005b34801561008957600080fd5b5061009261027d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100c757600080fd5b5061007b610299565b3480156100dc57600080fd5b50610092610319565b3480156100f157600080fd5b506100fa610335565b604080519115158252519081900360200190f35b34801561011a57600080fd5b5061007b6004803603606081101561013157600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561016e57600080fd5b82018360208201111561018057600080fd5b803590602001918460018302840111640100000000831117156101a257600080fd5b509092509050610353565b3480156101b957600080fd5b5061007b600480360360608110156101d057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610359565b34801561020957600080fd5b5061007b6004803603602081101561022057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610486565b34801561024957600080fd5b5061007b6004803603602081101561026057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104de565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6102a1610335565b6102aa57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60005473ffffffffffffffffffffffffffffffffffffffff16331490565b50505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461037d57600080fd5b73ffffffffffffffffffffffffffffffffffffffff83166103e15760405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156103db573d6000803e3d6000fd5b50610481565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561046857600080fd5b505af115801561047c573d6000803e3d6000fd5b505050505b505050565b61048e610335565b61049757600080fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6104e6610335565b6104ef57600080fd5b6104f8816104fb565b50565b73ffffffffffffffffffffffffffffffffffffffff811661051b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905556fea265627a7a72315820b9c9ebc21c33dc3d0101cc593bb64f542ccd46c4e2f3fa79546db5551337d77c64736f6c63430005110032

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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