NameService contract guide
Construct a Contract object
import { ethers, providers } from 'ethers'
const getContractInstance = () => {
// Contract address
const contractAddress = '0x0D195ab46a9C9C4f97666A76AADb35d93965Cac8'
const provider = new providers.Web3Provider(window.ethereum)
const signer = provider.getSigner()
const contract = new ethers.Contract(contractAddress, abi, signer)
return contract
}How to call the contract
Last updated