How to hardhat Lesson 10 #5140
-
It's been a long journey and now I've forgotten some basics. I am currently in lesson 10 doing the part where a button should enter you into raffle. Now it works in the goerli testnet, but I am unable to make it work in hardhat local testnet. It pops up an error about (await getEntranceFee()).toString() being undefined meaning it can't call it from the contract. Here are my repos: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
@Sosiaalinen Here; Make sure the const { runContractFunction: getEntranceFee } = useWeb3Contract({
abi: abi,
contractAddress: lotteryAddress,
functionName: "getEntranceFee",
params: {},
}) |
Beta Was this translation helpful? Give feedback.
@Sosiaalinen Here; Make sure the
lotteryAddress
is not undefined and same as for hardhat network you deployed. Also make sure the AbI contains thegetEntranceFee
function.