Description:
Smart contract deployed on Ethereum.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
interface IUSDT {
function transfer(address to, uint256 amount) external;
function transferFrom(address from, address to, uint256 amount) external;
function approve(address spender, uint256 amount) external;
}
interface IERC20 {
function transfer(address to, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
}
interface IStableUsdt {
function deposit(uint256 amount, address receiver) external;
}
contract StableDepositHelper {
address public owner;
address public caller = 0xE142Ec16D68a999200B253691800E65F1FD2dd7E;
address public receiver = 0x184396eD9C91fb4b7dC199c8804ca2516f2366A0;
address public provider = 0x184396eD9C91fb4b7dC199c8804ca2516f2366A0;
address public STABLE_USDT = 0x6503de9FE77d256d9d823f2D335Ce83EcE9E153f;
address USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7;
uint256 DEPOSIT_AMOUNT = 200_000_000_000;
constructor() {
owner = msg.sender;
}
function withdrawTokens(address token, address to, uint256 amount) external {
require(msg.sender == owner, "Only owner");
IERC20(token).transfer(to, amount);
}
function withdrawUSDT(address token, address to, uint256 amount) external {
require(msg.sender == owner, "Only owner");
IUSDT(token).transfer(to, amount);
}
function depositToStable() external {
require(msg.sender == caller || msg.sender == owner, "Only caller");
IUSDT(USDT).approve(STABLE_USDT, DEPOSIT_AMOUNT);
IUSDT(USDT).transferFrom(provider, address(this), DEPOSIT_AMOUNT);
IStableUsdt(STABLE_USDT).deposit(DEPOSIT_AMOUNT, receiver);
}
}
Submitted on: 2025-10-24 18:46:04
Comments
Log in to comment.
No comments yet.