Skip to content

Instantly share code, notes, and snippets.

@learner-long-life
Created March 26, 2019 18:44
Show Gist options
  • Save learner-long-life/639028c4461a3c7180c69e0b015c7a1b to your computer and use it in GitHub Desktop.
Save learner-long-life/639028c4461a3c7180c69e0b015c7a1b to your computer and use it in GitHub Desktop.
Design doc for Invisible Library, an archaeological site to disburse tools and artifacts from the NYC Arcology out into the world

Invisible Library Design Doc

The NYC Arcology is closing, and we need to find a good home for all of our tools, books, furnitures, artifacts. We prefer to match artifacts with the person who is called to do something arcological with them. Sometimes paying money makes sense, but often the passing on of a physical object is a way of staying connected, and encouraging more communal living in the future.

High-level goals

• A virtual moveout party / archaeological site; one website where people can see pictures and descriptions of what’s available • in-browser public chat with pseudonyms, not requiring a sign-in (stores credentials in localStorage) • in-browser private chat with other users, including me

Artifact

For each artifact • have a status of available or taken • details of disassembly and moving • see how many others have clicked on it for more details • (stretch) the earliest time that someone is coming over to pick something up. • arrange a time to come pick it up (hour and day)

Views

The initial view should be past photos of the house.

The main view should be a grid of photo cards of all available items with

  • a short description so the page is searchable.
  • the earliest that someone is able to come take a look at it
  • number of people who have clicked on it to popup more details

Stretch Goal

There is another view of taken items, where you can choose to receive future messages for that item. This will let the artifact take on a second life connecting people in the future.

Architecture

We'll use the Ethereum rinkeby testnet as the data backend, Whisper as a distributed in-browser messenger for the public and private chats, and BrowserFS / localStorage for storing localstate.

Each user will have a new Ethereum account created automatically for them and stored in localStorage, which will receive a small amount of rinkeby ether before every transaction.

Library Contract

Solidity contracts for the main objects in this page.

  • address public of owner who is allowed to post new artifacts
  • mapping(uint256 => artifact)
  • uint256 public nextId

Struct of an Artifact

  • uint256 id, uniquely incrementing and global
  • string photo URL (usually google drive)
  • string short description
  • string url of long description
  • uint8 status (0 available, 1 claimed, 2 taken)
  • rinkeby block number of claim time, before we expire and move back to 0

Methods

  • constructor(owner)
  • postArtifact(string photoURL, string shortDesc, string longDescURL)
  • claimArtifact(uint256 id, uint256 claimBlockNumber)
  • takeArtifact(uint256 id, address taker)

Stretch Goal

EVM Event for publishing a new artifact, and a new artifact getting taken.

@ONLIMAKE
Copy link

Hello friends to deposit constantinople in exchanges is there a special tutorial or can it be done directly from Metamask?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment