-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(protocol): make custom errors in L1 libs a part of the `TaikoL1.…
…sol`'s ABI (#13166)
- Loading branch information
1 parent
feb7b28
commit 2943e3e
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// SPDX-License-Identifier: MIT | ||
// _____ _ _ _ _ | ||
// |_ _|_ _(_) |_____ | | __ _| |__ ___ | ||
// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< | ||
// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ | ||
|
||
pragma solidity ^0.8.9; | ||
|
||
/// @author david <[email protected]> | ||
abstract contract TaikoCustomErrors { | ||
// The following custom errors must match the definitions in other V1 libraries. | ||
error L1_0_FEE_BASE(); | ||
error L1_ANCHOR_CALLDATA(); | ||
error L1_ANCHOR_DEST(); | ||
error L1_ANCHOR_GAS_LIMIT(); | ||
error L1_ANCHOR_RECEIPT_ADDR(); | ||
error L1_ANCHOR_RECEIPT_DATA(); | ||
error L1_ANCHOR_RECEIPT_LOGS(); | ||
error L1_ANCHOR_RECEIPT_PROOF(); | ||
error L1_ANCHOR_RECEIPT_STATUS(); | ||
error L1_ANCHOR_RECEIPT_TOPICS(); | ||
error L1_ANCHOR_SIG_R(); | ||
error L1_ANCHOR_SIG_S(); | ||
error L1_ANCHOR_TYPE(); | ||
error L1_BLOCK_NUMBER(); | ||
error L1_CANNOT_BE_FIRST_PROVER(); | ||
error L1_CIRCUIT_LENGTH(); | ||
error L1_COMMITTED(); | ||
error L1_CONFLICT_PROOF(); | ||
error L1_DUP_PROVERS(); | ||
error L1_EXTRA_DATA(); | ||
error L1_GAS_LIMIT(); | ||
error L1_HALTED(); | ||
error L1_HALT_CONDITION(); | ||
error L1_ID(); | ||
error L1_INPUT_SIZE(); | ||
error L1_METADATA_FIELD(); | ||
error L1_META_MISMATCH(); | ||
error L1_NOT_COMMITTED(); | ||
error L1_NOT_FIRST_PROVER(); | ||
error L1_PROOF_LENGTH(); | ||
error L1_PROVER(); | ||
error L1_SOLO_PROPOSER(); | ||
error L1_TOO_LATE(); | ||
error L1_TOO_MANY(); | ||
error L1_TOO_MANY_PROVERS(); | ||
error L1_TX_LIST(); | ||
error L1_ZKP(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ import "../libs/LibAnchorSignature.sol"; | |
import "../libs/LibSharedConfig.sol"; | ||
import "./TaikoData.sol"; | ||
import "./TaikoEvents.sol"; | ||
import "./TaikoCustomErrors.sol"; | ||
import "./libs/LibProposing.sol"; | ||
import "./libs/LibProving.sol"; | ||
import "./libs/LibUtils.sol"; | ||
|
@@ -20,7 +21,12 @@ import "./libs/LibVerifying.sol"; | |
/** | ||
* @author dantaik <[email protected]> | ||
*/ | ||
contract TaikoL1 is EssentialContract, IHeaderSync, TaikoEvents { | ||
contract TaikoL1 is | ||
EssentialContract, | ||
IHeaderSync, | ||
TaikoEvents, | ||
TaikoCustomErrors | ||
{ | ||
using LibUtils for TaikoData.State; | ||
|
||
TaikoData.State public state; | ||
|