How i call smart contract methods and views using my react.js app. im trying with this :
const getUserInfo = async()=>{
const contract = await tezos.contract.at(contractAddress)
await contract.methods.start_contributing().send()
}
but i dont have a signer and provider here i define other variables:
const endpoint = useEndpoint()
const contractAddress = props.contract
const tezos = new TezosToolkit(endpoint)
Thanks, but i guess i need to provide more info. i used beacon wallet for this :
beacon : new BeaconWallet({ name : name, preferredNetwork : network}),
const wallet = beacon
i also set a provider:
wallet.requestPermissions({ network: { type: network } })
const provider = wallet && await tezos.setWalletProvider(wallet)
how to i call a method with beacon with provider. i want to call start_contributing() method in this contract :https://better-call.dev/ghostnet/KT1Edr28YEyZCq3N9d4Gq14eJFNbWHdQa5cg/interact/start_contributing
new edit -------------------------------------
i just tried to use setSignerProvider(wallet)
an i get this :
Argument of type 'BeaconWallet' is not assignable to parameter of type 'Signer'.
Type 'BeaconWallet' is missing the following properties from type 'Signer': sign, publicKey, publicKeyHash, secretKey