A collection of contracts for Ethereum
A notary contract for Ethereum
The notary allows accounts to submit a hash which it will add to a public record. Along with the hash, the notary records the sender's address and a timestamp of when the information was received. After submission, the original sender can provide additional information by setting custom properties for the entry.
# Notarise a hash "record" <id> # Get default properties "get" <id> "account" "get" <id> "timestamp" # Set custom properties "set" <id> "my-note" "An arbitrary message" "set" <id> "author" "John Q. Public"
"record" <id> # Notarise a hash, submitter, and timestamp "get" <id> <key> # Get a property "set" <id> <key> <value> # Set a property "database" <address> # Set the database address (Creator only) "kill" # Kill the notary (Creator only)
An object database contract for Ethereum
In public mode, anyone can add objects to the database. The first account to add an object becomes its owner. Only the object's owner can modify its properties. In private mode, only the database parent may add objects. Thus, only they will own (and be able to modify) objects. By default, public mode is enabled. In either mode, any account can read object properties.
"add" <id> # Add empty object (20-byte id) "get" <id> <key> # Get object property (12-byte key) "set" <id> <key> <value> # Set object property (32-byte value) "config" "public" <bool> # Configure mode (1 for public, 0 for private) "config" "parent" <address> # Configure parent (Defaults to the creator) "kill" # Kill the database (Parent only)
A key-value store contract for Ethereum
"get" <key> # Get a value "set" <key> <value> # Set a value "kill" # Kill keystore (creator only)
A name registration contract for Ethereum
Simply a re-implementation of the classic in Serpent and LLL. For science!
"register" <name> # Register name <name> # Get address by name <address> # Get name by address "unregister" # Unregister the caller "kill" # Kill registry (creator only)