Created
July 1, 2022 16:51
-
-
Save Ashar2shahid/555cff8dc895e22704eaeb07b7d1982d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: MIT | |
pragma solidity 0.8.14; | |
contract Arbitration { | |
address public arbitor; | |
address public userA; | |
address public userB; | |
constructor() { | |
arbitor = msg.sender; | |
} | |
modifier onlyArbitor { | |
require(msg.sender == arbitor, "Not arbitor"); | |
_; | |
} | |
function setUsers(address _userA, address _userB) public onlyArbitor { | |
userA = _userA; | |
userB = _userB; | |
} | |
function sendMoney() public payable { | |
} | |
function payOutB() public payable onlyArbitor { | |
payable(userB).send(address(this).balance); | |
} | |
function denyB() public payable onlyArbitor { | |
payable(userA).send(address(this).balance); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment