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: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ jobs:
contracts-bedrock-build:
docker:
- image: <<pipeline.parameters.default_docker_image>>
resource_class: xlarge
resource_class: 2xlarge
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Needed, otherwise the CI check fails

parameters:
build_args:
description: Forge build arguments
Expand Down Expand Up @@ -720,7 +720,7 @@ jobs:
circleci_ip_ranges: true
docker:
- image: <<pipeline.parameters.default_docker_image>>
resource_class: xlarge
resource_class: 2xlarge
parameters:
test_list:
description: List of test files to run
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ __pycache__
crytic-export

# ignore local asdf config
.tool-versions
.tool-versions
14 changes: 7 additions & 7 deletions packages/contracts-bedrock/interfaces/L1/IFeesDepositor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ pragma solidity ^0.8.0;
import { ISemver } from "interfaces/universal/ISemver.sol";
import { IProxyAdminOwnedBase } from "interfaces/L1/IProxyAdminOwnedBase.sol";
import { IReinitializableBase } from "interfaces/universal/IReinitializableBase.sol";
import { IOptimismPortal2 as IOptimismPortal } from "interfaces/L1/IOptimismPortal2.sol";
import { IL1CrossDomainMessenger } from "interfaces/L1/IL1CrossDomainMessenger.sol";

interface IFeesDepositor is ISemver, IProxyAdminOwnedBase, IReinitializableBase {
event Initialized(uint8 version);
event FundsReceived(address indexed sender, uint256 amount, uint256 newBalance);
event FeesDeposited(address indexed l2Recipient, uint256 amount);
event MinDepositAmountUpdated(uint96 oldMinDepositAmount, uint96 newMinDepositAmount);
event L2RecipientUpdated(address oldL2Recipient, address newL2Recipient);
event GasLimitUpdated(uint64 oldGasLimit, uint64 newGasLimit);
event GasLimitUpdated(uint32 oldGasLimit, uint32 newGasLimit);

function minDepositAmount() external view returns (uint96);
function portal() external view returns (IOptimismPortal);
function messenger() external view returns (IL1CrossDomainMessenger);
function l2Recipient() external view returns (address);
function gasLimit() external view returns (uint64);
function gasLimit() external view returns (uint32);
function initialize(
uint96 _minDepositAmount,
address _l2Recipient,
IOptimismPortal _portal,
uint64 _gasLimit
IL1CrossDomainMessenger _messenger,
uint32 _gasLimit
)
external;

function setMinDepositAmount(uint96 _newMinDepositAmount) external;
function setL2Recipient(address _newL2Recipient) external;
function setGasLimit(uint64 _newGasLimit) external;
function setGasLimit(uint32 _newGasLimit) external;

receive() external payable;

Expand Down
9 changes: 4 additions & 5 deletions packages/contracts-bedrock/interfaces/L2/IL1Withdrawer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@ import { ISemver } from "interfaces/universal/ISemver.sol";

interface IL1Withdrawer is ISemver {
error L1Withdrawer_OnlyProxyAdminOwner();
error L1Withdrawer_WithdrawalGasLimitTooLow();

event WithdrawalInitiated(address indexed recipient, uint256 amount);
event FundsReceived(address indexed sender, uint256 amount, uint256 newBalance);
event MinWithdrawalAmountUpdated(uint256 oldMinWithdrawalAmount, uint256 newMinWithdrawalAmount);
event RecipientUpdated(address oldRecipient, address newRecipient);
event WithdrawalGasLimitUpdated(uint96 oldWithdrawalGasLimit, uint96 newWithdrawalGasLimit);
event WithdrawalGasLimitUpdated(uint32 oldWithdrawalGasLimit, uint32 newWithdrawalGasLimit);

function minWithdrawalAmount() external view returns (uint256);
function recipient() external view returns (address);
function withdrawalGasLimit() external view returns (uint96);
function withdrawalGasLimit() external view returns (uint32);

function setMinWithdrawalAmount(uint256 _newMinWithdrawalAmount) external;
function setRecipient(address _newRecipient) external;
function setWithdrawalGasLimit(uint96 _newWithdrawalGasLimit) external;
function setWithdrawalGasLimit(uint32 _newWithdrawalGasLimit) external;

receive() external payable;

function __constructor__(uint256 _minWithdrawalAmount, address _recipient, uint96 _withdrawalGasLimit) external;
function __constructor__(uint256 _minWithdrawalAmount, address _recipient, uint32 _withdrawalGasLimit) external;
}
2 changes: 1 addition & 1 deletion packages/contracts-bedrock/scripts/L2Genesis.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ contract L2Genesis is Script {
uint256 internal constant PRECOMPILE_COUNT = 256;

uint80 internal constant DEV_ACCOUNT_FUND_AMT = 10_000 ether;
uint96 internal constant WITHDRAWAL_MIN_GAS_LIMIT = 300_000;
uint32 internal constant WITHDRAWAL_MIN_GAS_LIMIT = 1_000_000;
uint256 internal constant MIN_WITHDRAWAL_AMOUNT_THRESHOLD = 10 ether;

/// @notice Default Anvil dev accounts. Only funded if `cfg.fundDevAccounts == true`.
Expand Down
36 changes: 18 additions & 18 deletions packages/contracts-bedrock/snapshots/abi/FeesDepositor.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"name": "gasLimit",
"outputs": [
{
"internalType": "uint64",
"internalType": "uint32",
"name": "",
"type": "uint64"
"type": "uint32"
}
],
"stateMutability": "view",
Expand Down Expand Up @@ -47,14 +47,14 @@
"type": "address"
},
{
"internalType": "contract IOptimismPortal2",
"name": "_portal",
"internalType": "contract IL1CrossDomainMessenger",
"name": "_messenger",
"type": "address"
},
{
"internalType": "uint64",
"internalType": "uint32",
"name": "_gasLimit",
"type": "uint64"
"type": "uint32"
}
],
"name": "initialize",
Expand All @@ -77,25 +77,25 @@
},
{
"inputs": [],
"name": "minDepositAmount",
"name": "messenger",
"outputs": [
{
"internalType": "uint96",
"internalType": "contract IL1CrossDomainMessenger",
"name": "",
"type": "uint96"
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "portal",
"name": "minDepositAmount",
"outputs": [
{
"internalType": "contract IOptimismPortal2",
"internalType": "uint96",
"name": "",
"type": "address"
"type": "uint96"
}
],
"stateMutability": "view",
Expand Down Expand Up @@ -130,9 +130,9 @@
{
"inputs": [
{
"internalType": "uint64",
"internalType": "uint32",
"name": "_newGasLimit",
"type": "uint64"
"type": "uint32"
}
],
"name": "setGasLimit",
Expand Down Expand Up @@ -228,15 +228,15 @@
"inputs": [
{
"indexed": false,
"internalType": "uint64",
"internalType": "uint32",
"name": "oldGasLimit",
"type": "uint64"
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint64",
"internalType": "uint32",
"name": "newGasLimit",
"type": "uint64"
"type": "uint32"
}
],
"name": "GasLimitUpdated",
Expand Down
25 changes: 10 additions & 15 deletions packages/contracts-bedrock/snapshots/abi/L1Withdrawer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"type": "address"
},
{
"internalType": "uint96",
"internalType": "uint32",
"name": "_withdrawalGasLimit",
"type": "uint96"
"type": "uint32"
}
],
"stateMutability": "nonpayable",
Expand Down Expand Up @@ -79,9 +79,9 @@
{
"inputs": [
{
"internalType": "uint96",
"internalType": "uint32",
"name": "_newWithdrawalGasLimit",
"type": "uint96"
"type": "uint32"
}
],
"name": "setWithdrawalGasLimit",
Expand All @@ -107,9 +107,9 @@
"name": "withdrawalGasLimit",
"outputs": [
{
"internalType": "uint96",
"internalType": "uint32",
"name": "",
"type": "uint96"
"type": "uint32"
}
],
"stateMutability": "view",
Expand Down Expand Up @@ -183,15 +183,15 @@
"inputs": [
{
"indexed": false,
"internalType": "uint96",
"internalType": "uint32",
"name": "oldWithdrawalGasLimit",
"type": "uint96"
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint96",
"internalType": "uint32",
"name": "newWithdrawalGasLimit",
"type": "uint96"
"type": "uint32"
}
],
"name": "WithdrawalGasLimitUpdated",
Expand Down Expand Up @@ -220,10 +220,5 @@
"inputs": [],
"name": "L1Withdrawer_OnlyProxyAdminOwner",
"type": "error"
},
{
"inputs": [],
"name": "L1Withdrawer_WithdrawalGasLimitTooLow",
"type": "error"
}
]
8 changes: 4 additions & 4 deletions packages/contracts-bedrock/snapshots/semver-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"sourceCodeHash": "0x6c9d3e2dee44c234d59ab93b6564536dfd807f1c4a02a82d5393bc53cb15b8b7"
},
"src/L1/FeesDepositor.sol:FeesDepositor": {
"initCodeHash": "0x3b1acae6460e04be9a855a24de87524f19827239da08f05934c3dd6183a8b5c5",
"sourceCodeHash": "0x613dc957e3bb409d1c7fb767971308b9cb1ed3c953407c8c641a6ec2bbf42fe8"
"initCodeHash": "0xe52c51805cfd55967d037173159f18aaf4344e32e5c8ad41f8d5d0025b1d36a8",
"sourceCodeHash": "0xe5f2b1915a201c0b8a107f168f5b9bc8aec8e8e95f938082e42ba5b5c8ebbd11"
},
"src/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger": {
"initCodeHash": "0x3dc659aafb03bd357f92abfc6794af89ee0ddd5212364551637422bf8d0b00f9",
Expand Down Expand Up @@ -84,8 +84,8 @@
"sourceCodeHash": "0x2e85139090b9072e368a5ff36e5fcf2a90b219c6024e06a7998904cd75412395"
},
"src/L2/L1Withdrawer.sol:L1Withdrawer": {
"initCodeHash": "0xb25010651e421d159204b9c9d3ae3d3569e57de82eabcff6a1d2560a21b88a82",
"sourceCodeHash": "0xde60d5d9f89f6c1195b11e21b2c3287afaa756a749c052530b76f26b4cdf6c0a"
"initCodeHash": "0x91e0be0d49636212678191c06b9b6840c399f08ad946bc7b52f24231691be28b",
"sourceCodeHash": "0x25422bdaf51d611c1688a835737368c0ff2ab639dac852af8a20ebb4e16fc103"
},
"src/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger": {
"initCodeHash": "0xe160be403df12709c371c33195d1b9c3b5e9499e902e86bdabc8eed749c3fd61",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
},
{
"bytes": "20",
"label": "portal",
"label": "messenger",
"offset": 2,
"slot": "0",
"type": "contract IOptimismPortal2"
"type": "contract IL1CrossDomainMessenger"
},
{
"bytes": "12",
Expand All @@ -35,10 +35,10 @@
"type": "address"
},
{
"bytes": "8",
"bytes": "4",
"label": "gasLimit",
"offset": 0,
"slot": "2",
"type": "uint64"
"type": "uint32"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"type": "address"
},
{
"bytes": "12",
"bytes": "4",
"label": "withdrawalGasLimit",
"offset": 20,
"slot": "1",
"type": "uint96"
"type": "uint32"
}
]
Loading