Skip to main content

New answers tagged

0 votes

Error: Timeout of 900000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves

You need to call resolve() after fulfillRandomWords in your test so as to resolve the awaiting promise, like: await vrfCoordinatorV2Mock.fulfillRandomWords([1].args.requestId, ...
SYED ASAD KAZMI's user avatar
0 votes

disconnect wallet from metamask using ethers js

Yes, there is a way to disconnect some wallets. Uniswap now truly disconnects MetaMask. Their web3-react library doesn't, their widgets don't, but on their site the 'disconnect' ...
Anton Mushnin's user avatar
0 votes

TypeError: unsupported addressable value (argument="target", value=null, code=INVALID_ARGUMENT, version=6.13.1)

As, RealEstate is a contract that you’re deploying, so you should get its address using await realEstate.getAddress() instead of realEstate.address, like: escrow = await Escrow.deploy( lender....
SYED ASAD KAZMI's user avatar
0 votes

TypeError: no matching function (argument="key", value="provider", code=INVALID_ARGUMENT, version=6.6.2)

Try using const accounts = await ethers.getSigners() deployer = accounts[0] other then deployer = (await getNamedAccounts()).deployer As in higher version of ether js it might not work properly
Jimit's user avatar
  • 7
0 votes

TypeError: chai.deployed is not a function

You should use waitForDeployment() instead of deployed(), because deployed() is replaced with waitForDeployment() in the newer versions of Hardhat. Also, you need to replace chai.address with await ...
SYED ASAD KAZMI's user avatar
0 votes

Layer2: Revert Execution Error when Calling exactInputSingle in Uniswap V3

if you are on Base mainnet im assuming you are using swapRouter02 with is just inherits from a lot of different routers. The problem is that swapRouter02 struct params is different from the swapRouter....
yahdielo's user avatar
0 votes

In which language should i write my deployment code Javascript or Solidity

I can share what I use and others can give their opinion. I code both with (Python) and use Web3.js for tests. I use Truffle for testing (Javascript) and compiling Solidity, and Ganache as my ...
blockchainmassacre's user avatar
0 votes

Calling function on solidity contract fom JS

The issue looks in this line const endpoint =${infuraProjectId}; The infura URL you have selected is of ethereum mainnet. If you are testing on any testnets like ...
Pankaj Jagtap's user avatar
0 votes

Property 'revertedWith' does not exist on type 'Assertion'

I had a similar issue and apparently my test file name did not conform to the convention for tests in the 'include' section of my tsconfig.json It should typically look like this: "include": ...
Ayooluwa Akindeko's user avatar
0 votes

Hardhat deploy TypeError: ethers.getContract is not a function

deployer = (await getNamedAccounts()).deployer; fundMe = await deployments.get("FundMe"); mockV3Aggregator = await deployments.get("MockV3Aggregator"); await ethers....
seun's user avatar
  • 1
0 votes

Error HH19: Your project is an ESM project (I already tried to changed chai from ^5.0.0 to ^4.3.7 but still failed)

try to rename hardhat.config.js to hardhat.config.cjs
Umesh Ola's user avatar
1 vote

Unable to transfer ether from contract

I think that campaign.methods.finalizeRequest(0).call( should be campaign.methods.finalizeRequest(0).send( instead. Basically at the end you're making a call instead of a transaction.
0xSanson's user avatar
  • 3,539

Top 50 recent answers are included