ADD file via upload
This commit is contained in:
parent
36675a1e77
commit
6f6dcd0600
|
@ -0,0 +1,11 @@
|
|||
pragma solidity ^0.8.0;
|
||||
|
||||
contract TransactionExecutor {
|
||||
function executeTransaction(address payable receiver, uint256 amount) external payable {
|
||||
// 检查合约的余额是否足够支付交易
|
||||
require(address(this).balance >= amount, "Insufficient contract balance");
|
||||
|
||||
// 执行转账交易
|
||||
receiver.transfer(amount);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue