Skip to main content
6 votes

How to configure multiple solidity compiler versions in foundry?

So it doesn't seem like Foundry allows you to manually configure multiple solc versions however Foundry does automatically detect and configure the required compilers for your project, you'll need to ...
MShakeG's user avatar
  • 1,733
2 votes

Determine compiler used to create a given bytecode

May 2024 Update Since developers can remove or manually change the bytecode metadata in their smart contracts, bytecode metadata may not be the most accurate way to detect the compiler. Instead, ...
ardislu's user avatar
  • 537
2 votes

Possible way to hack Solidity into executing a function directly from a struct as a method? (v0.8.20)

It's a perfectly legitimate use. Only there are some restrictions: the called function must be executed within the context of the same contract. You can read the official documentation: https://docs....
Alexey Smirnov's user avatar
2 votes

Hardhat compile code on file change (like remix)

I don't think that's needed. Because every time we run any command in hardhat like run, test etc. the hardhat automatically matches the contract files with the already compiled artifacts, if there is ...
Zartaj Afser's user avatar
  • 4,484
1 vote

TypeError: Contract "TestContract" should be marked as abstract

It simply means that you are not implementing all functions of an Interface. When a contract inherits other contracts, functions are already declared and are inherited, however when inheriting an ...
Torof's user avatar
  • 790
1 vote

Run optimizer on opcodes

It is an interesting topic, but please consider the optimizations solc can apply on existing opcodes without the original Solidity or YUL code are probably limited. It's easier to find something about ...
Giuseppe Bertone's user avatar
1 vote

can't find contract after compile successfully in remix: No Contract Compiled Yet

I compiled each contract separately. Contract B Contract B successfully compiled Contract C Contract C successfully compiled Contract A Contract A throws an error stack too deep It's giving you ...
TonyCrypto44's user avatar
1 vote

What solidity version is used when you give a range to the compiler e.g. pragma solidity >0.7.0 <0.9.0?

The compilier does not choose, there is a different version of the compilier (solc) for each solidity version. Then, often hardhat, foundry, ect. automatically selects a solc version that works for ...
Bruce's user avatar
  • 967
1 vote

How to fix naming scheme and undeclared identifier errors?

Solidity may warn you about having identical variable names when you compile, but it will still let you deploy the contracts so you have to be careful when using names that shadow an existing one. Use ...
Rohan Nero's user avatar
  • 1,617

Only top scored, non community-wiki answers of a minimum length are eligible