This project is a demo of the Propel platform. This project is built with MetaMask Delegation Toolkit.
This project includes the following packages/apps:
@propel-demo/web: a Next.js app that contains the frontend of the project@propel-demo/contracts: a Hardhat project that contains the smart contracts used in the project
- Bun
- Node.js v20.x
- Docker Compose
The project is set up so you can run the game locally out of the box.
git clone https://github.com/MetaMask/propel-demo.git
cd propel-demogit submodule update --init --recursive- Create a file called
.npmrcin the root of the project and add the following:
@codefi:registry=https://nexus.eu-west-3.codefi.network/repository/npm-hosted/
//nexus.eu-west-3.codefi.network/repository/npm-hosted/:_authToken=<YOUR-NPM-TOKEN>
bun installcp .env.example .envNote
Make sure to update the .env file with your INFURA_API_KEY, since we need it to fork the Sepolia network locally.
Create an account and a project on UploadThing and get your APP_ID and TOKEN. Update the .env file with your credentials.
- Create an account and a project on Clerk and get your
PUBLISHABLE_KEYandSECRET_KEY. Update the.envfile with your credentials. - Go to
Configure/Sessionsand onCustomize session token, selectEditand add the following:
{
"email": "{{user.primary_email_address}}",
"imageUrl": "{{user.image_url}}",
"username": "{{user.full_name}}"
}
- Also, grab your clerk domain at
Configure/Domains, we're going to need it later.
Create an account and a project on Web3Auth and get your CLIENT_ID. Update the .env file with your credentials.
Also, on the Web3Auth dashboard, go to Custom Authentication and create a new verifier with the following:
- Name:
<Choose a name> - Login Provider:
Custom Provider - JWKS Endpoint:
https://<your-clerk-domain>/.well-known/jwks.json - JWT Verifier ID:
Email - JWT Validation:
"iss": https://<your-clerk-domain>
Finally, update the NEXT_PUBLIC_WEB3AUTH_VERIFIER variable with the name of the verifier you just created.
bun db:startbun db:migratebun chain:startTip
Otterscan (local block explorer) is available at http://localhost:5100
6. Deploy contracts and seed database (If you have any issues with the local chain, make sure that it's up and running)
bun seedbun db:studio
open https://local.drizzle.studiobun devopen http://localhost:3000