Created
June 25, 2017 01:38
-
-
Save brynbellomy/3bc805b8afa494bb1038e985c5ee0737 to your computer and use it in GitHub Desktop.
FoodBudgetWallet.sol
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
| pragma solidity ^0.4.0; | |
| // This is our interface (note that it's not really a full | |
| // contract, just a specification of available functions). | |
| contract Reservable { | |
| function reserve(uint seats) payable {} | |
| } | |
| contract FoodBudgetWallet { | |
| address restaurant; | |
| function FoodBudgetWallet(address _restaurant) { | |
| restaurant = _restaurant; | |
| } | |
| function makeReservation(uint seats) { | |
| Reservable r = Reservable(restaurant); | |
| r.reserve.value(1 ether)(seats); | |
| } | |
| function() payable {} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment