Skip to content

Instantly share code, notes, and snippets.

import "owned";
contract Archive is owned {
struct Content {
bool exists;
address OP;
bytes32[] archives;
}
import "owned";
contract RevokableOwned is owned {
address previousOwner;
uint8 revokableV;
bytes32 revokableR;
bytes32 revokableS;
// In order to make a contracts ownership revokeable you must
@d11e9
d11e9 / OwnedAttributeStore.sol
Last active November 21, 2015 00:36
OwnedAttributeStore
contract OwnedAttributeStore {
struct Attribute {
address owner;
address writer;
address revoker;
bytes32 value;
}
@d11e9
d11e9 / pebble-test.js
Last active October 22, 2015 12:24
pebble-test.js
var count = parseInt(localStorage.getItem('count')) || 0;
var interval;
function tick (){
simply.vibe('short');
}
function render(){
simply.text({ title: 'Test App', subtitle: "Vibrating every " + count + " seconds."});
}
// @title: Datagotchi
// @author: Doug A <d11e9@turkd.net>
// @desc: distributed data modeling
contract datagotchi {
struct Challenge {
bytes32 challenge;
bytes32 hashedResponse;
___ __ __
/\_ \ /\ \ __/\ \__
____ ___\//\ \ __ \_\ \/\_\ \ ,_\ ___ _ __
/',__\ / __`\\ \ \ /'__`\ /'_` \/\ \ \ \/ / __`\/\`'__\
/\__, `\/\ \L\ \\_\ \_/\ __//\ \L\ \ \ \ \ \_/\ \L\ \ \ \/
\/\____/\ \____//\____\ \____\ \___,_\ \_\ \__\ \____/\ \_\
\/___/ \/___/ \/____/\/____/\/__,_ /\/_/\/__/\/___/ \/_/
@d11e9
d11e9 / byteme.sol
Created September 30, 2015 12:20
Byteme.sol
contract byteme {
struct Val {
bool hex;
bytes data;
}
mapping (bytes32 => Val) public data;
event Log(address indexed, string, bytes32 indexed, bytes);
contract owned {
address owner;
function owned() { owner = msg.sender; }
function transfer(address to) returns (bool success){
if (isOwner()) {
owner = to;
return true;
} else {
return false;
@d11e9
d11e9 / dapp_list.sol
Last active September 17, 2015 13:42
DAppList
contract owned {
address owner;
function owned() { owner = msg.sender; }
function transfer(address to) onlyowner returns (bool success){
owner = to;
return true;
}
function isOwner (address addr) returns(bool) {
@d11e9
d11e9 / NOTICE.MD
Last active August 29, 2015 14:28
Project moved to its own respository: http://github.com/d11e9/avatar