Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
Vault
Compiler Version
v0.5.17+commit.d19bba13
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
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); } } }
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 ); }
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; } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 999999 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}]
Contract Creation Code
60806040819052600080546001600160a01b03191633178082556001600160a01b0316917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36105dd806100576000396000f3fe60806040526004361061007b5760003560e01c8063c0ee0b8a1161004e578063c0ee0b8a1461010e578063d9caed12146101ad578063f1615f21146101fd578063f2fde38b1461023d5761007b565b80634c9841851461007d578063715018a6146100bb5780638da5cb5b146100d05780638f32d59b146100e5575b005b34801561008957600080fd5b5061009261027d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100c757600080fd5b5061007b610299565b3480156100dc57600080fd5b50610092610319565b3480156100f157600080fd5b506100fa610335565b604080519115158252519081900360200190f35b34801561011a57600080fd5b5061007b6004803603606081101561013157600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561016e57600080fd5b82018360208201111561018057600080fd5b803590602001918460018302840111640100000000831117156101a257600080fd5b509092509050610353565b3480156101b957600080fd5b5061007b600480360360608110156101d057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610359565b34801561020957600080fd5b5061007b6004803603602081101561022057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610486565b34801561024957600080fd5b5061007b6004803603602081101561026057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104de565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6102a1610335565b6102aa57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60005473ffffffffffffffffffffffffffffffffffffffff16331490565b50505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461037d57600080fd5b73ffffffffffffffffffffffffffffffffffffffff83166103e15760405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156103db573d6000803e3d6000fd5b50610481565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561046857600080fd5b505af115801561047c573d6000803e3d6000fd5b505050505b505050565b61048e610335565b61049757600080fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6104e6610335565b6104ef57600080fd5b6104f8816104fb565b50565b73ffffffffffffffffffffffffffffffffffffffff811661051b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905556fea265627a7a72315820b9c9ebc21c33dc3d0101cc593bb64f542ccd46c4e2f3fa79546db5551337d77c64736f6c63430005110032
Deployed Bytecode
0x60806040526004361061007b5760003560e01c8063c0ee0b8a1161004e578063c0ee0b8a1461010e578063d9caed12146101ad578063f1615f21146101fd578063f2fde38b1461023d5761007b565b80634c9841851461007d578063715018a6146100bb5780638da5cb5b146100d05780638f32d59b146100e5575b005b34801561008957600080fd5b5061009261027d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100c757600080fd5b5061007b610299565b3480156100dc57600080fd5b50610092610319565b3480156100f157600080fd5b506100fa610335565b604080519115158252519081900360200190f35b34801561011a57600080fd5b5061007b6004803603606081101561013157600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561016e57600080fd5b82018360208201111561018057600080fd5b803590602001918460018302840111640100000000831117156101a257600080fd5b509092509050610353565b3480156101b957600080fd5b5061007b600480360360608110156101d057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610359565b34801561020957600080fd5b5061007b6004803603602081101561022057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610486565b34801561024957600080fd5b5061007b6004803603602081101561026057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104de565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6102a1610335565b6102aa57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60005473ffffffffffffffffffffffffffffffffffffffff16331490565b50505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461037d57600080fd5b73ffffffffffffffffffffffffffffffffffffffff83166103e15760405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156103db573d6000803e3d6000fd5b50610481565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561046857600080fd5b505af115801561047c573d6000803e3d6000fd5b505050505b505050565b61048e610335565b61049757600080fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6104e6610335565b6104ef57600080fd5b6104f8816104fb565b50565b73ffffffffffffffffffffffffffffffffffffffff811661051b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905556fea265627a7a72315820b9c9ebc21c33dc3d0101cc593bb64f542ccd46c4e2f3fa79546db5551337d77c64736f6c63430005110032
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.