-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
contract call failed TypeError: Cannot read properties of undefined (reading 'call') at Object.mutationFn (useTransactions-a28ed134.browser.esm.js:2926:21) at Object.fn (mutation.ts:179:31) at run (retryer.ts:147:31) at createRetryer (retryer.ts:204:5) at executeMutation (mutation.ts:174:22) at Mutation.execute (mutation.ts:216:26) at async publishCampaign (index.jsx:18:20) at async CreateCampaign.jsx:33:9 #63
Comments
Post your code! |
import React, { useContext, createContext } from 'react'; import { useAddress, useContract, useMetamask, useContractWrite } from '@thirdweb-dev/react'; const StateContext = createContext(); export const StateContextProvider = ({ children }) => { const address = useAddress(); const publishCampaign = async (form) => {
} const getCampaigns = async () => {
} const getUserCampaigns = async () => {
} const donate = async (pId, amount) => {
} const getDonations = async (pId) => {
} return ( export const useStateContext = () => useContext(StateContext); |
const data = await createCampaign( |
// update your code with this. For me it's working |
Still its showing same error |
Yes @gyan-sy I am facing the same problem in this. I have tried Changing to Sepolia But this is the exact error irritating me. |
@aadarsh-nagrath have you got any solution? |
Yeah, I did solved all errors and shifted it to Polygon Client and web3 directory will be useful to you; there is doc ... but I guess you already know how to setup a project. |
@aadarsh-nagrath Isn't there any other way of resolving this error. Is it necessary to shift to the polygon. Can't this error be resolved with Goerli |
It can be; mine works for all networks. Error needs to be solved. The network can be any regardless. |
@aadarsh-nagrath Can you tell me what how you have resolved the error. Following is my index.jsx code. import React, { useContext, createContext } from 'react'; import { useAddress, useContract, useMetamask, useContractWrite } from '@thirdweb-dev/react'; const StateContext = createContext(); export const StateContextProvider = ({ children }) => {
} export const useStateContext = () => useContext(StateContext); Following is my CreatCampaign code import React, { useState } from 'react' import { useStateContext } from '../context'; const CreateCampaign = () => {
} export default CreateCampaign I checked your code as well but didnot find any thing that is nto mentioned in my code. To me yours an d mine code looks to be same. Please help me out with this. |
No description provided.
The text was updated successfully, but these errors were encountered: