wslyvh / proof-of-competence

Proof of Competence (PoC) is an open, modular framework to create on-chain quests and Web3 on-boarding journeys.
https://www.poc.quest/
MIT License
72 stars 19 forks source link

infura project id & alchemy key #4

Closed fjun99 closed 2 years ago

fjun99 commented 2 years ago

Not issues, perhaps just two suggestions.

1) web/src/utils/web3.ts

rpc: { 
    1: 'https://mainnet.infura.io/v3/d75dedf8365a48e1bbb78a7fa8b83faa',
    3: 'https://ropsten.infura.io/v3/d75dedf8365a48e1bbb78a7fa8b83faa',
    4: 'https://rinkeby.infura.io/v3/d75dedf8365a48e1bbb78a7fa8b83faa',
    5: 'https://goerli.infura.io/v3/d75dedf8365a48e1bbb78a7fa8b83faa',
    42: 'https://kovan.infura.io/v3/d75dedf8365a48e1bbb78a7fa8b83faa',
} 

Suggestion:

Change the infura id in this file and let users of this repo use their own.

2) web/src/verifiers/has-nft/index.ts

This file uses alchemy NFT API, and this api needs to be applied manually before an account can use it. Perhaps we can add a note about it to Readme.md

https://eth-mainnet.g.alchemy.com/${process.env.NEXT_PUBLIC_ALCHEMY_API_KEY}/v1/getNFTs/

This is a great framework for on-boarding web3, thank you very much.

wslyvh commented 2 years ago

This isn't really a good practice indeed. Thanks for addressing this! I'll try to fix this with next release/updates

wslyvh commented 2 years ago

Updated!

Please the following env variables from now on.

NEXT_PUBLIC_ALCHEMY_API_KEY=''
NEXT_PUBLIC_INFURA_API_KEY=''
NEXT_PUBLIC_ETHERSCAN_API_KEY=''