Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Hardhat: "The contract 0x...has already been verified", but is not my contract code

I changed contract name of pancakeswap v3 factory contract like this. PancakeV3Facory -> MyV3Factory I deployed it successfully and tried it to verify using hardhat verify plugin. But it says "...
Marco Wong's user avatar
1 vote
0 answers
24 views

Deploy the same contract multiple times with different constructor arguments in Hardhat using Ignition

I am trying to deploy the same smart contract multiple times using Hardhat's Ignition plugin, but with different constructor arguments. It seems like Ignition performs a reconciliation check and ...
K Gunjan's user avatar
0 votes
1 answer
59 views

unable to swap tokens on arbitrum sepolia using uniswap

I'm attempting to perform a token swap (WETH to MOR) on the Arbitrum Sepolia testnet using the Uniswap V3 API. The swap process consistently fails with the following error message: missing revert data ...
joeyzengazi's user avatar
-1 votes
0 answers
28 views

Issues trying to deploy a contract using Hardhat Ignition

$ npx hardhat ignition deploy ./ignition/modules/Token.js --network sepolia An unexpected error occurred: AggregateError: at internalConnectMultiple (node:net:1118:18) at ...
Arish Ahmed's user avatar
0 votes
0 answers
15 views

Error HH604: Error running JSON-RPC server: The specified module could not be found

I want to learn how to use hardhat. When use "npx hardhat node", it always report error.I am searching for a long time on net. But no use. Please help or try to give some ideas how to ...
otis w's user avatar
  • 1
0 votes
0 answers
16 views

I can't store an image CID on a smart contract using IPFS desktop

I have a smart contract regarding collecting data of bridges. the smart contract is created using hardhat and I'm trying to include images using IPFS the contract deployment has been done successfully,...
MAbdelkader's user avatar
0 votes
0 answers
13 views

I borrowed USDC which is my token1 But I'm receiving the loan in my WETH which is my token0, how do I solve this

I have done everything from beginning and it seems to work pretty well, untill I get to the part where I receive the loan. I received the loan successfully but the problem is that I borrowed USDC ...
Max Millian's user avatar
1 vote
1 answer
29 views

Issue with hardhat test

I am learning solidity and here I encountered some test error. I was running script test using hardhat npx hardhat test. This error was produced error Error [ERR_REQUIRE_ESM]: require() of ES Module C:...
Emma Tungsten's user avatar
0 votes
0 answers
42 views

How to setup hardhat ignition deploy script correctly

Here is my deploy script: import hre from "hardhat"; import PassNFTModule from "../ignition/modules/PassNFT"; async function deploy() { const { passNFTContract } = await hre....
BoikoVD's user avatar
0 votes
0 answers
28 views

Proxy contract : Errore "could not decode result data" durante l'interazione con il contratto tramite proxy in Hardhat

I'm trying to implement and test a proxy pattern for my smart contracts using Hardhat and Ethers.js. However, I'm encountering an issue when I attempt to call the functions of the implementation ...
hello B's user avatar
  • 943
0 votes
0 answers
35 views

Issue with Custom Chain Configuration in Hardhat: Network Not Appearing

I'm trying to add the LineaSepolia network as a custom chain in my Hardhat project. I've configured it in my hardhat.config.js as follows: { network: "lineaSepolia", chainId: 59141, ...
Nerses Asaturyan's user avatar
0 votes
0 answers
17 views

When trying to implement a uniswapv3 example contract, I am not able to compile it

// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; pragma abicoder v2; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol'; import '@uniswap/v3-core/contracts/...
Boss Fappy200's user avatar
0 votes
1 answer
26 views

Why error appears while sending transaction from multiple account?

I am trying to run test of the contract that requires to enter ETH using hardhat and mocha. Test fails in "Allows player to enter" even though everything looks the same for "Allows ...
BurniEye's user avatar
0 votes
1 answer
27 views

Forking Pancakeswap V2 to BSC

hardhat.config require('@nomiclabs/hardhat-ethers'); require('dotenv').config(); const { BSC_API_URL, MNEMONIC } = process.env; module.exports = { solidity: "0.5.16", networks: { ...
Lucky Rajput's user avatar
0 votes
1 answer
75 views

Facing error when verify using Hardhat ignition

Someone can you help me, I deployed smart contract on Sepolia_Eth, and I want to verifying using hardhat-ignition. npx hardhat ignition verify chain-11155111 But I get the error. Error in plugin @...
Adi Miuprix's user avatar
0 votes
1 answer
39 views

Error in the integration between Hardhat and react.js

This error keeps showing up when I try to use react.js to input data in the smart contract using hardhat ERROR in ./src/BridgeData.js 69:23-52 export 'ethers'.'providers' (imported as 'ethers') was ...
MAbdelkader's user avatar
0 votes
1 answer
125 views

Error: contract runner does not support calling (operation="call", code=UNSUPPORTED_OPERATION, version=6.13.1)

I am trying to interact with an ERC20 standard token contract which is implemented with Openzeppelin smart contract. Now I am trying to call allowance method with 0x address in the deployed contract ...
Narendra Reddy's user avatar
0 votes
0 answers
19 views

ERC-20 Token appears on Sepolia network but not on Polygon network

I have attempted to create an ERC-20 token, and deployed the contract on both Sepolia and Polygon, it appeared successfully as a token on Sepolia network but not on Polygon. etherscan polygonscan ...
Ahmed B's user avatar
  • 33
0 votes
0 answers
36 views

hardhat ignition with script working with testnet but failed with localhost node network

when i run with testnet i get this (https://i.sstatic.net/7ozQi2Se.png) but when i run with localhost node i get this (https://i.sstatic.net/vkpQq4o7.png) and this is my node console when i using ...
Refaldy Bagas Anggana's user avatar
0 votes
0 answers
21 views

How to implement UUPS with a solidity contract having VRF and automation features?

I am developping a solidity contract with those inheritances: ERC20 ERC20FlashMint VRFConsumerBaseV2Plus AutomationCompatibleInterface pragma solidity ^0.8.24; import "@chainlink/contracts/...
user2441352's user avatar
0 votes
1 answer
38 views

TypeError ".deploy()" is not a function npx hardhat test

I'm new to hardhat and solidity. I'm trying to basic example that I found online, however I always get this error at testing. Here is my hardhat.config.js settings require("@nomicfoundation/...
MAbdelkader's user avatar
0 votes
0 answers
30 views

Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)

I'm following the instructions for code 1 dapp evoting on YouTube. When I follow the instructions up to 2:34:00, I replace the getPolls() function in the index and I get this error:error. You can ...
user25659572's user avatar
0 votes
1 answer
233 views

Received invalid block tag 4. Latest block number is 0

I am new to hardhat. I ran into this issue and don't know how to handle it. I install node.js on my Windows, node version 17.9.1 and install npx. And then use npx hardhat create-react-app AppName Then ...
superhappy's user avatar
1 vote
0 answers
33 views

revertWith("Not Enough Tokens") Invalid Chai property: revertedWith

it("Should fail if sender does not have enough tokens" , async function(){ const initialOwnerBalance = await hardhatToken.balanceOf(owner.address); // initially - 0 tokens addr1 ...
Brijesh Singh's user avatar
0 votes
0 answers
81 views

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

I am trying to complete SpeedRunEthereum's second challenge 'TokenVendor' and I get this error when I firstly modified YourToken.sol, Vendor.sol, packages/hardhat/deploy/01_deploy_vendor.ts and ...
Nursima Taşdemir's user avatar
0 votes
0 answers
30 views

Why I cannot verify smart contract using Hardhat 2.22.5?

I tried to deploy my own token and verify smart contract on sepolia test net. However, deploy was quite successful. But I encountered a problem. Verify smart contract is really tricky for me. I copied ...
LegendaryDev320's user avatar
0 votes
0 answers
41 views

Ethereum Smart Contract Testing with Hardhat, ethers.js, Mocha -- Bug: "ReferenceError: window is not defined"

I'm following this (https://hardhat.org/tutorial/testing-contracts) tutorial on smart contract testing. Here is the test I've written: const { expect } = require("chai"); const { ethers } = ...
user25497731's user avatar
0 votes
0 answers
66 views

'TransferHelper: TRANSFER_FROM_FAILED' error on swapExactTokensForTokensSupportingFeeOnTransferTokens Uniswap router 02

I am building a contract to automatically swap a token with fee on transfer (I am using as a test this token t: 0x576e2BeD8F7b46D34016198911Cdf9886f78bea7) via UniswapRouter02 ...
MisterBob's user avatar
0 votes
0 answers
37 views

having issues when I am trying to run this command in my terminal "npx hardhat run scripts/deploy.js --network localhost"

this is the error I received Error HH601: Script scripts/deploy.js doesn't exist. I am a total beginner and have tried many different options and none have worked I was opening a hardhat node and ...
Tom Daniels's user avatar
0 votes
0 answers
41 views

solidity - Error: execution reverted: "ERC721: invalid token ID"

Error: execution reverted: "ERC721: invalid token ID" when I trying fetchMarketItem after I used cancelSale Error: execution reverted: "ERC721: invalid token ID" (action="call&...
Ninh Tran's user avatar
0 votes
0 answers
68 views

Trying to interact with smartContract(deployed on hardhat) using ethers

Error fetching rocket status: Error: could not decode result data (value="0x", info={ "method": "status", "signature": "status()" }, code=BAD_DATA, ...
Sahil Kumar's user avatar
-1 votes
1 answer
38 views

Issues with Ethers Utiility fuction

I built a smart contract and I am trying to test it. It successfully deploys but not all function works(event emmitter trigger problems) , for example the issueCertificate fuction. I had to write a ...
 Melody's user avatar
0 votes
0 answers
23 views

Contract Transaction Fails

I am kinda a novice in blockchain developement, I am working on a blockchain powered academic certificate issuance project Now I have built my smart contract and have it deployed on the sepolia ...
 Melody's user avatar
0 votes
2 answers
145 views

UniswapV3 deployment issue, <UnrecognizedContract>.<unknown>

I am trying to deploy uniswapV3 contracts locally and testing adding liquidity/swapping. I am using V3's 0.8 version (solidity compiler 0.8.15) with hardhat 2.14.0. When I deployed the contracts and ...
Adam d3t's user avatar
0 votes
2 answers
355 views

Error while trying to mint new Uniswap V3 position

I've been trying to mint new position with Hardhat and a fork of Arbitrum Mainnet but when NonfungiblePositionManager.mint() is called, the transaction is reverted with: Error: Transaction reverted ...
Nailu's user avatar
  • 1
0 votes
1 answer
37 views

yarn add --dev @chainlink/contracts showing error :Permission denied Publickey

**While running yarn add --dev @chainlink/contracts it shows error : Permissions denied: Public Key Error: Exit code: 128 Command: git Arguments: ls-remote --tags --heads ssh://[email protected]/ricmoo/...
vatsal sharma's user avatar
0 votes
1 answer
79 views

ERC20 Upgradable Contract Deployment Timeout Issue on Local Hardhat Instance Inside Docker Desktop

The bellow shows sample code for the Smart Contract Code SPDX-License-Identifier: MIT pragma solidity >=0.8.9; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol&...
Kasun Abaywardana's user avatar
0 votes
0 answers
79 views

Is it possible to specify address for deployed contract in Hardhat tests?

const { ethers } = require('hardhat'); describe('One to one Swap', function () { it('Should be able to swap tokens', async function () { const address = "..."; const Token0 = ...
Gervasius Twinklewinkleson's user avatar
0 votes
0 answers
45 views

`Error: invalid address` when I try to deploy script

I am having this issue, bilgekaangencdogan@bilgekaangencdogan:~/Desktop/FreeCodeCampBlockchain/hardhat-smartcontract-lottery-fcc$ yarn hardhat deploy yarn run v1.22.22 warning package.json: No license ...
Bilge Kaan Gençdoğan's user avatar
1 vote
2 answers
335 views

Facing error deploying Smart Contract on sepolia testnet using Hardhat

While deploying the contract using hardhat ignition I am facing this strange error. I am deploying on sepolia testNet. This is my Voting Smart Contract: // SPDX-License-Identifier: MIT pragma solidity ...
Atharva Dankhade's user avatar
0 votes
1 answer
67 views

How can I make the tx.origin not equal to the msg.sender? Ethers Signers

I'm trying to complete this challenge: alchemy challenge My script to deploy the contract and to call attempt function with different addr: My script const hre = require("hardhat"); require(&...
0xDev's user avatar
  • 1
0 votes
0 answers
56 views

How to add random wallet to the hardhat network during test on-the-fly?

By default hardhat provides 20 signer accounts for testing. Is it possible to create random wallet on-the-fly and then connect it to hardhat network for testing? So far, I try this code. const ...
Kaito's user avatar
  • 1
0 votes
0 answers
66 views

How do I use withArgs in Hardhat testing code to assert an event with an array parameter in a Solidity contract?

i have an event: event Set(uint indexed kind, uint16[4] indexed newArray); in my hardhat test: await expect(Tx).to.emit(contract, "Set").withArgs(1, [1, 2 , 3, 4]) but i get error: event: ...
DankFang's user avatar
0 votes
1 answer
46 views

Error in Hardhat Deployment Script: 'upload.deployed is not a function'

I'm working on deploying a smart contract using Hardhat, but I'm encountering an error that says 'upload.deployed is not a function'. Below is the code I am using: javascript Copy code // ...
swarup's user avatar
  • 1
0 votes
0 answers
22 views

Error while deploying solidity contracts using HardHat

So i catch so many errors including the Pragma solidity version i am using which is pragma solidity ^0.8.0; and another error : Source "@openzeppelin/contracts/token/ERC20/ERC20.sol" not ...
Mohamed Amin Grami's user avatar
0 votes
0 answers
32 views

I am getting this error when i run this command i am using macbook m1.Can anyone tell me what to do

npm install --save-dev @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ether ethers npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: [email protected] npm ...
Aditya Official's user avatar
-1 votes
1 answer
34 views

Member "length" not found or not visible after argument-dependent lookup in uint256

This is my Smart contract: // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; contract BankAccount { event Deposit( address indexed user, uint indexed accountId, ...
Mohamed's user avatar
0 votes
0 answers
35 views

error on trying to verify solidity contract with Hardhat for Etherscan

I am trying to verify and submit my contract source code to etherscan using hardhat but I am running into the following error and I do not understand how to resolve the error. I've read through the ...
Study Account's user avatar
0 votes
2 answers
75 views

Couldn't update node.js on WSL

copying : node/20.12.2 installed : v20.12.2 to /usr/local/bin/node active : v16.14.2 at /root/.nvm/versions/node/v16.14.2/bin/node I couldn't use node v20.12.2 in wsl vs code, but I could ...
Study Account's user avatar
0 votes
0 answers
151 views

Smart Contract deployment with web3.py - AttributeError: 'Web3' object has no attribute '...'

I am new to blockchain and have recently setup a hardhat project and written a smart contract for minting nfts. I am more comfortable with python so have started using web3.py for deploying and ...
Krish Parikh's user avatar

1
2 3 4 5
16