From 870d34b3d593cb382a1bb61a7ebae776d6ed810f Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Sat, 27 Jul 2024 07:09:49 +0700 Subject: [PATCH] Delete blockchain_integration/pi_network/pi-network-interoperability/node_modules/contracts/contracts directory --- .../contracts/contracts/AtomicSwap.sol | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 blockchain_integration/pi_network/pi-network-interoperability/node_modules/contracts/contracts/AtomicSwap.sol diff --git a/blockchain_integration/pi_network/pi-network-interoperability/node_modules/contracts/contracts/AtomicSwap.sol b/blockchain_integration/pi_network/pi-network-interoperability/node_modules/contracts/contracts/AtomicSwap.sol deleted file mode 100644 index a08798eeb..000000000 --- a/blockchain_integration/pi_network/pi-network-interoperability/node_modules/contracts/contracts/AtomicSwap.sol +++ /dev/null @@ -1,25 +0,0 @@ -pragma solidity ^0.8.0; - -import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; - -contract AtomicSwap { - address public owner; - mapping(address => uint256) public balances; - mapping(uint256 => address) public swapIds; - - constructor() public { - owner = msg.sender; - } - - function executeSwap(uint256 swapId, address senderAddress, address recipientAddress, uint256 amount) public { - require(msg.sender == owner, "Only the owner can execute swaps"); - require(swapIds[swapId] == senderAddress, "Invalid swap ID"); - SafeERC20.safeTransfer(senderAddress, recipientAddress, amount); - balances[senderAddress] -= amount; - balances[recipientAddress] += amount; - } - - function getBalance(address address) public view returns (uint256) { - return balances[address]; - } -}