Commit b460aa27 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

contracts-bedrock: cleanup `FeeVault` (#12338)

* contracts-bedrock: cleanup `FeeVault`

Updates the `FeeVault` to follow modern conventions used in the repo
by moving to usage of interfaces rather than implementations. Also
moves the `FeeVault` into the `L2` package as its only really useful
on L2. This is meant to reduce the diff for the Stanard L2 Genesis
by breaking up the refactor into its own small PR.

* contracts: update semver-lock

* semver-lock: fixup

* cleanup: refactor

* lint: fix

* snapshots: regenerate

* interface check: ignore fee vaults

There is an issue with normalization of enums when they are return
values
parent 981ee6ac
...@@ -20,12 +20,12 @@ import { BaseFeeVault } from "src/L2/BaseFeeVault.sol"; ...@@ -20,12 +20,12 @@ import { BaseFeeVault } from "src/L2/BaseFeeVault.sol";
import { L1FeeVault } from "src/L2/L1FeeVault.sol"; import { L1FeeVault } from "src/L2/L1FeeVault.sol";
import { OptimismSuperchainERC20Beacon } from "src/L2/OptimismSuperchainERC20Beacon.sol"; import { OptimismSuperchainERC20Beacon } from "src/L2/OptimismSuperchainERC20Beacon.sol";
import { OptimismMintableERC721Factory } from "src/universal/OptimismMintableERC721Factory.sol"; import { OptimismMintableERC721Factory } from "src/universal/OptimismMintableERC721Factory.sol";
import { FeeVault } from "src/universal/FeeVault.sol";
import { GovernanceToken } from "src/governance/GovernanceToken.sol"; import { GovernanceToken } from "src/governance/GovernanceToken.sol";
// Libraries // Libraries
import { Predeploys } from "src/libraries/Predeploys.sol"; import { Predeploys } from "src/libraries/Predeploys.sol";
import { Preinstalls } from "src/libraries/Preinstalls.sol"; import { Preinstalls } from "src/libraries/Preinstalls.sol";
import { Types } from "src/libraries/Types.sol";
// Interfaces // Interfaces
import { IOptimismMintableERC20Factory } from "src/universal/interfaces/IOptimismMintableERC20Factory.sol"; import { IOptimismMintableERC20Factory } from "src/universal/interfaces/IOptimismMintableERC20Factory.sol";
...@@ -344,7 +344,7 @@ contract L2Genesis is Deployer { ...@@ -344,7 +344,7 @@ contract L2Genesis is Deployer {
SequencerFeeVault vault = new SequencerFeeVault({ SequencerFeeVault vault = new SequencerFeeVault({
_recipient: cfg.sequencerFeeVaultRecipient(), _recipient: cfg.sequencerFeeVaultRecipient(),
_minWithdrawalAmount: cfg.sequencerFeeVaultMinimumWithdrawalAmount(), _minWithdrawalAmount: cfg.sequencerFeeVaultMinimumWithdrawalAmount(),
_withdrawalNetwork: FeeVault.WithdrawalNetwork(cfg.sequencerFeeVaultWithdrawalNetwork()) _withdrawalNetwork: Types.WithdrawalNetwork(cfg.sequencerFeeVaultWithdrawalNetwork())
}); });
address impl = Predeploys.predeployToCodeNamespace(Predeploys.SEQUENCER_FEE_WALLET); address impl = Predeploys.predeployToCodeNamespace(Predeploys.SEQUENCER_FEE_WALLET);
...@@ -428,7 +428,7 @@ contract L2Genesis is Deployer { ...@@ -428,7 +428,7 @@ contract L2Genesis is Deployer {
BaseFeeVault vault = new BaseFeeVault({ BaseFeeVault vault = new BaseFeeVault({
_recipient: cfg.baseFeeVaultRecipient(), _recipient: cfg.baseFeeVaultRecipient(),
_minWithdrawalAmount: cfg.baseFeeVaultMinimumWithdrawalAmount(), _minWithdrawalAmount: cfg.baseFeeVaultMinimumWithdrawalAmount(),
_withdrawalNetwork: FeeVault.WithdrawalNetwork(cfg.baseFeeVaultWithdrawalNetwork()) _withdrawalNetwork: Types.WithdrawalNetwork(cfg.baseFeeVaultWithdrawalNetwork())
}); });
address impl = Predeploys.predeployToCodeNamespace(Predeploys.BASE_FEE_VAULT); address impl = Predeploys.predeployToCodeNamespace(Predeploys.BASE_FEE_VAULT);
...@@ -445,7 +445,7 @@ contract L2Genesis is Deployer { ...@@ -445,7 +445,7 @@ contract L2Genesis is Deployer {
L1FeeVault vault = new L1FeeVault({ L1FeeVault vault = new L1FeeVault({
_recipient: cfg.l1FeeVaultRecipient(), _recipient: cfg.l1FeeVaultRecipient(),
_minWithdrawalAmount: cfg.l1FeeVaultMinimumWithdrawalAmount(), _minWithdrawalAmount: cfg.l1FeeVaultMinimumWithdrawalAmount(),
_withdrawalNetwork: FeeVault.WithdrawalNetwork(cfg.l1FeeVaultWithdrawalNetwork()) _withdrawalNetwork: Types.WithdrawalNetwork(cfg.l1FeeVaultWithdrawalNetwork())
}); });
address impl = Predeploys.predeployToCodeNamespace(Predeploys.L1_FEE_VAULT); address impl = Predeploys.predeployToCodeNamespace(Predeploys.L1_FEE_VAULT);
......
...@@ -75,6 +75,12 @@ EXCLUDE_CONTRACTS=( ...@@ -75,6 +75,12 @@ EXCLUDE_CONTRACTS=(
"ICrossL2Inbox" "ICrossL2Inbox"
"ISystemConfigInterop" "ISystemConfigInterop"
# Enums need to be normalized
"ISequencerFeeVault"
"IBaseFeeVault"
"IL1FeeVault"
"IFeeVault"
# Solidity complains about receive but contract doens't have it. # Solidity complains about receive but contract doens't have it.
"IResolvedDelegateProxy" "IResolvedDelegateProxy"
) )
......
...@@ -5,7 +5,7 @@ import { console } from "forge-std/console.sol"; ...@@ -5,7 +5,7 @@ import { console } from "forge-std/console.sol";
import { Script } from "forge-std/Script.sol"; import { Script } from "forge-std/Script.sol";
import { IMulticall3 } from "forge-std/interfaces/IMulticall3.sol"; import { IMulticall3 } from "forge-std/interfaces/IMulticall3.sol";
import { Predeploys } from "src/libraries/Predeploys.sol"; import { Predeploys } from "src/libraries/Predeploys.sol";
import { FeeVault } from "src/universal/FeeVault.sol"; import { IFeeVault } from "src/L2/interfaces/IFeeVault.sol";
/// @title FeeVaultWithdrawal /// @title FeeVaultWithdrawal
/// @notice A script to make it very simple to withdraw from the fee vaults. /// @notice A script to make it very simple to withdraw from the fee vaults.
...@@ -35,11 +35,11 @@ contract FeeVaultWithdrawal is Script { ...@@ -35,11 +35,11 @@ contract FeeVaultWithdrawal is Script {
IMulticall3.Call3({ IMulticall3.Call3({
target: vault, target: vault,
allowFailure: false, allowFailure: false,
callData: abi.encodeWithSelector(FeeVault.withdraw.selector) callData: abi.encodeWithSelector(IFeeVault.withdraw.selector)
}) })
); );
address recipient = FeeVault(payable(vault)).RECIPIENT(); address recipient = IFeeVault(payable(vault)).RECIPIENT();
uint256 balance = vault.balance; uint256 balance = vault.balance;
log(balance, recipient, vault); log(balance, recipient, vault);
} else { } else {
...@@ -59,7 +59,7 @@ contract FeeVaultWithdrawal is Script { ...@@ -59,7 +59,7 @@ contract FeeVaultWithdrawal is Script {
/// @notice Checks whether or not a FeeVault can be withdrawn. The balance of the account must /// @notice Checks whether or not a FeeVault can be withdrawn. The balance of the account must
/// be larger than the `MIN_WITHDRAWAL_AMOUNT`. /// be larger than the `MIN_WITHDRAWAL_AMOUNT`.
function canWithdrawal(address _vault) internal view returns (bool) { function canWithdrawal(address _vault) internal view returns (bool) {
uint256 minWithdrawalAmount = FeeVault(payable(_vault)).MIN_WITHDRAWAL_AMOUNT(); uint256 minWithdrawalAmount = IFeeVault(payable(_vault)).MIN_WITHDRAWAL_AMOUNT();
uint256 balance = _vault.balance; uint256 balance = _vault.balance;
return balance >= minWithdrawalAmount; return balance >= minWithdrawalAmount;
} }
......
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
"sourceCodeHash": "0x441d1e3e8e987f829f55996b5b6c850da8c59ad48f09cf7e0a69a1fa559d42a2" "sourceCodeHash": "0x441d1e3e8e987f829f55996b5b6c850da8c59ad48f09cf7e0a69a1fa559d42a2"
}, },
"src/L2/BaseFeeVault.sol": { "src/L2/BaseFeeVault.sol": {
"initCodeHash": "0x3bfcd57e25ad54b66c374f63e24e33a6cf107044aa8f5f69ef21202c380b5c5b", "initCodeHash": "0xbf49824cf37e201181484a8a423fcad8f504dc925921a2b28e83398197858dec",
"sourceCodeHash": "0x2dc2284cf7c68e743da50e4113e96ffeab435de2390aeba2eab2f1e8ca411ce9" "sourceCodeHash": "0x983e8e248c61e362ba6a01dd2e217a535c9bb828dc0b4421f5f27e0577f2e14c"
}, },
"src/L2/CrossL2Inbox.sol": { "src/L2/CrossL2Inbox.sol": {
"initCodeHash": "0x66b052adce7e9194d054952d67d08b53964120067600358243ec86c85b90877b", "initCodeHash": "0x66b052adce7e9194d054952d67d08b53964120067600358243ec86c85b90877b",
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
"sourceCodeHash": "0x7417677643e1df1ae1782513b94c7821097b9529d3f8626c3bcb8b3a9ae0d180" "sourceCodeHash": "0x7417677643e1df1ae1782513b94c7821097b9529d3f8626c3bcb8b3a9ae0d180"
}, },
"src/L2/L1FeeVault.sol": { "src/L2/L1FeeVault.sol": {
"initCodeHash": "0x3bfcd57e25ad54b66c374f63e24e33a6cf107044aa8f5f69ef21202c380b5c5b", "initCodeHash": "0xbf49824cf37e201181484a8a423fcad8f504dc925921a2b28e83398197858dec",
"sourceCodeHash": "0x927cc729bf5c9f209112df597f649493f276c4c50e17a57f7da02c2be266b192" "sourceCodeHash": "0xc7cda130f2bb3648e04d5a480082aa1789e16456c1280954d822b05d30100b2d"
}, },
"src/L2/L2CrossDomainMessenger.sol": { "src/L2/L2CrossDomainMessenger.sol": {
"initCodeHash": "0xcc4527d21cceeedbb3cbf8e7028e22fe12bc1ab30365dbebd0713499451b959d", "initCodeHash": "0xcc4527d21cceeedbb3cbf8e7028e22fe12bc1ab30365dbebd0713499451b959d",
...@@ -120,8 +120,8 @@ ...@@ -120,8 +120,8 @@
"sourceCodeHash": "0x155a4b22ff8e266560d1fae72e1db7fc164afd84b8a81afb74c69414e0d5438e" "sourceCodeHash": "0x155a4b22ff8e266560d1fae72e1db7fc164afd84b8a81afb74c69414e0d5438e"
}, },
"src/L2/SequencerFeeVault.sol": { "src/L2/SequencerFeeVault.sol": {
"initCodeHash": "0x2e6551705e493bacba8cffe22e564d5c401ae5bb02577a5424e0d32784e13e74", "initCodeHash": "0xcaadbf08057b5d47f7704257e9385a29e42a7a08c818646d109c5952d3d35218",
"sourceCodeHash": "0xd56922cb04597dea469c65e5a49d4b3c50c171e603601e6f41da9517cae0b11a" "sourceCodeHash": "0x05bbc6039e5a9ff38987e7b9b89c69e2ee8aa4b7ca20dd002ea1bbd3d70f27f3"
}, },
"src/L2/SuperchainWETH.sol": { "src/L2/SuperchainWETH.sol": {
"initCodeHash": "0x4ccd25f37a816205bc26f8532afa66e02f2b36ca7b7404d0fa48a4313ed16f0c", "initCodeHash": "0x4ccd25f37a816205bc26f8532afa66e02f2b36ca7b7404d0fa48a4313ed16f0c",
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"type": "uint256" "type": "uint256"
}, },
{ {
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "_withdrawalNetwork", "name": "_withdrawalNetwork",
"type": "uint8" "type": "uint8"
} }
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
"name": "WITHDRAWAL_NETWORK", "name": "WITHDRAWAL_NETWORK",
"outputs": [ "outputs": [
{ {
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "", "name": "",
"type": "uint8" "type": "uint8"
} }
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
"name": "withdrawalNetwork", "name": "withdrawalNetwork",
"outputs": [ "outputs": [
{ {
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "network_", "name": "network_",
"type": "uint8" "type": "uint8"
} }
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
}, },
{ {
"indexed": false, "indexed": false,
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork", "name": "withdrawalNetwork",
"type": "uint8" "type": "uint8"
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"type": "uint256" "type": "uint256"
}, },
{ {
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "_withdrawalNetwork", "name": "_withdrawalNetwork",
"type": "uint8" "type": "uint8"
} }
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
"name": "WITHDRAWAL_NETWORK", "name": "WITHDRAWAL_NETWORK",
"outputs": [ "outputs": [
{ {
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "", "name": "",
"type": "uint8" "type": "uint8"
} }
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
"name": "withdrawalNetwork", "name": "withdrawalNetwork",
"outputs": [ "outputs": [
{ {
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "network_", "name": "network_",
"type": "uint8" "type": "uint8"
} }
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
}, },
{ {
"indexed": false, "indexed": false,
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork", "name": "withdrawalNetwork",
"type": "uint8" "type": "uint8"
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"type": "uint256" "type": "uint256"
}, },
{ {
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "_withdrawalNetwork", "name": "_withdrawalNetwork",
"type": "uint8" "type": "uint8"
} }
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
"name": "WITHDRAWAL_NETWORK", "name": "WITHDRAWAL_NETWORK",
"outputs": [ "outputs": [
{ {
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "", "name": "",
"type": "uint8" "type": "uint8"
} }
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
"name": "withdrawalNetwork", "name": "withdrawalNetwork",
"outputs": [ "outputs": [
{ {
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "network_", "name": "network_",
"type": "uint8" "type": "uint8"
} }
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
}, },
{ {
"indexed": false, "indexed": false,
"internalType": "enum FeeVault.WithdrawalNetwork", "internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork", "name": "withdrawalNetwork",
"type": "uint8" "type": "uint8"
} }
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
pragma solidity 0.8.15; pragma solidity 0.8.15;
import { ISemver } from "src/universal/interfaces/ISemver.sol"; import { ISemver } from "src/universal/interfaces/ISemver.sol";
import { FeeVault } from "src/universal/FeeVault.sol"; import { FeeVault } from "src/L2/FeeVault.sol";
import { Types } from "src/libraries/Types.sol";
/// @custom:proxied true /// @custom:proxied true
/// @custom:predeploy 0x4200000000000000000000000000000000000019 /// @custom:predeploy 0x4200000000000000000000000000000000000019
...@@ -10,8 +12,8 @@ import { FeeVault } from "src/universal/FeeVault.sol"; ...@@ -10,8 +12,8 @@ import { FeeVault } from "src/universal/FeeVault.sol";
/// @notice The BaseFeeVault accumulates the base fee that is paid by transactions. /// @notice The BaseFeeVault accumulates the base fee that is paid by transactions.
contract BaseFeeVault is FeeVault, ISemver { contract BaseFeeVault is FeeVault, ISemver {
/// @notice Semantic version. /// @notice Semantic version.
/// @custom:semver 1.5.0-beta.2 /// @custom:semver 1.5.0-beta.3
string public constant version = "1.5.0-beta.2"; string public constant version = "1.5.0-beta.3";
/// @notice Constructs the BaseFeeVault contract. /// @notice Constructs the BaseFeeVault contract.
/// @param _recipient Wallet that will receive the fees. /// @param _recipient Wallet that will receive the fees.
...@@ -20,7 +22,7 @@ contract BaseFeeVault is FeeVault, ISemver { ...@@ -20,7 +22,7 @@ contract BaseFeeVault is FeeVault, ISemver {
constructor( constructor(
address _recipient, address _recipient,
uint256 _minWithdrawalAmount, uint256 _minWithdrawalAmount,
WithdrawalNetwork _withdrawalNetwork Types.WithdrawalNetwork _withdrawalNetwork
) )
FeeVault(_recipient, _minWithdrawalAmount, _withdrawalNetwork) FeeVault(_recipient, _minWithdrawalAmount, _withdrawalNetwork)
{ } { }
......
...@@ -8,18 +8,13 @@ import { Predeploys } from "src/libraries/Predeploys.sol"; ...@@ -8,18 +8,13 @@ import { Predeploys } from "src/libraries/Predeploys.sol";
// Interfaces // Interfaces
import { IL2ToL1MessagePasser } from "src/L2/interfaces/IL2ToL1MessagePasser.sol"; import { IL2ToL1MessagePasser } from "src/L2/interfaces/IL2ToL1MessagePasser.sol";
// Libraries
import { Types } from "src/libraries/Types.sol";
/// @title FeeVault /// @title FeeVault
/// @notice The FeeVault contract contains the basic logic for the various different vault contracts /// @notice The FeeVault contract contains the basic logic for the various different vault contracts
/// used to hold fee revenue generated by the L2 system. /// used to hold fee revenue generated by the L2 system.
abstract contract FeeVault { abstract contract FeeVault {
/// @notice Enum representing where the FeeVault withdraws funds to.
/// @custom:value L1 FeeVault withdraws funds to L1.
/// @custom:value L2 FeeVault withdraws funds to L2.
enum WithdrawalNetwork {
L1,
L2
}
/// @notice Minimum balance before a withdrawal can be triggered. /// @notice Minimum balance before a withdrawal can be triggered.
/// Use the `minWithdrawalAmount()` getter as this is deprecated /// Use the `minWithdrawalAmount()` getter as this is deprecated
/// and is subject to be removed in the future. /// and is subject to be removed in the future.
...@@ -36,7 +31,7 @@ abstract contract FeeVault { ...@@ -36,7 +31,7 @@ abstract contract FeeVault {
/// Use the `withdrawalNetwork()` getter as this is deprecated /// Use the `withdrawalNetwork()` getter as this is deprecated
/// and is subject to be removed in the future. /// and is subject to be removed in the future.
/// @custom:legacy /// @custom:legacy
WithdrawalNetwork public immutable WITHDRAWAL_NETWORK; Types.WithdrawalNetwork public immutable WITHDRAWAL_NETWORK;
/// @notice The minimum gas limit for the FeeVault withdrawal transaction. /// @notice The minimum gas limit for the FeeVault withdrawal transaction.
uint32 internal constant WITHDRAWAL_MIN_GAS = 400_000; uint32 internal constant WITHDRAWAL_MIN_GAS = 400_000;
...@@ -59,12 +54,12 @@ abstract contract FeeVault { ...@@ -59,12 +54,12 @@ abstract contract FeeVault {
/// @param to Address that the funds were sent to. /// @param to Address that the funds were sent to.
/// @param from Address that triggered the withdrawal. /// @param from Address that triggered the withdrawal.
/// @param withdrawalNetwork Network which the to address will receive funds on. /// @param withdrawalNetwork Network which the to address will receive funds on.
event Withdrawal(uint256 value, address to, address from, WithdrawalNetwork withdrawalNetwork); event Withdrawal(uint256 value, address to, address from, Types.WithdrawalNetwork withdrawalNetwork);
/// @param _recipient Wallet that will receive the fees. /// @param _recipient Wallet that will receive the fees.
/// @param _minWithdrawalAmount Minimum balance for withdrawals. /// @param _minWithdrawalAmount Minimum balance for withdrawals.
/// @param _withdrawalNetwork Network which the recipient will receive fees on. /// @param _withdrawalNetwork Network which the recipient will receive fees on.
constructor(address _recipient, uint256 _minWithdrawalAmount, WithdrawalNetwork _withdrawalNetwork) { constructor(address _recipient, uint256 _minWithdrawalAmount, Types.WithdrawalNetwork _withdrawalNetwork) {
RECIPIENT = _recipient; RECIPIENT = _recipient;
MIN_WITHDRAWAL_AMOUNT = _minWithdrawalAmount; MIN_WITHDRAWAL_AMOUNT = _minWithdrawalAmount;
WITHDRAWAL_NETWORK = _withdrawalNetwork; WITHDRAWAL_NETWORK = _withdrawalNetwork;
...@@ -84,7 +79,7 @@ abstract contract FeeVault { ...@@ -84,7 +79,7 @@ abstract contract FeeVault {
} }
/// @notice Network which the recipient will receive fees on. /// @notice Network which the recipient will receive fees on.
function withdrawalNetwork() public view returns (WithdrawalNetwork network_) { function withdrawalNetwork() public view returns (Types.WithdrawalNetwork network_) {
network_ = WITHDRAWAL_NETWORK; network_ = WITHDRAWAL_NETWORK;
} }
...@@ -101,7 +96,7 @@ abstract contract FeeVault { ...@@ -101,7 +96,7 @@ abstract contract FeeVault {
emit Withdrawal(value, RECIPIENT, msg.sender); emit Withdrawal(value, RECIPIENT, msg.sender);
emit Withdrawal(value, RECIPIENT, msg.sender, WITHDRAWAL_NETWORK); emit Withdrawal(value, RECIPIENT, msg.sender, WITHDRAWAL_NETWORK);
if (WITHDRAWAL_NETWORK == WithdrawalNetwork.L2) { if (WITHDRAWAL_NETWORK == Types.WithdrawalNetwork.L2) {
bool success = SafeCall.send(RECIPIENT, value); bool success = SafeCall.send(RECIPIENT, value);
require(success, "FeeVault: failed to send ETH to L2 fee recipient"); require(success, "FeeVault: failed to send ETH to L2 fee recipient");
} else { } else {
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
pragma solidity 0.8.15; pragma solidity 0.8.15;
import { ISemver } from "src/universal/interfaces/ISemver.sol"; import { ISemver } from "src/universal/interfaces/ISemver.sol";
import { FeeVault } from "src/universal/FeeVault.sol"; import { FeeVault } from "src/L2/FeeVault.sol";
import { Types } from "src/libraries/Types.sol";
/// @custom:proxied true /// @custom:proxied true
/// @custom:predeploy 0x420000000000000000000000000000000000001A /// @custom:predeploy 0x420000000000000000000000000000000000001A
...@@ -10,8 +12,8 @@ import { FeeVault } from "src/universal/FeeVault.sol"; ...@@ -10,8 +12,8 @@ import { FeeVault } from "src/universal/FeeVault.sol";
/// @notice The L1FeeVault accumulates the L1 portion of the transaction fees. /// @notice The L1FeeVault accumulates the L1 portion of the transaction fees.
contract L1FeeVault is FeeVault, ISemver { contract L1FeeVault is FeeVault, ISemver {
/// @notice Semantic version. /// @notice Semantic version.
/// @custom:semver 1.5.0-beta.2 /// @custom:semver 1.5.0-beta.3
string public constant version = "1.5.0-beta.2"; string public constant version = "1.5.0-beta.3";
/// @notice Constructs the L1FeeVault contract. /// @notice Constructs the L1FeeVault contract.
/// @param _recipient Wallet that will receive the fees. /// @param _recipient Wallet that will receive the fees.
...@@ -20,7 +22,7 @@ contract L1FeeVault is FeeVault, ISemver { ...@@ -20,7 +22,7 @@ contract L1FeeVault is FeeVault, ISemver {
constructor( constructor(
address _recipient, address _recipient,
uint256 _minWithdrawalAmount, uint256 _minWithdrawalAmount,
WithdrawalNetwork _withdrawalNetwork Types.WithdrawalNetwork _withdrawalNetwork
) )
FeeVault(_recipient, _minWithdrawalAmount, _withdrawalNetwork) FeeVault(_recipient, _minWithdrawalAmount, _withdrawalNetwork)
{ } { }
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
pragma solidity 0.8.15; pragma solidity 0.8.15;
import { ISemver } from "src/universal/interfaces/ISemver.sol"; import { ISemver } from "src/universal/interfaces/ISemver.sol";
import { FeeVault } from "src/universal/FeeVault.sol"; import { FeeVault } from "src/L2/FeeVault.sol";
import { Types } from "src/libraries/Types.sol";
/// @custom:proxied true /// @custom:proxied true
/// @custom:predeploy 0x4200000000000000000000000000000000000011 /// @custom:predeploy 0x4200000000000000000000000000000000000011
...@@ -10,8 +12,8 @@ import { FeeVault } from "src/universal/FeeVault.sol"; ...@@ -10,8 +12,8 @@ import { FeeVault } from "src/universal/FeeVault.sol";
/// @notice The SequencerFeeVault is the contract that holds any fees paid to the Sequencer during /// @notice The SequencerFeeVault is the contract that holds any fees paid to the Sequencer during
/// transaction processing and block production. /// transaction processing and block production.
contract SequencerFeeVault is FeeVault, ISemver { contract SequencerFeeVault is FeeVault, ISemver {
/// @custom:semver 1.5.0-beta.2 /// @custom:semver 1.5.0-beta.3
string public constant version = "1.5.0-beta.2"; string public constant version = "1.5.0-beta.3";
/// @notice Constructs the SequencerFeeVault contract. /// @notice Constructs the SequencerFeeVault contract.
/// @param _recipient Wallet that will receive the fees. /// @param _recipient Wallet that will receive the fees.
...@@ -20,7 +22,7 @@ contract SequencerFeeVault is FeeVault, ISemver { ...@@ -20,7 +22,7 @@ contract SequencerFeeVault is FeeVault, ISemver {
constructor( constructor(
address _recipient, address _recipient,
uint256 _minWithdrawalAmount, uint256 _minWithdrawalAmount,
WithdrawalNetwork _withdrawalNetwork Types.WithdrawalNetwork _withdrawalNetwork
) )
FeeVault(_recipient, _minWithdrawalAmount, _withdrawalNetwork) FeeVault(_recipient, _minWithdrawalAmount, _withdrawalNetwork)
{ } { }
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
import { IFeeVault } from "src/universal/interfaces/IFeeVault.sol"; library Types {
type WithdrawalNetwork is uint8;
}
interface IBaseFeeVault { interface IBaseFeeVault {
event Withdrawal(uint256 value, address to, address from); event Withdrawal(uint256 value, address to, address from);
event Withdrawal(uint256 value, address to, address from, IFeeVault.WithdrawalNetwork withdrawalNetwork); event Withdrawal(uint256 value, address to, address from, Types.WithdrawalNetwork withdrawalNetwork);
receive() external payable; receive() external payable;
function MIN_WITHDRAWAL_AMOUNT() external view returns (uint256); function MIN_WITHDRAWAL_AMOUNT() external view returns (uint256);
function RECIPIENT() external view returns (address); function RECIPIENT() external view returns (address);
function WITHDRAWAL_NETWORK() external view returns (IFeeVault.WithdrawalNetwork); function WITHDRAWAL_NETWORK() external view returns (Types.WithdrawalNetwork);
function minWithdrawalAmount() external view returns (uint256 amount_); function minWithdrawalAmount() external view returns (uint256 amount_);
function recipient() external view returns (address recipient_); function recipient() external view returns (address recipient_);
function totalProcessed() external view returns (uint256); function totalProcessed() external view returns (uint256);
function withdraw() external; function withdraw() external;
function withdrawalNetwork() external view returns (IFeeVault.WithdrawalNetwork network_); function withdrawalNetwork() external view returns (Types.WithdrawalNetwork network_);
function version() external view returns (string memory); function version() external view returns (string memory);
function __constructor__( function __constructor__(
address _recipient, address _recipient,
uint256 _minWithdrawalAmount, uint256 _minWithdrawalAmount,
IFeeVault.WithdrawalNetwork _withdrawalNetwork Types.WithdrawalNetwork _withdrawalNetwork
) )
external; external;
} }
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
interface IFeeVault { library Types {
enum WithdrawalNetwork { type WithdrawalNetwork is uint8;
L1, }
L2
}
interface IFeeVault {
event Withdrawal(uint256 value, address to, address from); event Withdrawal(uint256 value, address to, address from);
event Withdrawal(uint256 value, address to, address from, WithdrawalNetwork withdrawalNetwork); event Withdrawal(uint256 value, address to, address from, Types.WithdrawalNetwork withdrawalNetwork);
receive() external payable; receive() external payable;
function MIN_WITHDRAWAL_AMOUNT() external view returns (uint256); function MIN_WITHDRAWAL_AMOUNT() external view returns (uint256);
function RECIPIENT() external view returns (address); function RECIPIENT() external view returns (address);
function WITHDRAWAL_NETWORK() external view returns (WithdrawalNetwork); function WITHDRAWAL_NETWORK() external view returns (Types.WithdrawalNetwork);
function minWithdrawalAmount() external view returns (uint256 amount_); function minWithdrawalAmount() external view returns (uint256 amount_);
function recipient() external view returns (address recipient_); function recipient() external view returns (address recipient_);
function totalProcessed() external view returns (uint256); function totalProcessed() external view returns (uint256);
function withdraw() external; function withdraw() external;
function withdrawalNetwork() external view returns (WithdrawalNetwork network_); function withdrawalNetwork() external view returns (Types.WithdrawalNetwork network_);
function __constructor__() external; function __constructor__() external;
} }
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
import { IFeeVault } from "src/universal/interfaces/IFeeVault.sol"; library Types {
type WithdrawalNetwork is uint8;
}
interface IL1FeeVault { interface IL1FeeVault {
event Withdrawal(uint256 value, address to, address from); event Withdrawal(uint256 value, address to, address from);
event Withdrawal(uint256 value, address to, address from, IFeeVault.WithdrawalNetwork withdrawalNetwork); event Withdrawal(uint256 value, address to, address from, Types.WithdrawalNetwork withdrawalNetwork);
receive() external payable; receive() external payable;
function MIN_WITHDRAWAL_AMOUNT() external view returns (uint256); function MIN_WITHDRAWAL_AMOUNT() external view returns (uint256);
function RECIPIENT() external view returns (address); function RECIPIENT() external view returns (address);
function WITHDRAWAL_NETWORK() external view returns (IFeeVault.WithdrawalNetwork); function WITHDRAWAL_NETWORK() external view returns (Types.WithdrawalNetwork);
function minWithdrawalAmount() external view returns (uint256 amount_); function minWithdrawalAmount() external view returns (uint256 amount_);
function recipient() external view returns (address recipient_); function recipient() external view returns (address recipient_);
function totalProcessed() external view returns (uint256); function totalProcessed() external view returns (uint256);
function withdraw() external; function withdraw() external;
function withdrawalNetwork() external view returns (IFeeVault.WithdrawalNetwork network_); function withdrawalNetwork() external view returns (Types.WithdrawalNetwork network_);
function version() external view returns (string memory); function version() external view returns (string memory);
function __constructor__( function __constructor__(
address _recipient, address _recipient,
uint256 _minWithdrawalAmount, uint256 _minWithdrawalAmount,
IFeeVault.WithdrawalNetwork _withdrawalNetwork Types.WithdrawalNetwork _withdrawalNetwork
) )
external; external;
} }
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
import { IFeeVault } from "src/universal/interfaces/IFeeVault.sol"; library Types {
type WithdrawalNetwork is uint8;
}
interface ISequencerFeeVault { interface ISequencerFeeVault {
event Withdrawal(uint256 value, address to, address from); event Withdrawal(uint256 value, address to, address from);
event Withdrawal(uint256 value, address to, address from, IFeeVault.WithdrawalNetwork withdrawalNetwork); event Withdrawal(uint256 value, address to, address from, Types.WithdrawalNetwork withdrawalNetwork);
receive() external payable; receive() external payable;
function MIN_WITHDRAWAL_AMOUNT() external view returns (uint256); function MIN_WITHDRAWAL_AMOUNT() external view returns (uint256);
function RECIPIENT() external view returns (address); function RECIPIENT() external view returns (address);
function WITHDRAWAL_NETWORK() external view returns (IFeeVault.WithdrawalNetwork); function WITHDRAWAL_NETWORK() external view returns (Types.WithdrawalNetwork);
function minWithdrawalAmount() external view returns (uint256 amount_); function minWithdrawalAmount() external view returns (uint256 amount_);
function recipient() external view returns (address recipient_); function recipient() external view returns (address recipient_);
function totalProcessed() external view returns (uint256); function totalProcessed() external view returns (uint256);
function withdraw() external; function withdraw() external;
function withdrawalNetwork() external view returns (IFeeVault.WithdrawalNetwork network_); function withdrawalNetwork() external view returns (Types.WithdrawalNetwork network_);
function version() external view returns (string memory); function version() external view returns (string memory);
function l1FeeWallet() external view returns (address); function l1FeeWallet() external view returns (address);
...@@ -24,7 +26,7 @@ interface ISequencerFeeVault { ...@@ -24,7 +26,7 @@ interface ISequencerFeeVault {
function __constructor__( function __constructor__(
address _recipient, address _recipient,
uint256 _minWithdrawalAmount, uint256 _minWithdrawalAmount,
IFeeVault.WithdrawalNetwork _withdrawalNetwork Types.WithdrawalNetwork _withdrawalNetwork
) )
external; external;
} }
...@@ -67,4 +67,12 @@ library Types { ...@@ -67,4 +67,12 @@ library Types {
uint256 gasLimit; uint256 gasLimit;
bytes data; bytes data;
} }
/// @notice Enum representing where the FeeVault withdraws funds to.
/// @custom:value L1 FeeVault withdraws funds to L1.
/// @custom:value L2 FeeVault withdraws funds to L2.
enum WithdrawalNetwork {
L1,
L2
}
} }
...@@ -4,28 +4,19 @@ pragma solidity 0.8.15; ...@@ -4,28 +4,19 @@ pragma solidity 0.8.15;
// Testing utilities // Testing utilities
import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol";
// Target contract // Libraries
import { FeeVault } from "src/universal/FeeVault.sol"; import { Types } from "src/libraries/Types.sol";
import { Types as ITypes } from "src/L2/interfaces/IBaseFeeVault.sol";
// Test the implementations of the FeeVault // Test the implementations of the FeeVault
contract FeeVault_Test is Bridge_Initializer { contract FeeVault_Test is Bridge_Initializer {
/// @dev Tests that the constructor sets the correct values.
function test_constructor_l1FeeVault_succeeds() external view {
assertEq(l1FeeVault.RECIPIENT(), deploy.cfg().l1FeeVaultRecipient());
assertEq(l1FeeVault.recipient(), deploy.cfg().l1FeeVaultRecipient());
assertEq(l1FeeVault.MIN_WITHDRAWAL_AMOUNT(), deploy.cfg().l1FeeVaultMinimumWithdrawalAmount());
assertEq(l1FeeVault.minWithdrawalAmount(), deploy.cfg().l1FeeVaultMinimumWithdrawalAmount());
assertEq(uint8(l1FeeVault.WITHDRAWAL_NETWORK()), uint8(FeeVault.WithdrawalNetwork.L1));
assertEq(uint8(l1FeeVault.withdrawalNetwork()), uint8(FeeVault.WithdrawalNetwork.L1));
}
/// @dev Tests that the constructor sets the correct values. /// @dev Tests that the constructor sets the correct values.
function test_constructor_baseFeeVault_succeeds() external view { function test_constructor_baseFeeVault_succeeds() external view {
assertEq(baseFeeVault.RECIPIENT(), deploy.cfg().baseFeeVaultRecipient()); assertEq(baseFeeVault.RECIPIENT(), deploy.cfg().baseFeeVaultRecipient());
assertEq(baseFeeVault.recipient(), deploy.cfg().baseFeeVaultRecipient()); assertEq(baseFeeVault.recipient(), deploy.cfg().baseFeeVaultRecipient());
assertEq(baseFeeVault.MIN_WITHDRAWAL_AMOUNT(), deploy.cfg().baseFeeVaultMinimumWithdrawalAmount()); assertEq(baseFeeVault.MIN_WITHDRAWAL_AMOUNT(), deploy.cfg().baseFeeVaultMinimumWithdrawalAmount());
assertEq(baseFeeVault.minWithdrawalAmount(), deploy.cfg().baseFeeVaultMinimumWithdrawalAmount()); assertEq(baseFeeVault.minWithdrawalAmount(), deploy.cfg().baseFeeVaultMinimumWithdrawalAmount());
assertEq(uint8(baseFeeVault.WITHDRAWAL_NETWORK()), uint8(FeeVault.WithdrawalNetwork.L1)); assertEq(ITypes.WithdrawalNetwork.unwrap(baseFeeVault.WITHDRAWAL_NETWORK()), uint8(Types.WithdrawalNetwork.L1));
assertEq(uint8(baseFeeVault.withdrawalNetwork()), uint8(FeeVault.WithdrawalNetwork.L1)); assertEq(ITypes.WithdrawalNetwork.unwrap(baseFeeVault.withdrawalNetwork()), uint8(Types.WithdrawalNetwork.L1));
} }
} }
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
// Testing utilities
import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol";
// Libraries
import { Types } from "src/libraries/Types.sol";
import { Types as ITypes } from "src/L2/interfaces/IL1FeeVault.sol";
// Test the implementations of the FeeVault
contract FeeVault_Test is Bridge_Initializer {
/// @dev Tests that the constructor sets the correct values.
function test_constructor_l1FeeVault_succeeds() external view {
assertEq(l1FeeVault.RECIPIENT(), deploy.cfg().l1FeeVaultRecipient());
assertEq(l1FeeVault.recipient(), deploy.cfg().l1FeeVaultRecipient());
assertEq(l1FeeVault.MIN_WITHDRAWAL_AMOUNT(), deploy.cfg().l1FeeVaultMinimumWithdrawalAmount());
assertEq(l1FeeVault.minWithdrawalAmount(), deploy.cfg().l1FeeVaultMinimumWithdrawalAmount());
assertEq(ITypes.WithdrawalNetwork.unwrap(l1FeeVault.WITHDRAWAL_NETWORK()), uint8(Types.WithdrawalNetwork.L1));
assertEq(ITypes.WithdrawalNetwork.unwrap(l1FeeVault.withdrawalNetwork()), uint8(Types.WithdrawalNetwork.L1));
}
}
...@@ -7,13 +7,13 @@ import { Reverter } from "test/mocks/Callers.sol"; ...@@ -7,13 +7,13 @@ import { Reverter } from "test/mocks/Callers.sol";
import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol"; import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol";
// Contracts // Contracts
import { FeeVault } from "src/universal/FeeVault.sol";
import { SequencerFeeVault } from "src/L2/SequencerFeeVault.sol"; import { SequencerFeeVault } from "src/L2/SequencerFeeVault.sol";
// Libraries // Libraries
import { Hashing } from "src/libraries/Hashing.sol"; import { Hashing } from "src/libraries/Hashing.sol";
import { Types } from "src/libraries/Types.sol"; import { Types } from "src/libraries/Types.sol";
import { Predeploys } from "src/libraries/Predeploys.sol"; import { Predeploys } from "src/libraries/Predeploys.sol";
import { Types as ITypes } from "src/L2/interfaces/ISequencerFeeVault.sol";
contract SequencerFeeVault_Test is CommonTest { contract SequencerFeeVault_Test is CommonTest {
address recipient; address recipient;
...@@ -31,8 +31,12 @@ contract SequencerFeeVault_Test is CommonTest { ...@@ -31,8 +31,12 @@ contract SequencerFeeVault_Test is CommonTest {
assertEq(sequencerFeeVault.recipient(), recipient); assertEq(sequencerFeeVault.recipient(), recipient);
assertEq(sequencerFeeVault.MIN_WITHDRAWAL_AMOUNT(), deploy.cfg().sequencerFeeVaultMinimumWithdrawalAmount()); assertEq(sequencerFeeVault.MIN_WITHDRAWAL_AMOUNT(), deploy.cfg().sequencerFeeVaultMinimumWithdrawalAmount());
assertEq(sequencerFeeVault.minWithdrawalAmount(), deploy.cfg().sequencerFeeVaultMinimumWithdrawalAmount()); assertEq(sequencerFeeVault.minWithdrawalAmount(), deploy.cfg().sequencerFeeVaultMinimumWithdrawalAmount());
assertEq(uint8(sequencerFeeVault.WITHDRAWAL_NETWORK()), uint8(FeeVault.WithdrawalNetwork.L1)); assertEq(
assertEq(uint8(sequencerFeeVault.withdrawalNetwork()), uint8(FeeVault.WithdrawalNetwork.L1)); ITypes.WithdrawalNetwork.unwrap(sequencerFeeVault.WITHDRAWAL_NETWORK()), uint8(Types.WithdrawalNetwork.L1)
);
assertEq(
ITypes.WithdrawalNetwork.unwrap(sequencerFeeVault.withdrawalNetwork()), uint8(Types.WithdrawalNetwork.L1)
);
} }
/// @dev Tests that the fee vault is able to receive ETH. /// @dev Tests that the fee vault is able to receive ETH.
...@@ -66,7 +70,7 @@ contract SequencerFeeVault_Test is CommonTest { ...@@ -66,7 +70,7 @@ contract SequencerFeeVault_Test is CommonTest {
vm.expectEmit(address(Predeploys.SEQUENCER_FEE_WALLET)); vm.expectEmit(address(Predeploys.SEQUENCER_FEE_WALLET));
emit Withdrawal(address(sequencerFeeVault).balance, recipient, address(this)); emit Withdrawal(address(sequencerFeeVault).balance, recipient, address(this));
vm.expectEmit(address(Predeploys.SEQUENCER_FEE_WALLET)); vm.expectEmit(address(Predeploys.SEQUENCER_FEE_WALLET));
emit Withdrawal(address(sequencerFeeVault).balance, recipient, address(this), FeeVault.WithdrawalNetwork.L1); emit Withdrawal(address(sequencerFeeVault).balance, recipient, address(this), Types.WithdrawalNetwork.L1);
// The entire vault's balance is withdrawn // The entire vault's balance is withdrawn
vm.expectCall(Predeploys.L2_TO_L1_MESSAGE_PASSER, address(sequencerFeeVault).balance, hex""); vm.expectCall(Predeploys.L2_TO_L1_MESSAGE_PASSER, address(sequencerFeeVault).balance, hex"");
...@@ -116,7 +120,7 @@ contract SequencerFeeVault_L2Withdrawal_Test is CommonTest { ...@@ -116,7 +120,7 @@ contract SequencerFeeVault_L2Withdrawal_Test is CommonTest {
new SequencerFeeVault( new SequencerFeeVault(
deploy.cfg().sequencerFeeVaultRecipient(), deploy.cfg().sequencerFeeVaultRecipient(),
deploy.cfg().sequencerFeeVaultMinimumWithdrawalAmount(), deploy.cfg().sequencerFeeVaultMinimumWithdrawalAmount(),
FeeVault.WithdrawalNetwork.L2 Types.WithdrawalNetwork.L2
) )
).code ).code
); );
...@@ -136,10 +140,7 @@ contract SequencerFeeVault_L2Withdrawal_Test is CommonTest { ...@@ -136,10 +140,7 @@ contract SequencerFeeVault_L2Withdrawal_Test is CommonTest {
emit Withdrawal(address(sequencerFeeVault).balance, sequencerFeeVault.RECIPIENT(), address(this)); emit Withdrawal(address(sequencerFeeVault).balance, sequencerFeeVault.RECIPIENT(), address(this));
vm.expectEmit(address(Predeploys.SEQUENCER_FEE_WALLET)); vm.expectEmit(address(Predeploys.SEQUENCER_FEE_WALLET));
emit Withdrawal( emit Withdrawal(
address(sequencerFeeVault).balance, address(sequencerFeeVault).balance, sequencerFeeVault.RECIPIENT(), address(this), Types.WithdrawalNetwork.L2
sequencerFeeVault.RECIPIENT(),
address(this),
FeeVault.WithdrawalNetwork.L2
); );
// The entire vault's balance is withdrawn // The entire vault's balance is withdrawn
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
import { FeeVault } from "src/universal/FeeVault.sol";
import { IDisputeGame } from "src/dispute/interfaces/IDisputeGame.sol"; import { IDisputeGame } from "src/dispute/interfaces/IDisputeGame.sol";
import "src/dispute/lib/Types.sol"; import "src/dispute/lib/Types.sol";
import { Types } from "src/libraries/Types.sol";
/// @title Events /// @title Events
/// @dev Contains various events that are tested against. This contract needs to /// @dev Contains various events that are tested against. This contract needs to
/// exist until we either modularize the implementations or use a newer version of /// exist until we either modularize the implementations or use a newer version of
...@@ -52,7 +53,7 @@ contract Events { ...@@ -52,7 +53,7 @@ contract Events {
event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex); event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex);
event Withdrawal(uint256 value, address to, address from); event Withdrawal(uint256 value, address to, address from);
event Withdrawal(uint256 value, address to, address from, FeeVault.WithdrawalNetwork withdrawalNetwork); event Withdrawal(uint256 value, address to, address from, Types.WithdrawalNetwork withdrawalNetwork);
event ETHDepositInitiated(address indexed from, address indexed to, uint256 amount, bytes data); event ETHDepositInitiated(address indexed from, address indexed to, uint256 amount, bytes data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment