Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add middlware to redirect /[contractAddress] requests to mainnet by default #69

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

technophile-04
Copy link
Member

@technophile-04 technophile-04 commented Feb 28, 2024

Description

Didn't use next.config.js approach of redirecting instead used middleware approach since :

  1. The path params are attached direclty to base url eg: locahost:3000/[contractAddress] it would have been easy to match if it was localhost:3000/contract/[contractAddress]
  2. Also wanted to add address regex logic

Closes #67

Copy link

vercel bot commented Feb 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
abi-ninja-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2024 3:11pm

Copy link
Member

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice research and solution! Looks great to me 🙌

Copy link
Member

@portdeveloper portdeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work 👍 Bookmarking this PR to use in my own projects : D

@technophile-04
Copy link
Member Author

Tysm all !! Merging this 🙌

@technophile-04 technophile-04 merged commit 4d72834 into main Mar 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set default chain to mainnet when user pass no network parameter on URL
3 participants