Category "hardhat"

Error: missing revert data in call exception while testing with Hardhat

I want to test get my function TokenUri using hardhat. Here it is: function tokenURI(uint256 tokenId) public view virtual override returns (string memory){

Error connecting to localhost after npm hardhat run

I am new to deploying smart contracts with hardhat and am following a tutorial at https://dev.to/dabit3/the-complete-guide-to-full-stack-ethereum-development-3j

How to use TransparentUpgradeableProxy as Transparent Proxy

I'm Solidity Newbie. I'm learning how to implement Transparent Proxy using Openzeppelin's TransparentUpgradeableProxy contract, but am having some problems. Ste

No safeTransferFrom function in ethers.js contract instance?

I created a contract instance in hardhat console like so: const contract_fac = await ethers.getContractFactory("ContractName"); const contract = await contract_

when using Hardhat doesnt exist create project

after maked directory and on terminal I typed 'npx hardhat' enter image description here but doesnt showed create project when i saw their tutorial, possible to

insufficient funds for intrinsic transaction cost on test ropsten server

I'm trying to follow a tutorial to create an NFT: https://ethereum.org/en/developers/tutorials/how-to-write-and-deploy-an-nft/ I took a faucet here: https://fau

Error: invalid BigNumber value (argument="value", value=undefined, code=INVALID_ARGUMENT, version=bignumber/5.6.0)

I was following Patrick Video "https://www.youtube.com/watch?v=9oERTH9Bkw0&t=5700s" where I encounter this error at 2:31:20 and the code in that video is al

BSC Testnet addLiquiditiyETH TRANSFER_FROM_FAILED

I'm coding an bep20 token and if I want to add Liquidity with pancakeswap I get the following error: ProviderError: Error: VM Exception while processing transac

Not getting event from smart contract on ethers.js

I have contract this part is simply creating smart contract for NFT. At the end of the createToken() I am emitting event. // SPDX-License-Identifier: MIT OR Apa

Appending strings to JSON Files

consider the following code snippet: let proposals = JSON.parse(fs.readFileSync(proposalsFile, "utf8")) proposals[network.config.chainId!.toString()].push(propo

How to deploy multiple smart contracts using hardhat-deploy

I have two smart contracts that I want to deploy. I want to deploy the first one, then pass the address of the first into the constructor of the second one. I a

Contracts do not compile with zksync-solc. Their ABI and bytecode seem to be printed as an error

I am pretty new to development and asking questions on stackoverflow, so if there is something else I could provide, please tell me in comments! I have installe

How do I add ether to my localhost Metamask wallet with Hardhat?

I've connected metamask to a node created with hardhat. I can connect to this node on http://localhost:8545 network in metamask after setting the chain id to ma

Ethers.js "Error: unknown account #0 (operation="getAddress", code=UNSUPPORTED_OPERATION)"

I'm trying to fetch the price of ETH from KyberSwap, using Ethers.js, but I'm receiving the following error: Error: unknown account #0 (operation="getAddress",

Implementing fixtures with @nomiclabs/hardhat-waffle

In the official waffle documentation you may find the next way to implement fixtures: import {expect} from 'chai'; import {loadFixture, deployContract} from 'et

Npx hardhat could not determine executable to run

I am trying to follow this guide and I am struggling running hardhat. After following the commands in the article: mkdir hardhat-tutorial cd hardhat-tutorial np

Error: VM Exception while processing transaction: reverted with reason string 'ERC721: transfer caller is not owner nor approved'

i try to write NFT marketplace and i have problem with reselling items from user that buy item from owner and new, third user. I use next.js + openzeppelin + ha

Ethereum - insufficient funds for intrinsic transaction cost

I'm trying to create my own NFT contract factory, but it fails in mainnet. I have ETH on my wallet. In test it works fine. Here's my contract: //Contract based

How to restart a local hardhat node to initial state?

I am not really sure how to restart the state of the node to the initial state. Each time I try to redeploy a contract - I'm getting the same contract, the cons

How to use a getter function inside a React component?

I am trying to make a basic React component to retrieve a value from a deployed contract. In this example, I am using an input box to receive a contract address