Skip to content

Commit

Permalink
Updated template with solc, env, gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
asselstine committed Apr 9, 2024
1 parent 6e39f94 commit 8958cb9
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 34 deletions.
27 changes: 27 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Mnemonic phrase
MNEMONIC=""

# Private key
PRIVATE_KEY=""

# Mainnet RPC URLs
MAINNET_RPC_URL=""
ARBITRUM_RPC_URL=""
OPTIMISM_RPC_URL=""

# Testnet RPC URLs
SEPOLIA_RPC_URL=""
ARBITRUM_SEPOLIA_RPC_URL=""
OPTIMISM_SEPOLIA_RPC_URL=""

# Used for verifying contracts on Etherscan
ETHERSCAN_API_KEY=""
ARBITRUM_ETHERSCAN_API_KEY=""
OPTIMISM_ETHERSCAN_API_KEY=""
POLYGONSCAN_API_KEY=""

# Used to run Hardhat scripts in fork mode
FORK_ENABLED=true

# Used to report gas usage when running Forge tests
FORGE_GAS_REPORT=true
27 changes: 0 additions & 27 deletions .envrc.example

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ env:

jobs:
forge:
environment: ci
strategy:
fail-fast: true
permissions:
Expand Down Expand Up @@ -50,5 +51,5 @@ jobs:
uses: zgosalvez/github-actions-report-lcov@v1.5.0
with:
coverage-files: lcov.info
minimum-coverage: 90
minimum-coverage: 100
github-token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ out/
/broadcast/*/31337/
/broadcast/**/dry-run/

# Mac
.DS_Store

# Secrets
.env
.envrc

# Coverage
lcov.info

# VS Code
.history

# Modules
node_modules
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"files": "*.sol",
"options": {
"compiler": "0.8.21",
"compiler": "0.8.24",
"bracketSpacing": true,
"printWidth": 120,
"tabWidth": 4
Expand Down
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"plugins": ["prettier"],
"rules": {
"avoid-low-level-calls": "off",
"compiler-version": ["error", "0.8.21"],
"compiler-version": ["error", "0.8.24"],
"func-visibility": "off",
"no-empty-blocks": "off",
"no-inline-assembly": "off"
Expand Down
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ src = 'src'
out = 'out'
test = 'test'
libs = ['lib']
solc = "0.8.21"
solc = "0.8.24"
fs_permissions = [{ access = "read", path = "./broadcast" }]
gas_reports = ["Foo"]

Expand Down
2 changes: 1 addition & 1 deletion script/Foo.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.21;
pragma solidity ^0.8.24;

import { Script } from "forge-std/Script.sol";
import { Foo } from "../src/Foo.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/Foo.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.21;
pragma solidity ^0.8.24;

contract Foo {
function getFoo() external pure returns (string memory) {
Expand Down
2 changes: 1 addition & 1 deletion test/Foo.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.21;
pragma solidity ^0.8.24;

import "forge-std/Test.sol";

Expand Down

0 comments on commit 8958cb9

Please sign in to comment.