Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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