The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/contracts/Faucet.sol

19 lines
558 B

pragma solidity >=0.4.22 <0.6.0;
contract Faucet {
mapping(address => bool) processed;
uint quota = 0.5 ether;
address owner;
constructor() public payable {
owner = msg.sender;
}
function request(address payable requestor) public {
require(msg.sender == owner);
require(quota <= address(this).balance);
require(!processed[requestor]);
processed[requestor] = true;
requestor.transfer(quota);
}
function money() public view returns(uint) {
return address(this).balance;
}
}