Created
June 18, 2016 19:03
-
-
Save holiman/f66bae83540728c209e521c42bd06362 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
contract DeliveryBoy{ | |
/* | |
* Delivery boy is very important, but not so clever | |
*/ | |
function deliver(address recipient){ | |
selfdestruct(recipient); | |
} | |
} | |
contract MailMan{ | |
/* | |
* The MailMan delivers | |
* No-fuzz delivery of ether to the recipient. | |
* Mailman tolerates no code-execution or funny stuff on cash delivery | |
* Nobody owns the mailman (no 'owner') | |
* Mailman remembers nothing (no storage slots) | |
* | |
* You wanna use mailman for payment? | |
* Go ahead, but its'a gonna cost'ya some extra gas, capisce... | |
*/ | |
function payRecipient(address recipient) | |
{ | |
DeliveryBoy d = new DeliveryBoy(); | |
d.deliver.value(msg.value)(recipient); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment