Is it possible to connect to an existing contract (without deploying)? #895
-
Hi, I'm familiar with hardhat & smart contracts, less familiar with frontend, apologies for the noob question. I read I can configure the chain in the I have a contract I deployed already on a testnet, I copied already the contract in My goal was to generate a basic frontend using scaffold-eth-2. If I understood well how it works, it generates (scaffolds) automatically all calls to the contract to read all existing public variables, and creates the write methods, just like etherscan does for verified contracts? This would be perfect for me... I just need to know where to specify the address of my existing contract on testnet, and connect to it. Should be easy, just didn't find a "recipe" for it, as I guess the normal workflow would be to deploy using the internal system and not do as I'm doing, to copy over a contract from another repo, and connect to an existing deployment on a testnet (or mainnet) but it would be very handy. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @cryptotester I think you want to use let me know if it works! |
Beta Was this translation helpful? Give feedback.
Hey @cryptotester
I think you want to use
externalContracts
. Read more about it here: https://docs.scaffoldeth.io/hooks/let me know if it works!