Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c63dc45
wip: use create2 for factory deployment
godzillaba Jun 24, 2025
0040293
remove key from config
godzillaba Jun 24, 2025
40b97dd
fmt
godzillaba Jun 24, 2025
22ad2fa
fix signatures
godzillaba Jun 24, 2025
9b38201
Merge branch 'develop' into deterministic-factory-deployments
godzillaba Jun 24, 2025
17be158
inline up exec deployment
godzillaba Jun 25, 2025
8aed0c3
salt length check
godzillaba Jun 30, 2025
7c0fd72
update tests
godzillaba Jun 30, 2025
4412691
Merge branch 'develop' into deterministic-factory-deployments
godzillaba Jun 30, 2025
1a12320
fmt
godzillaba Jun 30, 2025
64a519a
Merge branch 'deterministic-factory-deployments' of https://github.co…
godzillaba Jun 30, 2025
c4887b3
remove SetTemplatesArgs struct
godzillaba Jul 1, 2025
f4ba76f
remove ownership from bridge creator
godzillaba Jul 1, 2025
5953155
add CREATE2_FACTORY env and deployment instructions
godzillaba Jul 1, 2025
9429824
fix signatures
godzillaba Jul 1, 2025
f760491
factory owner as deployAllContracts arg
godzillaba Jul 1, 2025
bd06fb1
set deployer as owner in local deployment
godzillaba Jul 1, 2025
a2d4228
chore: disable metahash and align hardhat foundry (#363)
godzillaba Jul 3, 2025
1b86d38
fix: deploy create2 factory for local deployment
gzeoneth Jul 3, 2025
89baf3a
fix: wait for funding
gzeoneth Jul 3, 2025
d74b01b
ci: use geth-allow-pre155
gzeoneth Jul 3, 2025
9373a97
fix: _uint256ToAddress helper
gzeoneth Jul 3, 2025
152da5b
fix: deploy4844 script
gzeoneth Jul 7, 2025
e81aaed
test: fix offset and l1 gas
gzeoneth Jul 17, 2025
6094b11
feat: deployOneStepProofEntry
gzeoneth Jul 17, 2025
ca42e86
feat: deployOsp script
gzeoneth Jul 17, 2025
f7523fb
fix: apply review comments
gzeoneth Jul 17, 2025
adb864a
Merge branch 'deterministic-factory-deployments' into deterministic-f…
gzeoneth Jul 18, 2025
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
3 changes: 3 additions & 0 deletions .env-sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ L1_PRIV_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
CONFIG_NETWORK_NAME="custom"
DEPLOYED_CONTRACTS_DIR="./scripts/files/"
DISABLE_VERIFICATION=true
FACTORY_OWNER=0x000000000000000000000000000000000000dead

CREATE2_FACTORY=0x4e59b44847b379578588920cA78FbF26c0B4956C

# to use the 'custom' hardhat network, set the following variables
CUSTOM_RPC_URL="http://127.0.0.1:8545"
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ jobs:
- name: Lint Test Scripts
run: yarn lint:test

- name: Compare bytecodes
run: yarn test:bytecodes

- name: Build
run: yarn build:all

Expand Down Expand Up @@ -169,7 +172,7 @@ jobs:
no-token-bridge: true
no-l3-token-bridge: true
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
nitro-testnode-ref: release
nitro-testnode-ref: geth-allow-pre155

- name: Setup node/yarn
uses: actions/setup-node@v3
Expand Down Expand Up @@ -202,7 +205,7 @@ jobs:
no-token-bridge: true
no-l3-token-bridge: true
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
nitro-testnode-ref: release
nitro-testnode-ref: geth-allow-pre155

- name: Setup node/yarn
uses: actions/setup-node@v3
Expand Down Expand Up @@ -234,7 +237,7 @@ jobs:
args: --l3-fee-token --l3-fee-token-pricer --l3-fee-token-decimals 6
no-token-bridge: true
no-l3-token-bridge: true
nitro-testnode-ref: release
nitro-testnode-ref: geth-allow-pre155
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'

- name: Setup node/yarn
Expand Down
23 changes: 22 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ cache_path = 'forge-cache/sol'
optimizer = true
optimizer_runs = 2000
via_ir = false
evm_version = 'cancun'
evm_version = 'london'
solc_version = '0.8.17'
bytecode_hash = 'none'
remappings = ['ds-test/=lib/forge-std/lib/ds-test/src/',
'forge-std/=lib/forge-std/src/',
'@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/',
Expand All @@ -16,14 +18,33 @@ remappings = ['ds-test/=lib/forge-std/lib/ds-test/src/',
'@uniswap/v2-core/=node_modules/@uniswap/v2-core/contracts',
'@uniswap/lib/=node_modules/@uniswap/lib/contracts']
fs_permissions = [{ access = "read", path = "./"}]
additional_compiler_profiles = [
{ name = "20_runs", optimizer_runs = 20 },
{ name = "200_runs", optimizer_runs = 200 },
{ name = "default", optimizer_runs = 2000 }
]
compilation_restrictions = [
{ paths = "src/rollup/RollupUserLogic.sol", optimizer_runs = 20 },
{ paths = "src/challengeV2/EdgeChallengeManager.sol", optimizer_runs = 200 },
]
skip = ['test/*']

[profile.test]
inherit = "default"
optimizer = false
additional_compiler_profiles = []
compilation_restrictions = []
skip = []

[profile.yul]
inherit = "default"
src = 'yul'
out = 'out/yul'
libs = ['node_modules', 'lib']
cache_path = 'forge-cache/yul'
remappings = []
auto_detect_remappings = false
skip = ['*.sol', 'test/*']

[fmt]
line_length = 100
Expand Down
77 changes: 22 additions & 55 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,64 +8,51 @@ import 'hardhat-gas-reporter'
import 'hardhat-contract-sizer'
import 'hardhat-ignore-warnings'
import dotenv from 'dotenv'
import { SolidityConfig } from 'hardhat/types'

dotenv.config()

const solidity = {
const commonSetting = {
metadata: {
bytecodeHash: 'none',
},
optimizer: {
enabled: true,
runs: 2000, // default value, can be overridden
},
evmVersion: 'london',
}

const solidity: SolidityConfig = {
compilers: [
{
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 2000,
},
},
settings: { ...commonSetting },
},
],
overrides: {
'src/rollup/RollupUserLogic.sol': {
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 20,
},
...commonSetting,
optimizer: { ...commonSetting.optimizer, runs: 20 },
},
},
'src/challengeV2/EdgeChallengeManager.sol': {
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
'src/mocks/HostioTest.sol': {
version: '0.8.24',
settings: {
optimizer: {
enabled: true,
runs: 100,
},
evmVersion: 'cancun',
},
},
'src/mocks/ArbOS11To32UpgradeTest.sol': {
version: '0.8.24',
settings: {
optimizer: {
enabled: true,
runs: 100,
},
evmVersion: 'cancun',
...commonSetting,
optimizer: { ...commonSetting.optimizer, runs: 200 },
},
},
},
}

if (process.env['INTERFACE_TESTER_SOLC_VERSION']) {
console.log(
'Running in interface tester mode with solc version',
process.env['INTERFACE_TESTER_SOLC_VERSION']
)
solidity.compilers.push({
version: process.env['INTERFACE_TESTER_SOLC_VERSION'],
settings: {
Expand All @@ -88,26 +75,6 @@ if (process.env['INTERFACE_TESTER_SOLC_VERSION']) {
},
},
},
'src/mocks/HostioTest.sol': {
version: '0.8.24',
settings: {
optimizer: {
enabled: true,
runs: 100,
},
evmVersion: 'cancun',
},
},
'src/mocks/ArbOS11To32UpgradeTest.sol': {
version: '0.8.24',
settings: {
optimizer: {
enabled: true,
runs: 100,
},
evmVersion: 'cancun',
},
},
}
}

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
"audit:ci": "audit-ci --config ./audit-ci.jsonc",
"audit:fix": "yarn-audit-fix",
"prepublishOnly": "hardhat clean && forge clean && hardhat compile && yarn build:forge:yul",
"coverage": "forge coverage --report lcov --ir-minimum && lcov --remove lcov.info 'node_modules/*' 'test/*' 'script/*' 'src/test-helpers/*' 'challenge/*' --ignore-errors unused -o lcov.info && genhtml lcov.info --branch-coverage --output-dir coverage",
"coverage": "FOUNDRY_PROFILE=test forge coverage --report lcov --ir-minimum && lcov --remove lcov.info 'node_modules/*' 'test/*' 'script/*' 'src/test-helpers/*' 'challenge/*' --ignore-errors unused -o lcov.info && genhtml lcov.info --branch-coverage --output-dir coverage",
"build:all": "yarn build && yarn build:forge",
"build": "hardhat compile",
"build:forge:sol": "forge build --skip *.yul",
"build:forge:yul": "FOUNDRY_PROFILE=yul forge build --skip *.sol",
"build:forge:yul": "FOUNDRY_PROFILE=yul forge build",
"build:forge": "yarn build:forge:sol && yarn build:forge:yul",
"contract:size": "hardhat size-contracts",
"lint:test": "eslint ./test",
Expand All @@ -44,8 +44,9 @@
"test:e2e": "hardhat test test/e2e/*.ts",
"test:e2e:stylus": "hardhat test test/e2e/stylusDeployer.ts",
"test:upgrade": "./scripts/testUpgrade.bash",
"test:foundry": "forge test --gas-limit 10000000000",
"test:foundry": "FOUNDRY_PROFILE=test forge test --gas-limit 10000000000",
"test:update": "yarn run test:signatures || yarn run test:storage",
"test:bytecodes": "hardhat clean && forge clean && hardhat run scripts/compareBytecodes.ts",
"metadatahash": "yarn build:all && hardhat run scripts/printMetadataHashes.ts",
"upload-4bytes": "forge build && find ./out -type f -name \"*.json\" -exec cast upload-signature {} + | grep -v Duplicated:",
"postinstall": "patch-package",
Expand Down
Loading