1

I'm trying to fetch campaign data and display it to the user. I'm using Nextjs in the front-end and solidity & hardhat in the back-end. The contract data seems to be fetched but when being displayed there is a continuous blick and the loader loads continuously.

Error
Access to fetch at 'https://rpc.sepolia.org/' from origin 'http://localhost:3000' has been blocked by CORS policy

I have tried installing the Access-Control-Allow-Origin extension on Brave, but it doesn't work. I have also tried installing Nextjs Cors but can't seem to hack it.

See site behavior How Can I solve this?

2
  • The site behavior part was due to the wrong implementation of the useEffect hook. So that's solved. The cor error isn't solved yet.
    – Kihiu
    Commented Nov 30, 2023 at 18:45
  • Did you solve this? Commented Mar 16 at 18:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.