Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. // Version of Solidity compiler this program was written for
  2. pragma solidity ^0.4.19;
  3.  
  4. // Our first contract is a faucet!
  5. contract Faucet {
  6.  
  7. // Give out ether to anyone who asks
  8. function withdraw(uint withdraw_amount) public {
  9.  
  10. // Limit withdrawal amount
  11. require(withdraw_amount <= 100000000000000000);
  12.  
  13. // Send the amount to the address that requested it
  14. msg.sender.transfer(withdraw_amount);
  15. }
  16.  
  17. // Accept any incoming amount
  18. function () public payable {}
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement