Skip to content

Instantly share code, notes, and snippets.

@wemeetagain
Created April 6, 2014 20:01
Show Gist options
  • Save wemeetagain/10010830 to your computer and use it in GitHub Desktop.
Save wemeetagain/10010830 to your computer and use it in GitHub Desktop.
naive message board
// data[0] = topic
// data[1] = message
if tx.data[0]:
NEXTINDEX = contract.storage[sha3(tx.data[0])]
contract.storage[sha3(tx.data[0]) + 1 + NEXTINDEX] = tx.data[1]
contract.storage[sha3(tx.data[0])] = NEXTINDEX + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment