Discover more of Etherscan's tools and services in one place.
Sponsored
Contract Source Code:
File 1 of 1 : Vault
// SPDX-License-Identifier: MIT pragma solidity 0.8.18; interface TokenLike { function approve(address,uint) external; function transfer(address,uint) external; } contract Vault { // --- Auth --- mapping (address => uint) public wards; function rely(address usr) external auth { wards[usr] = 1; } function deny(address usr) external auth { wards[usr] = 0; } modifier auth { require(wards[msg.sender] == 1, "Vault/not-authorized"); _; } constructor(){ wards[msg.sender] = 1; } receive() external payable { } function approve(address _asset,address _contract, uint256 _wad) public auth { TokenLike(_asset).approve(_contract,_wad); } function transfer(address _asset,address _usr, uint256 _wad) public auth{ TokenLike(_asset).transfer(_usr,_wad); } function withdrawBNB(uint256 wad, address payable usr) public auth returns (bool) { usr.transfer(wad); return true; } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.