From 1d6a19958fd61c176403c43b59bf02f5ccbe8072 Mon Sep 17 00:00:00 2001 From: Alex Vega Date: Sat, 17 Jan 2026 21:53:56 +0700 Subject: [PATCH] fix: update outdated Solidity pragma versions to 0.8.20 Updated pragma statements in tutorial code examples: - hello-world-step-by-step.mdx: 0.8.17 -> 0.8.20 - hardhat-forking.mdx: 0.8.9 -> 0.8.20 - mappings-sbs.mdx: 0.8.17 -> 0.8.20 Solidity 0.8.20+ includes important optimizations and security improvements. Closes #815 --- .../hello-world-step-by-step.mdx | 6 +++--- docs/learn/hardhat/hardhat-forking/hardhat-forking.mdx | 2 +- docs/learn/mappings/mappings-sbs.mdx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/learn/contracts-and-basic-functions/hello-world-step-by-step.mdx b/docs/learn/contracts-and-basic-functions/hello-world-step-by-step.mdx index 69242090c..6c6045f49 100644 --- a/docs/learn/contracts-and-basic-functions/hello-world-step-by-step.mdx +++ b/docs/learn/contracts-and-basic-functions/hello-world-step-by-step.mdx @@ -47,7 +47,7 @@ If you don't want to give a license, you can put `UNLICENSED`. Common open sourc Below the license identifier, you need to specify which [version] of Solidity the compiler should use to compile your code. If by the time you read this, the version has advanced, you should try to use the most current version. Doing so may cause you to run into unexpected errors, but it's great practice for working in real-world conditions! ```Solidity -pragma solidity 0.8.17; +pragma solidity 0.8.20; ``` Finally, add a `contract` called `HelloWorld`. You should end up with: @@ -55,7 +55,7 @@ Finally, add a `contract` called `HelloWorld`. You should end up with: ```Solidity // SPDX-License-Identifier: MIT -pragma solidity 0.8.17; +pragma solidity 0.8.20; contract HelloWorld { @@ -168,7 +168,7 @@ Deploy and test your contract. You should get a _decoded output_ with: ```solidity // SPDX-License-Identifier: MIT -pragma solidity 0.8.17; +pragma solidity 0.8.20; contract HelloWorld { diff --git a/docs/learn/hardhat/hardhat-forking/hardhat-forking.mdx b/docs/learn/hardhat/hardhat-forking/hardhat-forking.mdx index 120159e05..5c755f48f 100644 --- a/docs/learn/hardhat/hardhat-forking/hardhat-forking.mdx +++ b/docs/learn/hardhat/hardhat-forking/hardhat-forking.mdx @@ -49,7 +49,7 @@ Those won't be covered in this guide, however it's recommended to explore them a The BalanceReader contract is created as follows: ```tsx -pragma solidity 0.8.9; +pragma solidity 0.8.20; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/docs/learn/mappings/mappings-sbs.mdx b/docs/learn/mappings/mappings-sbs.mdx index cbb349382..835f72d29 100644 --- a/docs/learn/mappings/mappings-sbs.mdx +++ b/docs/learn/mappings/mappings-sbs.mdx @@ -171,7 +171,7 @@ You should end up with a contract similar to this: ```solidity -pragma solidity 0.8.17; +pragma solidity 0.8.20; contract Mappings { mapping (address => uint) public favoriteNumbers;