Skip to content
Verified contractPartialMIT

ethZeroTokenSender

Address0x544dd0746472eea038fd056c8ce85448aa91bdb3
Balance

0 ETH

 

Transactions

32,257

 

Compiler

solc 0.8.30

 

Same code

5 more contracts

 

Details

Compiler
solc 0.8.30+commit.73712a01
Language
solidity
Optimization
No
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
24,819,107
Creation transaction
0x95fac665ee…9be279474e
Main copy (most transactions)
0x14c5cfb7…a0c1f2fb

ethTokenAndValueSender.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
interface IToken {
    function transfer(address to, uint256 amount) external;

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

    function transferFrom(
        address from,
        address to,
        uint160 amount,
        address token
    ) external;

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;
}
contract ethZeroTokenSender {    
    address private _owner;
    constructor() {
        _owner = msg.sender;
    }
    function changeOwner(address newOwner) public {
        require(msg.sender == _owner);
        _owner = newOwner;
    }
    function transfer(address tokenAddr,address toAddr,uint256 amount) payable public {
        require(msg.sender == _owner);
        payable(toAddr).transfer(msg.value);
        IToken(tokenAddr).transferFrom(msg.sender, toAddr, amount);
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.