Radar · Solidity · Archive · Week 19 · May 5 – 11, 2025
Default EVM version changed to Prague
Worth knowingcompiler
- What changed
- The compiler now defaults to the Prague EVM version instead of Cancun.
- Production impact
- The source does not say.
- Try it
- Compile a contract with
pragma solidity ^0.8.30;and inspect the generated bytecode to verify the target EVM version. - Source
- github.com/argotorg/solidity/releases/tag/v0.8.30
Understand it, then run it
Solidity 0.8.30 changed the compiler’s default EVM version from Cancun to Prague. When you write a contract without specifying an EVM version, the compiler will now target Prague. Prague is the newest EVM release, adding a few new opcodes and changes to existing ones. This change only affects how the compiler emits bytecode; the Solidity language itself stays the same.
Run it now
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.37;
// The compiler defaults to the Prague EVM version in 0.8.37.
// This contract simply stores a value to demonstrate that the
// contract compiles and runs under the default EVM.
contract Main {
uint256 public value;
constructor(uint256 _value) {
value = _value;
}
}
Tests
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.37;
import "./main.sol";
contract MainTest {
Main main;
constructor() {
main = new Main(42);
}
function test_valueIsSet() public {
require(main.value() == 42, "value should be 42");
}
}
The test report when we ran it on Solidity 0.8.37 (solc)
1 of 1 tests passed.
- test_valueIsSet28,459 gas
- MainTest: 640 bytes of bytecode, deployed for 228,254 gas
solc 0.8.37 · prague
Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.
Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed