0

I have a solidity function uri(uint256). The contract is deployed and I'm using ethers to call this contract function like so:

provider = new ethers.providers.Web3Provider(window.ethereum)
await provider.send("eth_requestAccounts", [])
signer = provider.getSigner()
factory = new ethers.ContractFactory(abi, bytecode, signer)
contract = factory.uri(0)

But I get the error:

factory.uri is not a function

How to fix this?

zendevil.eth
  • 303
  • 1
  • 3
  • 10

0 Answers0