Skip to content

Commit

Permalink
docs: README.md Added and INFO.md hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhruv-2003 committed Mar 5, 2023
1 parent 676f35c commit fa13593
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 43 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
dist

package-lock.json
package-lock.json
info.md
49 changes: 7 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,10 @@
## Plan to implement Token - gating Bot / SDK or Component
## Token - Gating - SDK

- The bot must be able to verify the ownership of a user's tokens or NFTs.
- The bot must be able to grant or restrict access to a webpage based on the ownership verification.
- The bot must be easy to install and set up for website owners.
- The bot should be built for Ethereum or Polygon.
- The bot should be able to integrate with different types of wallets.
- The bot should have an interface for website owners to configure and set up.
- Make sure to use the Alchemy NFT API and Token API
- Write thorough documentation on how you built this.
Built in ESM module , For Webapplications to add token-gating with NFTs and TOKENs on-Chain on 4 Major Networks

- We'll go with SDK approach and create a UI element for the admin:
- ETHEREUM
- POLYGON
- OPTIMISM
- ARBITRUM ONE

## FINAL APPROACH

- React Component can be created which can be used in React and Next Application

- We can Wrap the component to the whole app , which check the current url and restricts the entry

- The Selection of URL would be done via a public - private route constants

- To implement the kind of check , we need to create a methods , like NFT or TOKEN addresses and the conditions for gating the access

Or Create a full scale data base , to check the URL and assign the conditions

- The wallet connection will be handeled by Rainbow wallet with multiple options , with ETH and Polygon as the networks

## LAYDOWN

- The best way is creating a database that can be called with to check the access , simply supplying the URL and the user Address and handling it all on the backend side
- Interface for controlling the websites pages for admin
- Wrapper to just simply check the access of the page , and allow to go ahead if authorised to be
- For page navigation, we need to find a good solution , maybe window.href or React Router

## LINKS

https://www.w3schools.com/howto/howto_js_get_url.asp

## Questions

- I got into them , because implementing the code as a developer is very easy to do , but doing the same for others to integrate comes up with a lot of other things.
- What type of webpage it should support ?? Are Next and React Just Fine , these are actually some router issues ?
- There will be some extra steps involved for the Client to integrate the same into the website , is that okay , for best wallet integrations and support the perfect chains ? I am thinking of using Rainbowkit , wagmi here
- Is it okay if we implement a config file method , where user would create a config file along with the steps involved in the docs ?? There will be not interface here , just the component and the docs to configure the same , this approach would not take much time to implement
- If we want to go the other way , where we build something that is applicable for all types of application , it is quite hard to implement and check every case , the comp might break in that case , moreover there will be time lag , in this thing to check and implement
It Supports all the major wallet by default , Like Metamask , Ledger, Wallet Connect , etc.

0 comments on commit fa13593

Please sign in to comment.