All Questions
Tagged with compiler solidity-0.8.x
5 questions
0
votes
0
answers
138
views
Solc too slow compiling
The solc compiler that I'm using (0.8.21) is taking too much time to compile. It's compiling 20 files for a foundry test campaign in ~90 seconds when it should be milliseconds.
Any ideas on what I ...
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 ...
1
vote
1
answer
80
views
Call or assignment expected. Getting this error while upgrading solidity version
I am not aware of the Assembly code. I copied the ERC1820 registry contract from here. This is written in 0.5.3. When I tried to compile it with 0.8.0 it gave me this error :
I know it's because of ...
1
vote
1
answer
48
views
Compiler doesn't show a warning if empty function is not marked as pure
When compiling a function without marking its state mutability as pure, the compiler shows the following warning:
Warning: Function state mutability can be restricted to pure
For example:
contract ...
1
vote
1
answer
360
views
Why is solidity asking me to restrict state modifier function to view?
Version 0.8.7
Solidity is complaining that several state modifier functions can be restricted to view, such as:
function updateStruct(
uint256 dummyParam
) public onlyOwner {
DummyStruct ...