Closed abdulmanan7 closed 1 year ago
I have configured the wallet, using vuejs now I want to do web3.js for methods calls, etc. How to integrate with the current wallet? or is the library already preloaded with web3.js. I want to know I appreciate any help you can provide.
I have few simple call to make e.g
creditContract.methods.runPlay(account.address)call();
creditContract.methods.burn(account.address,1)call();
creditContract.methods.balanceOf(account.address)call();
I am using polygon georli testnet
The package depends on wagmi and viem. viem's an alternative to ethers.js and web3.js. wagmi's just a wrapper over viem.
Check this https://github.com/kolirt/vue-web3-auth#writecontract
I have configured the wallet, using vuejs now I want to do web3.js for methods calls, etc. How to integrate with the current wallet? or is the library already preloaded with web3.js. I want to know I appreciate any help you can provide.
I have few simple call to make e.g
creditContract.methods.runPlay(account.address)call();
creditContract.methods.burn(account.address,1)call();
creditContract.methods.balanceOf(account.address)call();
I am using polygon georli testnet
import {erc20ABI, writeContract} from '@kolirt/vue-web3-auth'
await writeContract({
abi: creditContractABI,
address: creditContractAddress,
functionName: 'runPlay',
args: [account.address]
})
.then(async (data) => {
console.log('hash', data.hash)
await data.wait()
console.log('transaction successfully')
})
I have configured the wallet, using vuejs now I want to do web3.js for methods calls, etc. How to integrate with the current wallet? or is the library already preloaded with web3.js. I want to know I appreciate any help you can provide.
I have few simple call to make e.g
creditContract.methods.runPlay(account.address)call();
creditContract.methods.burn(account.address,1)call();
creditContract.methods.balanceOf(account.address)call();
I am using polygon georli testnet