Cyfrin Updraft.

Допис

Діліться своїми знаннями.

Cyfrin Moderator Pst.
Mar 29, 2024
Питання та відповіді експертів

How to resolve 'Invalid solc version' error?

When attempting to pull a forge build on Rio-network for the new Sherlock audit contest, I encountered the following error related to invalid solc version:

Encountered invalid solc version in contracts/interfaces/IRioLRT.sol: No solc version exists that matches the version requirement: =0.8.23
Encountered invalid solc version in contracts/interfaces/IRioLRTAVSRegistry.sol: No solc version exists that matches the version requirement: =0.8.23
Encountered invalid solc version in contracts/interfaces/IRioLRTAssetRegistry.sol: No solc version exists that matches the version requirement: =0.8.23
Encountered invalid solc version in contracts/interfaces/IRioLRTCoordinator.sol: No solc version exists that matches the version requirement: =0.8.23
...
...
...
Encountered invalid solc version in test/utils/beacon-chain/MockBeaconChainOracle.sol: No solc version exists that matches the version requirement: =0.8.23

I attempted to change the solc version by installing and setting it to 0.8.23, but the error persisted. How can I resolve this issue and successfully pull the forge build on Rio-network for the contest?

  • Solidity
0
1
Поділитися
Коментарі
.

Відповіді

1
Cyfrin Moderator Ans.
Mar 29 2024, 10:42

To ensure you are using the most up-to-date version, it is recommended to execute the foundryup command. Additionally, you can set the Solidity compiler (solc) version to the default profile by specifying the following configuration:

[profile.default]
solc = '0.8.23'

For further information, you can refer to the provided link.

0
Офіційна відповідь
Коментарі
.

Ви знаєте відповідь?

Будь ласка, увійдіть та поділіться нею.

Cyfrin Updraft is an education platform specializing on teaching the next generation of smart contract developers

200Пости201Відповіді
Sui.X.Peera.

Зароби свою частку з 1000 Sui

Заробляй бали репутації та отримуй винагороди за допомогу в розвитку спільноти Sui.