Skip to content

Instantly share code, notes, and snippets.

@Ashar2shahid
Created July 1, 2022 16:51
Show Gist options
  • Save Ashar2shahid/555cff8dc895e22704eaeb07b7d1982d to your computer and use it in GitHub Desktop.
Save Ashar2shahid/555cff8dc895e22704eaeb07b7d1982d to your computer and use it in GitHub Desktop.
//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