Description:
Smart contract deployed on Ethereum.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.30;
interface IERC20 {
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
}
contract TransferProxy {
address public immutable owner;
constructor() {
owner = msg.sender;
}
function transferFrom(
address token,
address from,
address to,
uint256 amount
) external returns (bool) {
require(msg.sender == owner, "Only the contract owner can call this function");
IERC20 _contract = IERC20(token);
bool success = _contract.transferFrom(from, to, amount);
require(success, "Transfer failed");
return true;
}
}
Submitted on: 2025-10-12 21:20:09
Comments
Log in to comment.
No comments yet.