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

20 lines
557 B

pragma solidity >=0.4.22 <0.6.0;
contract Faucet {
mapping(address => bool) processed;
uint quota = 10 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;
}
6 years ago
}