Skip to content

Commit

Permalink
chore(repo,protocol): fmt and clean up foundry.toml (#16314)
Browse files Browse the repository at this point in the history
  • Loading branch information
dionysuzx authored Mar 5, 2024
1 parent 8fe5b95 commit dbe30bd
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
5 changes: 4 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"recommendations": ["NomicFoundation.hardhat-solidity"]
"recommendations": [
"NomicFoundation.hardhat-solidity",
"tamasfe.even-better-toml"
]
}
9 changes: 6 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
"[solidity]": {
"editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"solidity.compileUsingRemoteVersion": "v0.8.24+commit.e11b9ed9",
"solidity.formatter": "forge",
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": [
"packages/bridge-ui/src/i18n",
"packages/guardian-prover-health-check-ui/src/i18n"
],
"i18n-ally.keystyle": "nested",
"solidity.compileUsingRemoteVersion": "v0.8.24+commit.e11b9ed9"
]
}
2 changes: 0 additions & 2 deletions packages/protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ This project also integrates with Foundry for building and testing contracts.
- To compile using foundry: `forge build` or `pnpm compile`
- To run foundry tests: `forge test --gas-report -vvv` or `pnpm test:foundry`

Note that compiling with foundry uses dependencies inside the `lib` dir (instead of `node_modules`).

## Generating and Running the L2 Genesis Block

The generation of the L2 genesis block and obtaining its hash involves a series of steps, including constructing the genesis JSON, followed by the actual generation and retrieval of the genesis block hash. A test can be executed to comprehend this process.
Expand Down
34 changes: 18 additions & 16 deletions packages/protocol/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
[profile.default]
solc_version = "0.8.24"
src = "contracts"
out = "out"
test = "test"
script = "script"
libs = ["lib"]
gas_price = 10000000000 # gas price is 10 Gwei
gas_price = 10_000_000_000 # 10 Gwei
gas_limit = "18446744073709551615" # u64::MAX
optimizer = true
optimizer_runs = 200
ffi = true
gas_limit = "18446744073709551615"
memory_limit = 2073741824
memory_limit = 2_073_741_824
solc_version = "0.8.24"
evm_version = "cancun"
remappings = [
"@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/",
"@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
"solady/=node_modules/solady/",
"forge-std/=node_modules/forge-std/",
"ds-test/=node_modules/ds-test/src/",
"p256-verifier/=node_modules/p256-verifier/",
]

# Do not change the block_gas_limit value, TaikoL2.t.sol depends on it.
block_gas_limit = 80000000 #80M
# For mainnet_mock tokenomics test we need a huge value to run lots of iterations.
# Use the above 30M for TaikoL2.t.sol related tests, only use this number with mainnet simulation.
# Use 30M for TaikoL2.t.sol related tests, only use this number with mainnet simulation.
block_gas_limit = 80_000_000

fs_permissions = [
{ access = "read", path = "./out" },
Expand All @@ -26,17 +32,13 @@ fs_permissions = [
{ access = "read", path = "./genesis" },
]

# 2394: transient storage warning
# 2394: Transient storage warning
# 3860: Contract initcode size is xxx bytes and exceeds 49152 bytes
# 5574: Contract code size is xxx bytes and exceeds 24576 byte
ignored_error_codes = [ 2394, 3860, 5574]

fuzz = { runs = 200 }
ignored_error_codes = [2394, 3860, 5574]

# Workaround as a fixed fuzz seed.
# Bug is confirmed, will be fixed soon:
# https://github.com/foundry-rs/foundry/issues/5913
seed = 13623721389213
[fuzz]
runs = 200

[fmt]
bracket_spacing = true
Expand Down
6 changes: 0 additions & 6 deletions packages/protocol/remappings.txt

This file was deleted.

2 comments on commit dbe30bd

@engr0001
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its a great project,,,,,.

@ZaheerX0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great project

Please sign in to comment.