Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

"Undeclared identifier" errors when compiling contract with npx hardhat

I am trying to compile a contract in solidity for flash loan node bot, but it does not compile, so I can deploy it on L2 networks. Contract code: // SPDX-License-Identifier: MIT pragma solidity ^0.8....
lion's user avatar
  • 3
0 votes
1 answer
26 views

TypeError: Contract "TestContract" should be marked as abstract

I have issues so I slowly add one library at a time. This code compiles. // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/Ownable.sol"; import ...
pigfox's user avatar
  • 167
1 vote
1 answer
35 views

Hardhat compile code on file change (like remix)

Is there any way (preferably an official Hardhat plugin) to automatically compile the Smart Contracts' code on file change? I'd want to have the same developer experience as when using Remix, or ...
Alexander Herranz's user avatar
1 vote
1 answer
167 views

How to disable log that when compile?

I using script "yarn hardhat compile" alway log like image. I want to disable that.
sea.dev's user avatar
  • 13
1 vote
1 answer
123 views

Compilation is successful but getting bytecode = "0x"

I am trying to compile this very simple smart contract but I am getting its bytecode = "0x": // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/...
Falcon Stakepool's user avatar
0 votes
4 answers
523 views

Contract is below size limit, but Hardhat says it's not?

When I run npx hardhat compile, Hardhat says one of my contracts is above the size limit. But hardhat-contract-sizer says it's not. See below: Versions: hardhat-contract-sizer version: ^2.5.1 ...
António Gonçalves's user avatar
5 votes
1 answer
3k views

Is it possible to get the "creation bytecode" of an already deployed contract in Solidity?

I am looking to get some already deployed code working for myself. With ethers.js I can get the bytecode in the following way ethers.getCode("CONTRACT ADDRESS") However, this is a ...
zen's user avatar
  • 51
1 vote
1 answer
872 views

TypeError: Invalid URL at new NodeError when typing the command npx hardhat run scripts/deployGoldenFoxNFT.js --network rinkeby

I run into this error when i try to run with Hardhat. Any idea of what it can be the solution? Thanks a lot in advance
LAURA IOANA's user avatar
2 votes
1 answer
845 views

unexpected revert behaviour using custom errors in pure function

in the code below, if a revert using the custom error inside the pure function it reverts with a different error (below). If I do the same things without pure, it reverts with the custom error as ...
sola24's user avatar
  • 1,248
0 votes
2 answers
2k views

hardhat beginner "Nothing to compile" error

following hardhat beginner tutorial. This is how I did it, first run "npx hardhat " command and created basic sample project. After that run following command npm install --save-dev @...
yasurid's user avatar
1 vote
1 answer
521 views

Uniswap V2: TypeError: Explicit type conversion not allowed from "int_const -1" to "uint256"

I was trying to fork Uniswap V2 with another protocole and ran into this error while compiling the contracts: TypeError: Explicit type conversion not allowed from "int_const -1" to "...
Cizia's user avatar
  • 263
5 votes
6 answers
11k views

Error HH8: There's one or more errors in your config file, Expected a value of type HttpNetworkConfig

Why is Hardhat throwing an error? I copy n pasted the default config file from https://hardhat.org/config/? *Error HH8: There's one or more errors in your config file: Invalid value {"url":&...
GoGetterMeme's user avatar