Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ number_underscore = "thousands"
quote_style = "double"
sort_imports = true

[lint]
severity = ["high", "med", "low", "gas"]
exclude_lints = ["asm-keccak256", "erc20-unchecked-transfer", "incorrect-shift"]

[profile.ci.fuzz]
runs = 65536

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@towns-protocol/diamond",
"version": "0.6.2",
"version": "0.6.3",
"description": "A comprehensive toolkit for building modular smart contracts with the EIP-2535 Diamond Standard, including core contracts and optimized building blocks",
"main": "index.js",
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions scripts/common/DeployFacet.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract DeployFacet is DeployBase {
using LibString for *;

/// @dev Constants for gas estimation
uint256 internal constant BLOCK_GAS_LIMIT = 30_000_000;
uint256 internal constant PER_TRANSACTION_GAS_LIMIT = 1 << 24; // gas limit per EIP-7825
uint256 internal constant BASE_TX_COST = 21_000;
uint256 internal constant CONTRACT_CREATION_COST = 32_000;
uint256 internal constant STORAGE_VARIABLE_COST = 22_100;
Expand Down Expand Up @@ -101,13 +101,13 @@ contract DeployFacet is DeployBase {
// estimate gas cost for this deployment
batchGasEstimate += estimateDeploymentGas(bytecode);

// check if adding this contract would exceed block gas limit
if (batchGasEstimate > BLOCK_GAS_LIMIT) {
// check if adding this contract would exceed per-transaction gas limit
if (batchGasEstimate > PER_TRANSACTION_GAS_LIMIT) {
warn(
string.concat(
"DeployFacet: Adding contract ",
name,
" may exceed block gas limit 30_000_000. Deploy current batch first."
" may exceed per-transaction gas limit 16,777,216. Deploy current batch first."
)
);
}
Expand Down