└── TransactionVerifier.sol /TransactionVerifier.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.8.0; 2 | 3 | contract TransactionVerifier { 4 | mapping(address => uint256) public balances; 5 | 6 | function deposit() public payable { 7 | balances[msg.sender] += msg.value; 8 | } 9 | 10 | function withdraw(uint256 amount) public { 11 | require(balances[msg.sender] >= amount, "Insufficient balance"); 12 | payable(msg.sender).transfer(amount); 13 | balances[msg.sender] -= amount; 14 | } 15 | 16 | function verifyTransaction(address sender, uint256 amount) public view returns (bool) { 17 | return balances[sender] >= amount; 18 | } 19 | } 20 | --------------------------------------------------------------------------------