Skip to content

masapasa/alfazero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alfazero

Governance in a decentralized world plays a big role in defining the roadmaps as well as the direction of the protocol. Big whales with big voting power can incluence the future of the protocol which might not be favorable for small token holder. We combine the power of NFT to voting by giving small stakeholder voters weighted advantage. Small token holders who vote consistently in the winning proposal will be able to unlock new categories of NFTs giving them more voting power. This will give small token holders a chance to compete with big whales in the governance process. ✅

Demo

We're live on alfazero.vercel.app! 🎉

Usage

Frontend

  1. Run cd app to change to the frontend subdirectory. The following commands must be run from there.
  2. Go to https://generate-secret.vercel.app/32 and copy the secret.
  3. Create .env.local (in app!) with the following contents:
GITHUB_ID=XXXXXXXXXX
GITHUB_SECRET=XXXXXXXXXX
TWITTER_CLIENT_ID=XXXXXXXXXX
TWITTER_CLIENT_SECRET=XXXXXXXXXX
SECRET=XXXXXXXXXX
NEXTAUTH_URL=http://localhost:3000 # Change the URL on production!

(Replace each XXXXXXXXXX with a valid value.)

  1. Run npm install to install the dependencies.
  2. Run npm run dev to start the application locally.
  3. Go to http://localhost:3000/ to see the app.

P.S. You can deploy the app to Vercel for free by following the instructions here. (Remember to set the environment variables.)

Backend

  1. Install Rust.
  2. Install Solana.
  3. Install Anchor.
  4. cd program to change to the program subdirectory. All the following commands must be run from there!
  5. npm ci && npm ci -D to install the exact versions of the dependencies.
  6. solana-keygen new --force --outfile wallet.json --no-bip39-passphrase
  7. anchor build
  8. solana airdrop 2 wallet.json (repeat at least 3 times)
  9. anchor deploy
  10. Replace the old program ID (3mAW7AVHr7TRvYkmeXKdTsDCYjdnJ2t4TpFeXPb57BRu) in Anchor.toml and lib.rs.
  11. anchor test
  12. node printPrivKey.js
  13. Import the private key in Phantom and switch to Devnet. The NFT should be there.

Credits

About

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors