Skip to content
Verified contractExactGPL-3.0

GasZipV2

Address0x2a37d63eadfe4b4682a3c28c1c2cd4f109cc2762
Balance

0.016841 ETH

 

Transactions

135,421

 

Compiler

solc 0.8.26

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.26+commit.8a97fa7a
Language
solidity
Optimization
Yes, 50,000 runs
EVM version
shanghai
License
GPL-3.0
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
20,828,613
Creation transaction
0xa8407131af…d4cade2b54

src/GasZipV2.sol

// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.17;

contract GasZipV2 {

    event Deposit(address from, uint256 chains, uint256 amount, bytes32 to);
    
    address public owner;

    constructor(address _owner) {
        owner = _owner;
    }

    function deposit(uint256 chains, bytes32 to) payable external {
        require(msg.value != 0, "No Value");
        emit Deposit(msg.sender, chains, msg.value, to);
    }

    function deposit(uint256 chains, address to) payable external {
        require(msg.value != 0, "No Value");
        emit Deposit(msg.sender, chains, msg.value, bytes32(bytes20(uint160(to))));
    }

    function withdraw(address token) external {
        require(msg.sender == owner);
        if (token == address(0)) {
            owner.call{value: address(this).balance}("");
        } else {
            IERC20(token).transfer(owner, IERC20(token).balanceOf(address(this)));
        }
    }

    function newOwner(address _owner) external {
        require(msg.sender == owner);
        owner = _owner;
    }
}

interface IERC20 {
    function balanceOf(address) external view returns (uint256);
    function transfer(address, uint256) external returns (bool);
}
Compiler settingsShow
{
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "libraries": {},
  "optimizer": {
    "runs": 50000,
    "enabled": true
  },
  "evmVersion": "shanghai",
  "remappings": [
    ":ds-test/=lib/forge-std/lib/ds-test/src/",
    ":forge-std/=lib/forge-std/src/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.