contract Stack{function Stack(uint256 swag);function die();function push(string key);function peek()constant returns(string value);function isEmpty()constant returns(bool );function owner()constant returns(address );function size()constant returns(uint256 );function pop()returns(string );function stack(uint256 )constant returns(string );} | |
contract Guestbook { | |
address public ownerAddr; | |
address public stackAddr; | |
function Guestbook(address _stack) { | |
ownerAddr = msg.sender; | |
stackAddr = _stack; | |
} | |
function signGuestBook(string message) { | |
Stack s = Stack(stackAddr); | |
s.push(message); | |
} | |
function removeRecentEntry() { | |
if (msg.sender == ownerAddr) { | |
Stack s = Stack(stackAddr); | |
s.pop(); | |
} | |
} | |
function die() public { | |
if (msg.sender == ownerAddr) { | |
suicide(ownerAddr); | |
} | |
} | |
} | |
// Stack address 0x700de3d287A6857D1653A0A804b838e131AB41E7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment