Skip to content

debuggingfuture/contact-us-dao

Repository files navigation


Overview

This services enable storing mailing list & contacts on filecoin where community can vote to decide who can contact them and the file is encrypted and only shared to operator (who is sending the message) after DAO approval.

A more complete background on motivation and architecture can be found here

This includes

  1. server which can be execute by creator / operator
  2. smart contracts for governance by voting

Smart contract is modified with reference to https://github.com/filecoin-project/fevm-data-dao-kit

Demo

Design on data structure

As lighthouse is a perpertual storage with cost charged upfront by size and file deletion is not possible, and data set could be incremental natually, e.g. new members, update of emails. We do a event sourcing approach, to be flexible about dataset and avoid duplications of data

There is immerjs and RFC-6902 for that so we wont reinvent the wheel

The node could compute the diff patches and store the related operaitons in different files which work as an append list, e.g.

contacts-1.json
contacts-2.json

(Pruning of such dataset is in theory possible, while not current focus)

Design on Membership

We do not assume every contact is by default a member of the DAO. The way Governance Token distributed is decoupled and totally subject to community's decisions. Contact manipulation is separated from the contract.

Governance on Operator

Could be

  • dedicated owner (whitelisted by wallet adderss),
    • (create isWhiteListed method at contract and apply in access control)
  • or holding over particular token threshold
    • (use balanceOf method in access control)

Reward

  • We could also reward operator for computation at the proposal

Codebase

  • originally generated via nextjs edge template

env-cmd yarn hardhat run scripts/propose.js


name: Using Crypto in Edge Middleware and Edge Functions slug: edge-functions-crypto description: Learn to utilize the crypto Web APIs at the edge. framework: Next.js useCase:


Crypto

In this example, you'll see how you can utilize the crypto Web APIs with Edge Middleware and Edge Functions.

Working example: crypto.vercel.sh

Includes:

  • crypto.randomUUID
  • crypto.getRandomValues
  • Encryption with crypto.subtle
  • Decryption with crypto.subtle

Demo

https://edge-functions-crypto.vercel.app

How to Use

You can choose from one of the following two methods to use this repository:

One-Click Deploy

Deploy the example using Vercel:

Deploy with Vercel

Clone and Deploy

Execute create-next-app with pnpm to bootstrap the example:

pnpm create next-app --example https://github.com/vercel/examples/tree/main/edge-middleware/crypto crypto

Next, run Next.js in development mode:

pnpm dev

Deploy it to the cloud with Vercel (Documentation).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published