scaffold-eth / scaffold-eth-2

Open source forkable Ethereum dev stack
https://scaffoldeth.io
MIT License
1.41k stars 887 forks source link

Optional chain parameter in Scaffold hooks #931

Open JacobHomanics opened 2 months ago

JacobHomanics commented 2 months ago

Description

Provides the option to pass a different network into the scaffold hooks than the one that the user's wallet is currently connected to. This allows for applications that can show data from different blockchains than that of which the user's wallet is connected to. The hooks still abide by the rules that the contract instance's need to be within the deployedContracts file and targetNetworks needs to have the expected chain(s) present.

live example: https://scaffold-eth-optional-chains-example-nextjs.vercel.app/ live example repo: https://github.com/Hotmanics/scaffold-eth-optionalChainsExample

Additional Information

Your ENS/address: jacobhomanics.eth