Skip to content

Instantly share code, notes, and snippets.

@brynbellomy
Created June 25, 2017 01:38
Show Gist options
  • Select an option

  • Save brynbellomy/3bc805b8afa494bb1038e985c5ee0737 to your computer and use it in GitHub Desktop.

Select an option

Save brynbellomy/3bc805b8afa494bb1038e985c5ee0737 to your computer and use it in GitHub Desktop.
FoodBudgetWallet.sol
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