next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Add with-ethers-hardhat example

Open silentlight opened this issue 2 years ago • 8 comments

Examples

  • Add with-ethers-hardhat example

silentlight avatar Nov 23 '21 19:11 silentlight

With the current state of web3 I really think it would be detrimental to allow this kind of content in the Next.js repo.

awareness481 avatar Nov 24 '21 09:11 awareness481

Thank you for your feedback @awareness481. Can you elaborate a little bit more on saying "this kind of content"?

silentlight avatar Nov 24 '21 15:11 silentlight

@awareness481 Vercel seems to be looking into expanding support for crypto/Web3 https://vercel.com/docs/concepts/functions/edge-functions#crypto.

guillaumegaluz avatar Nov 24 '21 18:11 guillaumegaluz

@awareness481 could you expand on why?

@guillaumegaluz note that’s for the cryptography web APIs, which are related, but not exactly the same 😁

leerob avatar Nov 28 '21 02:11 leerob

@leerob Above framework can be used auto mine ETH blocks. As you certainly know that is disallowed from most hosts, including Vercel. With Next.js being primarily a web framework I certainly disagree with adding an example with behavior that is not allowed in most server hosts.

awareness481 avatar Dec 03 '21 14:12 awareness481

@silentlight could you clarify the intent of the example? @awareness481 looking at the code, it doesn't seem like it's set up for that, but I could be missing something.

leerob avatar Dec 03 '21 18:12 leerob

@silentlight could you clarify the intent of the example? @awareness481 looking at the code, it doesn't seem like it's set up for that, but I could be missing something.

Not the code above but the framework itself https://hardhat.org/hardhat-network/explanation/mining-modes.html#mining-modes

awareness481 avatar Dec 03 '21 18:12 awareness481

@silentlight The env file (.env.local.example) exposes user's private keys. One way to resolve this is to use Truffle Dashboard

@leerob Onboarding devs to web3 primitives is no easy task. This example will accelerate crypto adoption by web2 devs.

slavakurilyak avatar Apr 27 '22 16:04 slavakurilyak