Skip to main content

Questions tagged [hardhat-deploy]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

MAX TOTAL SUPPLY ON ETHERSCAN IS 0

I deployed my token to MetaMask and it did not reflect the token name or the decimal. I manually had to input it. After I deployed to etherscan it is showing MAX TOTAL SUPPLY: 0 HOLDERS 0 TOTAL ...
Kwesili Okafor's user avatar
0 votes
1 answer
15 views

hardhat upgradeProxy can not deploy new contract. implement contract is extreme old contract

When use upgradeProxy in some of chains(Polygon main, Manta etc) some of chains worked. They can upgrade and deploy a new implement contract. But sometimes, when I run upgradeProxy, my new implement ...
AndrewZzzz's user avatar
0 votes
1 answer
14 views

Hardhat, problem with uninstalled dependencies

I can compile my contracts successfully. I had some problems with some of the hardhat functions so i installed Waffle and its dependencies. However it doesn't work and throws an error stating missing ...
אליה שלמה's user avatar
1 vote
0 answers
10 views

When does hardhat-deploy skip a function on the deploy script

When running this script for the second time, the hardhat-deploy library detects that it had already deployed the pool artifact so it skipped that part. It did not skip the pool initialisation. So ...
IBeFrogs's user avatar
0 votes
1 answer
23 views

Hardhat Ethers get Contract Deployed on a Specific Chain

I've deployed a contract(MyContract) on both ethereum sepolia and arbitrum sepolia testnets. async function getContractAddress() { const { deployer } = await getNamedAccounts(); const ...
MAYANK CHHIPA's user avatar
0 votes
1 answer
224 views

Facing the "factory runner does not support sending transactions" error while executing deploy script of Hardhat

When I run: npx hardhat run --network sepolia scripts/deployFlashLoan.js I am getting this error: factory runner does not support sending transactions (operation="sendTransaction", code=...
Udayarajan gauthaman's user avatar
0 votes
0 answers
21 views

How to solve constructor params missing issue?

This is my constructor code for the trading receiver constructor(address _staking, address _trading, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) { liquidityI = ...
Vinit_2311's user avatar
0 votes
0 answers
77 views

Hardhat Ignition Deployment

since I've started using hardhat ignition to deploy my contracts, the deployment process has been really really slow. Anyone else facing the same issue?
Vidhan Mangla's user avatar
1 vote
1 answer
26 views

Getting method hardhat_impersonateAccount not supported when impersonating a WETH whale account on Arbitrum

Attempting to impersonate a WETH whale account on arbitrum and getting: ProviderError: method hardhat_impersonateAccount not supported The code is being run from a script using the following command ...
Ian Forsyth 's user avatar
1 vote
0 answers
20 views

Cannot read properties of undefined (reading 'length') when deploying Mock Aggregator

I am trying to deploy Mock Aggregator, but getting the error as TypeError: Cannot read properties of undefined (reading 'length') This error is from the internal module called hardhat deploy I went ...
Sam's Show's user avatar
1 vote
2 answers
301 views

Hardhat: Get contract address and pass as param to another contract to deploy

gm guys, I have a question about the InheritanceSubmission on the basecamp contract: I performed the following steps to deploy my contracts using Hardhat's Ignition: I deployed the Salesperson and ...
Jean's user avatar
  • 129
0 votes
1 answer
51 views

"Getting 'Promise { <pending> }' Response When Deploying Smart Contract Using Hardhat - How to Resolve?"

I'm encountering difficulties deploying a smart contract using Hardhat. In my deployment script, I'm using ethers.getContractFactory().deploy() to deploy the BinaryvilleRobotsNFT contract. However, ...
varun_63's user avatar
1 vote
1 answer
85 views

Execution Reverted due to UniswapV2-Pair creation in constructor

I am new to Blockchain development, so bear with me. I successfully deployed my first contract, but if I try to add a Uniswap V2 Pair creation inside the constructor, I always get the error "...
SolidityNewbie's user avatar
1 vote
0 answers
37 views

Unable to deploy Transparent Proxy contract to Polygon mainnet with Hardhat

I'm able to deploy this same contract to the Mumbai testnet and verify it and everything works fine. So I know that my script is working correctly. However each time I try to deploy to Polygon mainnet,...
BlackH3art's user avatar
0 votes
0 answers
45 views

UniswapV3 Fork with updated POOL_INIT_CODE_HASH

I am trying to modify the the standard tests for UniswapV3 staker, which is deployed with different POOL_INIT_CODE_HASH, but so far the tests that are failing resulting the following Error: Error: VM ...
Mark's user avatar
  • 13
0 votes
0 answers
19 views

Is Remix Hardhat documentation outdated?

In Chrome on Mac (the problem does not happen on Firefox), I'm trying to fully integrate a Hardhat project in a Remix IDE project, in order to compile the project in the same way, with both Remix's &...
Alexander Herranz's user avatar
0 votes
0 answers
40 views

Cannot read properties of undefined (reading 'deployContract')

const hre = require("hardhat"); async function main() { const userstorage = await hre.ethers.deployContract("userstorage"); await userstorage.waitForDeployment(); console....
Achal Jhawar's user avatar
1 vote
1 answer
87 views

Sepolia - stalled on waitForDeployment

I use Hardhat and have some scripts to perform functions, such as deploy. I've been using Goerli but have been aware that it is being shuttered, and also i've found the transaction fee to be high and ...
HankCa's user avatar
  • 175
0 votes
0 answers
9 views

How to trigger revert with hardhat

I want to use hardhat to test my contract.Here is my Contract. When I deliberately make a mistake which will trigger require(,"The service is not passed") and run npx hardhat test,I expect ...
hiahia xu's user avatar
0 votes
0 answers
10 views

How to use contract address in web3js dynamicly with hardhat?

I have an contract but when I deploy with hardhat in artifact json code there s no contract address property but with truffle there was. I wanna use hardhat and use contract address not staticly ...
seojunchian's user avatar
2 votes
0 answers
182 views

Hardhat throw Error: yParity mismatch (argument="signature", ...... ) when i try to deploy smartcotnract in sepolia testnet

Command passed: npx hardhat run scripts/deploy.js --network sepolia Hardhat throw error when i try to deploy smart contract in sepolia test using alchemy api: TypeError: yParity mismatch (argument=&...
Ethereum Developer's user avatar
0 votes
1 answer
40 views

TypeError: GetNamedAccounts is not a function

This error: TypeError: GetNamedAccounts is not a function gets printed when i try to deploy my contract with this piece of code: yarn hardhat deploy --network sepolia I've tinkered with dependencies ...
andr0-0's user avatar
  • 47
0 votes
0 answers
69 views

Why is hardhat contract deployment script consuming high gas?

const hre = require("hardhat"); async function main(file_name, private_key, smart_contract_name, smart_contract_symbol) { const networkURL = hre.network.config.url; const provider = new ...
Gaurav Pant's user avatar
0 votes
1 answer
617 views

"ProviderError: execution reverted" I get this error when trying to deploy to Sepolia

I need a bit of help with my code here. Maybe someone more experienced can eye the bug, I've have to give up and ask here. So, I am trying to deploy to Sepolia and I am getting this error and I've ...
mhanga's user avatar
  • 1
0 votes
0 answers
127 views

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)

When I tried to npx hardhat compile, error HH19 showed up I already changed the chai from ^5.0.0 to ^4.3.7 and changed the file name from js to cjs, and the error still shows up. Any ideas on how to ...
aoki's user avatar
  • 1
0 votes
2 answers
257 views

Why is my contract not deploying on the Sepolia testnet? It shows that the Sepolia network doesn't exist

am encountering an issue with deploying my contract on Hardhat. The error message indicates that the Sepolia network does not exist. I have provided links to screenshots of the error messages for ...
Bahloul mubarik's user avatar
0 votes
1 answer
25 views

The Solidity version pragma statement in these files doesn't match any of the configured compilers in your config. hardhat-deployment

in trying to compile a contract i keep getting this error: The Solidity version pragma statement in these files doesn't match any of the configured compilers in your config. Change the pragma or ...
kattyd's user avatar
  • 3
0 votes
0 answers
14 views

Calling a function inside a contract using hardhat deploy scripts

I'm writing a dice betting game which uses Chainlink VRF V2 to get random numbers for the dices. I'm trying to deploy the VRF V2 Mock and then create a subscription and add My currently deployed ...
Rjey's user avatar
  • 17
0 votes
1 answer
25 views

Facing Issue with test files in Hardhat

I am trying to build a Dapp with hardhat installed in my vs Code my smart contracts parts are over and it gets compiled but I am facing a problem with test files I don't know why they are not getting ...
Abhik Chanda's user avatar
0 votes
2 answers
37 views

problem with reverted when testing smart contract

In my smart contract there is a function: function fund() public payable { require( msg.value.getConversionRate(priceFeed) >= MINIMUM_USD, "You need to spend more ETH!"...
vinh nguyen's user avatar
0 votes
2 answers
83 views

VRFCoordinatorV2Mock.createSubscription is not a function contract error

const { network, ethers } = require("hardhat") const { developmentChain } = require("../helper-hardhat-config") const { networkConfig } = require("../helper-hardhat-config&...
Rajvir Singh's user avatar
1 vote
1 answer
27 views

Cannot read properties of undefined (reading 'vrfCoordinatorV2')

Here Is my 01-Deploy-raffle.js Code const { network } = require("hardhat"); const { ethers } = require("hardhat"); const { networkConfig, developmentChains, ...
Apex Aryan's user avatar
0 votes
0 answers
33 views

The current version of deployment in script seems to have alot of issues in deploying my

const hre = require("hardhat"); async function main() { const initAmount = hre.ethers.parseEther("0.01"); const sleekToken = await hre.ethers.deployContract("SleekToken&...
KriekDev's user avatar
0 votes
0 answers
14 views

Error occurs when my gas fee isn't zero. Otherwise transaction runs fine with 0 gas fee

I've created a smart contract that helps user to buy erc-20 tokens in exchange of matics. I am getting this error whenever I do some calculations in my function, which increases gas fee. I have 0....
Abdul Aleem's user avatar
2 votes
0 answers
510 views

Could not decode result data

I have an issue when trying deploy contract // SPDX-License-Identifier: ISC pragma solidity ^0.8.19; contract SimpleStorage { uint256 favoriteNumber; struct People { uint256 favoriteNumber; ...
Victor's user avatar
  • 45
0 votes
1 answer
309 views

Error while deploying on sepolia network

hardhat.config.js -> require("@nomicfoundation/hardhat-toolbox"); require("@nomicfoundation/hardhat-ethers"); require("dotenv").config(); console.log("1"); ...
Indul's user avatar
  • 29
0 votes
1 answer
263 views

Error deploying contracts: Error: incorrect number of arguments to constructor at ContractFactory.getDeployTransaction

const hre = require("hardhat"); // async function main(){ // const RPSLS = await hre.ethers.getContractFactory("RPSLS"); // const RPSLSF = await RPSLS.deploy(); // await ...
Indul's user avatar
  • 29
0 votes
0 answers
43 views

NFT-Marketplace-Tutorial

I try to do example this tutorial. I run succesfully this. But I take error that "Upload errorTypeError: str is undefined". How can ı solve his? I did before: -> I deleted artifacts the ı ...
Kayhan's user avatar
  • 1
0 votes
1 answer
59 views

Error HH8: There's one or more errors in your config file: * Invalid account: #0 for network: sepolia - private key too short, expected 32 bytes

import { HardhatUserConfig } from "hardhat/config"; import "@nomicfoundation/hardhat-toolbox"; require('dotenv').config(); const {API_URL, PRIVATE_KEY} = process.env; const ...
Indul's user avatar
  • 29
0 votes
1 answer
45 views

When deploying a contract on a custom blockchain using hardhat, i get BroadcastedTxDifferentHash error?

I am trying to deploy a contract to a custom EVM chain using hardhat and i get the following error BroadcastedTxDifferentHash: Expected broadcasted transaction to have hash '...
master chief's user avatar
0 votes
1 answer
62 views

I have problem with deploying my token to Goerli testnet

I have an issue with deploying smart contract on Goerli network. When I trying to run the contract I get Error Error HH100: Network goerli doesn't exist Here is example of my code // SPDX-License-...
Victor's user avatar
  • 45
0 votes
0 answers
27 views

I cant log out my contract in a project

I am building web3 Todo app . I am building it using Next Js . I am trying to console log out my contract on console . So I have just build my smart contract . Now trying to make connection with my ...
Shorna's user avatar
  • 17
0 votes
2 answers
113 views

TypeError: Cannot read properties of undefined (reading 'address') when i try deploying contracts in Hardhat

so i'v 2 smart contracts token.sol contract Token is IERC20, ReentrancyGuard { string private Name; string private Sympol; uint private Decimal; uint private TotalSupply; address ...
Yassine's user avatar
  • 11
1 vote
2 answers
397 views

Calling smart contract function from frontend is not working

I've created a twitter profile contract and a function called contract Twitter { //Struct for user profile struct Profile { string name; string username; string bio; ...
Santhosh's user avatar
0 votes
1 answer
49 views

Hardhat deploy same contract to multiple addresses fails

I need to deploy the same contract to multiple wallets and I have this shell script. #!/bin/bash set -x contractName=MyContract network=sepolia npm cache clean --force yarn hardhat clean yarn hardhat ...
pigfox's user avatar
  • 71
0 votes
1 answer
818 views

How to deploy a contract using hardhat and ethersjs v6

This is the deploy script that I have written still it is not running.
Anjishnu Ganguly's user avatar
0 votes
1 answer
40 views

How to import locally generated addresses on my Metamask? [closed]

Im currently creating a basic connect and fund contract where I will be able to fund an address using hardhat and ethers.js. I currently have a local mock created in my terminal with dummy accounts ...
SABER's user avatar
  • 1
0 votes
1 answer
138 views

Has the way to access public member variables in solidity through deployed contracts changed?

I have a public contract member defined like this, which is later assigned a value in the constructor AggregatorV3Interface public priceFeed; I want to access this variable's value and I am trying ...
Pankaj Sehrawat's user avatar
2 votes
0 answers
185 views

Hardhat public network fork: Error calling view functions with ethers.js on browser

I have my hardhat network configured as a fork of Binance Smart Chain like this: const config: HardhatUserConfig = { solidity: { version: "0.8.0", settings: { optimizer: { ...
Alexander Herranz's user avatar
1 vote
1 answer
61 views

What is the right way to import a contract type that uses an interface in hardhat?

I have a contract with an interface that I want to test with hardhat the contract looks like this interface IGame { function play(uint guess) external; } contract Test { address private owner;...
Eugene1111's user avatar

1
2 3 4 5 6