Skip to content
juannyGPublic

About

Engineering Web3 and Blockchain Apps

Resources

Contributing

Stars

0 stars

Watchers

2 watching

Forks

Repository files navigation

A web3 reddit

Final Deliverables

Final Project Report

Please review our final project report for a comprehensive overview of our team, available Spotlight features, how they work, the tokenomics of our project, and further features we would have liked to have implemented.

Try it out yourself

https://35.208.181.51/

NOTE: The certificate warning is expected. HTTPS was necessary for usage with our IPFS gateway. It is perfectly safe.

This is a GCP instance hosting the frontend NextJS UI and also our own Ethereum testnet through forge's anvil where the contract is deployed. We also deployed it on Polygon, but due to transaction times taking so much time, the user experience feels terrible.

Because we're using a local testnet, there's a faucet available and a "burner wallet." However, to access all of Spotlight's features you'll need to use a MetaMask wallet.

How to setup MetaMask with Spotlight

  • Install the MetaMask browser extension
  • Setup your MetaMask account if you don't already have one
  • Head on over to Spotlight
  • The burner wallet may automatically get connected. If so, go ahead and disconnect the wallet.
  • Open the MetaMask extension, click on the top left icon to Select a Network, and click on "Add a custom network"
  • Click on the dropown under the "Default RPC URL" field, and click "Add RPC URL"
  • Copy & paste https://35.208.181.51:9545 in the "RPC URL" field
  • Click "Add URL"
  • Under "Chain ID", type 31337
  • You should now see suggestions for the "Currency symbol" and "Network name" fields. You may use them.
  • Click "Save"
  • You may now go back to the Network selector in MetaMask and select "GoChain Testnet"

The following GIF shows what your experience should look like.

add-spotlight-to-metamask

Now, when you "Connect Wallet" in Spotlight, select MetaMask and you should now have access to all features Spotlight has to offer.

You can now import the RPT token into your wallet as well. Token address: 0x5FbDB2315678afecb367f032d93F642f64180aa3

Troubleshooting

31337 Chain ID is already in use

If you already have a network that uses 31337 for a chain ID, then you only need to add the Spotlight RPC URL by editing the network and clicking "Add RPC URL"

another-31337-chain

Local Setup

This DApp was built using the scaffold-eth2 framework. Base depency versions are as follows:

  • Node v18.19.1
  • Yarn v3.2.3
  • Git

Our local testnet tool of choice was foundry. Please follow the installation instructions.

After cloning the repo and taking care of the above dependencies, install the DApp's dependencies:

yarn install

To run Spotlight locally, you'll need to

  1. cp packages/foundry/.env.example packages/foundry/.env
  2. yarn chain - Bring up the local testnet. This accepts arguments for forge's anvil
  3. yarn deploy - Deploy the contract to the local testnet
  4. yarn start - Bring up the local NextJS development server

You may now open a web browser and navigate to http://localhost:3000 to interact with the DApp locally.

NOTE: port 3000 is the default port used by NextJS for serving content. If it is not available, it will increment the port number until it finds a free port. Please double check the output of yarn start.

Running Tests

To run Solidity contract unit tests:

$ yarn test

About

Engineering Web3 and Blockchain Apps

Resources

Contributing

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages