Skip to content

Commit

Permalink
🔁 Upgrade to Solidity Version 0.8.26
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
  • Loading branch information
pcaversaccio committed May 22, 2024
1 parent 7c287d4 commit 3e5cc1f
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 61 deletions.
4 changes: 1 addition & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ Please:
- [ ] Because this PR includes a **new feature**, the change was previously discussed in an [issue](https://github.com/pcaversaccio/hardhat-project-template-ts/issues) or in the [discussions](https://github.com/pcaversaccio/hardhat-project-template-ts/discussions) section.
- [x] I didn't do anything of this.

---
### 🕓 Changelog

<!-- Add a description of your PR here -->

---

#### 🐶 Cute Animal Picture

![Put a link to a cute animal picture inside the parenthesis-->]()
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: 👮‍♂️ Sanity checks
on: [push, pull_request, workflow_dispatch]

concurrency:
group: ${{github.workflow}}-${{github.ref}}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: 🔍️ CodeQL
on: [push, pull_request, workflow_dispatch]

concurrency:
group: ${{github.workflow}}-${{github.ref}}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -38,4 +38,4 @@ jobs:
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
category: "/language:${{ matrix.language }}"
2 changes: 1 addition & 1 deletion .github/workflows/test-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: 🕵️‍♂️ Test smart contracts
on: [push, pull_request, workflow_dispatch]

concurrency:
group: ${{github.workflow}}-${{github.ref}}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/Greeter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.25;
pragma solidity ^0.8.26;

contract Greeter {
string private greeting;
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/Greeter.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.25;
pragma solidity ^0.8.26;

import {Greeter} from "../src/Greeter.sol";
import {Test} from "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cache_path = "cache" # where the cache
force = false # whether to ignore the cache (clean build)
evm_version = "paris" # the evm version (by hardfork name)
gas_reports = ["*"] # list of contracts to report gas of
solc_version = "0.8.25" # override for the solc version (setting this ignores `auto_detect_solc`)
solc_version = "0.8.26" # override for the solc version (setting this ignores `auto_detect_solc`)
auto_detect_solc = true # enable auto-detection of the appropriate solc version to use
offline = false # offline mode, if enabled, network access (downloading solc) is disallowed
optimizer = true # enable or disable the solc optimizer
Expand Down
23 changes: 20 additions & 3 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,17 @@ const config: HardhatUserConfig = {
sources: "./contracts/src",
},
solidity: {
// Only use Solidity default versions `>=0.8.25` for EVM networks that support the new `cancun` opcodes:
// https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/cancun.md
// Only use Solidity default versions `>=0.8.20` for EVM networks that support the opcode `PUSH0`
// Otherwise, use the versions `<=0.8.19`
version: "0.8.25",
version: "0.8.26",
settings: {
optimizer: {
enabled: true,
runs: 999_999,
},
evmVersion: "paris", // Prevent using the `PUSH0` opcode
evmVersion: "paris", // Prevent using the `PUSH0` and `cancun` opcodes
},
},
zksolc: {
Expand Down Expand Up @@ -657,6 +659,12 @@ const config: HardhatUserConfig = {
accounts,
ledgerAccounts,
},
fraxtalMain: {
chainId: 252,
url: vars.get("FRAXTAL_MAINNET_URL", "https://rpc.frax.com"),
accounts,
ledgerAccounts,
},
kavaMain: {
chainId: 2222,
url: vars.get("KAVA_MAINNET_URL", "https://evm.kava-rpc.com"),
Expand Down Expand Up @@ -888,7 +896,8 @@ const config: HardhatUserConfig = {
// For DOS Chain testnet & mainnet
dos: vars.get("DOS_API_KEY", ""),
dosTestnet: vars.get("DOS_API_KEY", ""),
// For Fraxtal testnet
// For Fraxtal testnet & mainnet
fraxtal: vars.get("FRAXTAL_API_KEY", ""),
fraxtalTestnet: vars.get("FRAXTAL_API_KEY", ""),
// For Kava mainnet
kava: vars.get("KAVA_API_KEY", ""),
Expand Down Expand Up @@ -1292,6 +1301,14 @@ const config: HardhatUserConfig = {
browserURL: "https://test.doscan.io",
},
},
{
network: "fraxtal",
chainId: 252,
urls: {
apiURL: "https://api.fraxscan.com/api",
browserURL: "https://fraxscan.com",
},
},
{
network: "fraxtalTestnet",
chainId: 2522,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"deploy:dostestnet": "npx hardhat run --network dosTestnet scripts/deploy.ts",
"deploy:dosmain": "npx hardhat run --network dosMain scripts/deploy.ts",
"deploy:fraxtaltestnet": "npx hardhat run --network fraxtalTestnet scripts/deploy.ts",
"deploy:fraxtalmain": "npx hardhat run --network fraxtalMain scripts/deploy.ts",
"deploy:kavamain": "npx hardhat run --network kavaMain scripts/deploy.ts",
"deploy:metistestnet": "npx hardhat run --network metisTestnet scripts/deploy.ts",
"deploy:metismain": "npx hardhat run --network metisMain scripts/deploy.ts",
Expand Down Expand Up @@ -175,7 +176,7 @@
"typechain": "^8.3.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.10.0",
"xdeployer": "^3.0.10",
"xdeployer": "^3.0.11",
"zksync-ethers": "^6.7.1"
}
}
Loading

0 comments on commit 3e5cc1f

Please sign in to comment.