lesson 10: MetaMask - RPC Error: "message":"Nonce too high. Expected nonce to be 4 but got 12 #2713
-
i am getting this error when i am passing my enterRaffle button import {useWeb3Contract} from "react-moralis" function LotteryEntrance(){ const dispatch = useNotification() const{runContractFunction: enterRaffle} = useWeb3Contract({ const{runContractFunction: getEntranceFee} = useWeb3Contract({ const{runContractFunction: getNumber0fPlayers} = useWeb3Contract({ const{runContractFunction: getRecentWinner} = useWeb3Contract({ useEffect(() => { const handleSuccess = async function(transaction){ return(
hello
)
}
{raffleAddress ? ( <button onClick = {async function(){await enterRaffle({ onSuccess: handleSuccess, onError: (error) => console.log(error), }) }}>Enter Raffle Entrance Fee: {ethers.utils.formatUnits(entranceFee, "ether")} ETH Players: {numPLayer} Winner: {recentWinner} no raffle address detected )}
export default LotteryEntrance; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @DANIA001 checkout this discussion with a similar issue and tell me if solves your issue |
Beta Was this translation helpful? Give feedback.
Hey @DANIA001 checkout this discussion with a similar issue and tell me if solves your issue