Home

Awesome

Starkbot

Assign discord roles based on owned NFTs ✨

Check out the demo video:

<a href="https://youtu.be/t6fzjxRs_TA" target="_blank"> <img src="http://img.youtube.com/vi/t6fzjxRs_TA/hqdefault.jpg" alt="Watch the starkbot demo video" width="375" height="240" border="10" /> </a>

Bot Setup

Using our infra

If you want to try it out on your server, follow those steps:

  1. Create a Starknet ID and verify your discord user id.
  2. Mint a BRIQ NFT with the same wallet
  3. Invite starkbot on your Discord server
  4. Assign it a role and put this role at the top of your role list (so it can manage the below roles).
    Give it a role that has the enough permissions!
  5. Create your own rules by typing /starkbot-add-rule in #general
/starkbot-add-rule

Deploy it yourself

Fill your environment variables

You need to create a .env file with your informations and credentials:

ENV=dev

DISCORD_CLIENT_ID_DEV=
DISCORD_BOT_TOKEN_DEV=

STARKNET_ID_CONTRACT_ADDRESS=0x0798e884450c19e072d6620fefdbeb7387d0453d3fd51d95f5ace1f17633d88b
STARKNET_ID_INDEXER_URL=https://goerli.indexer.starknet.id/field_data_to_id
VERIFIER_DECIMAL_CONTRACT_ADDRESS=2858829565965467824506234522366406559425492229537050207406969294731822669741
DISCORD_TYPE=28263441981469284

AWS_PROFILE=
AWS_NAME=
AWS_ECR=
AWS_DB_PROFILE=
AWS_REGION=

DYNAMODB_TABLE_GUILD_DEV=
DYNAMODB_TABLE_STARKNET_ID_DEV=

JWT_KEY=
RST_KEY=
API_URL="http://localhost:3000/api"

Run the bot locally

Deploy the bot on your EKS cluster

Roadmap

Features

Infra

Starkbot website

You need to create two different secrets stored in environment variables for the website : JWT_KEY and RST_KEY. You have to include them in the global .env file

You can use the following command to generate random secrets:

openssl rand -hex 32 

Run the website from the root with

pnpm web:launch

You can then reach the website at http://localhost:3000

Contribution guide

Dev Setup

  1. Install docker (check out colima if you're on Mac)
  2. Install pnpm
  3. Install dependencies with pnpm install
  4. Use node 18 with nvm install 18 && nvm use default 18
  5. Setup your environment variables as mentionned above

If you are an Onlydust contributor, don't deploy the infra on your personnal account. Simply ask the project lead to generate you some access tokens.

Getting Started

pnpm dev
pnpm nx start website