Skip to content

autonomys/faucet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subspace Testnet Faucet

Workspace Setup

  • Faucet Smart Contract - The Faucet Smart Contract, tests, deployment scripts and other related files. (HardHat&Foundry)
  • Web App - The Web App, tests, request token with a GitHub&Discord Next-Auth integration. (React&Next.js)
  • Discord Bot - The Discord Bot, request token on Discord (Node.js&AWL Lambda)
  • Subgraph - The Subgraph, faucet smart contract events indexed on Alchemy&The Graph (Alchemy&The Graph)

Faucet Smart Contract

Move to the smart contract directory and install dependencies

cd smart_contract
npm install

Compile the smart contract

npx hardhat compile

Run tests

npx hardhat test

Deploy the smart contract

npx hardhat run scripts/deploy.js --network <networkName>

Web App

Live Working Web App

Netlify Status

Move to the web app directory and install dependencies

cd web-app
yarn

Run the web app

yarn dev

Discord Bot

Move to the discord bot directory and install dependencies

cd discord-bot
npm install

Register the Discord commands

npm run register

Deploy the Discord bot

npm run deploy

Subgraph

Deployed Subgraph

Move to the subgraph directory and install dependencies

cd subgraph
yarn global add @graphprotocol/graph-cli
yarn

Initialize the subgraph

graph init --studio faucet-goerli

Deploy the subgraph

graph auth --studio <studio-access-token>
cd faucet-goerli
graph codegen && graph build
graph deploy --studio faucet-goerli