Address Contract Partially Verified
Address
0x78ADB153b5b94543c33F2B94f4bef09FebF47508
Balance
0 ETH
Nonce
1
Code Size
616 bytes
Creator
0xF5e10380...2Bcc at tx 0x268122c4...f0fa20
Indexed Transactions
0
Contract Bytecode
616 bytes
0x6080604052600436106100225760003560e01c8063f109a0be146100ae57600080fd5b366100a95760007f000000000000000000000000f5e10380213880111522dd0efd3dbb45b9f62bcc6001600160a01b03164760405160006040518083038185875af1925050503d8060008114610094576040519150601f19603f3d011682016040523d82523d6000602084013e610099565b606091505b50509050806100a757600080fd5b005b600080fd5b3480156100ba57600080fd5b506100a76100c93660046101e9565b336001600160a01b037f000000000000000000000000f5e10380213880111522dd0efd3dbb45b9f62bcc16146100fe57600080fd5b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa15801561014c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101709190610219565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156101ce57600080fd5b505af11580156101e2573d6000803e3d6000fd5b5050505050565b6000602082840312156101fb57600080fd5b81356001600160a01b038116811461021257600080fd5b9392505050565b60006020828403121561022b57600080fd5b505191905056fea26469706673582212207a3063a75755b8b3364bcf7137526722a9ac4adcc81866e63e0a9dfb44df3a3e64736f6c63430008140033
Verified Source Code Partial Match
Compiler: v0.8.20+commit.a1b79de6
EVM: paris
Optimization: Yes (800 runs)
Deposit.sol 52 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "IERC20Lite.sol";
/**
* @title Deposit contract
* @notice Creates a contract with a known address and withdraws tokens from it.
* After deployment, the Vault will call fetch() to withdraw tokens.
* @dev Any change in this contract, including comments, will affect the final
* bytecode and therefore will affect the create2 derived addresses.
* Do NOT modify unless the consequences of doing so are fully understood.
*/
contract Deposit {
address payable private immutable vault;
/**
* @notice Upon deployment it fetches the tokens (native or ERC20) to the Vault.
* @param token The address of the token to fetch
*/
constructor(address token) {
vault = payable(msg.sender);
// Slightly cheaper to use msg.sender instead of Vault.
if (token == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) {
// solhint-disable-next-line avoid-low-level-calls
(bool success, ) = msg.sender.call{value: address(this).balance}("");
require(success);
} else {
// IERC20Lite.transfer doesn't have a return bool to avoid reverts on non-standard ERC20s
IERC20Lite(token).transfer(msg.sender, IERC20Lite(token).balanceOf(address(this)));
}
}
/**
* @notice Allows the Vault to fetch ERC20 tokens from this contract.
* @param token The address of the token to fetch
*/
function fetch(address token) external {
require(msg.sender == vault);
// IERC20Lite.transfer doesn't have a return bool to avoid reverts on non-standard ERC20s
IERC20Lite(token).transfer(msg.sender, IERC20Lite(token).balanceOf(address(this)));
}
/// @notice Receives native tokens, emits an event and sends them to the Vault. Note that this
// requires the sender to forward some more gas than for a simple transfer.
receive() external payable {
// solhint-disable-next-line avoid-low-level-calls
(bool success, ) = vault.call{value: address(this).balance}("");
require(success);
}
}
IERC20Lite.sol 18 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title ERC20 Lite Interface
* @notice The interface for functions ERC20Lite implements. This is intended to
* be used only in the Deposit contract.
* @dev Any change in this contract, including comments, will affect the final
* bytecode and therefore will affect the create2 derived addresses.
* Do NOT modify unless the consequences of doing so are fully understood.
*/
interface IERC20Lite {
/// @dev Removed the return bool to avoid reverts on non-standard ERC20s.
function transfer(address, uint256) external;
function balanceOf(address) external view returns (uint256);
}
Write Contract 1 functions
These functions modify contract state and require a wallet transaction to execute.
fetch 0xf109a0be
address token
Recent Transactions
No transactions found for this address