Skip to content

Commit 60c7ce5

Browse files
chore(clis/ethrex): update error mapper (#1832)
* add wildcard to SENDER_NOT_EOA exception regexp * update pending regex's * add GAS_ALLOWANCE_EXCEEDED exception * add TYPE_3_TX_BLOB_COUNT_EXCEEDED exception * style(cli): fix-up lint --------- Co-authored-by: danceratopz <danceratopz@gmail.com>
1 parent 0b8e140 commit 60c7ce5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/ethereum_clis/clis/ethrex.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ class EthrexExceptionMapper(ExceptionMapper):
2525
}
2626
mapping_regex = {
2727
TransactionException.PRIORITY_GREATER_THAN_MAX_FEE_PER_GAS: (
28-
r"(?i)priority fee is greater than max fee"
28+
r"(?i)priority fee.* is greater than max fee.*"
2929
),
3030
TransactionException.TYPE_4_EMPTY_AUTHORIZATION_LIST: r"(?i)empty authorization list",
3131
TransactionException.SENDER_NOT_EOA: (
3232
r"reject transactions from senders with deployed code|"
33-
r"Sender account shouldn't be a contract"
33+
r"Sender account .* shouldn't be a contract"
3434
),
3535
TransactionException.NONCE_MISMATCH_TOO_LOW: r"nonce \d+ too low, expected \d+|"
3636
r"Nonce mismatch.*",
@@ -69,11 +69,13 @@ class EthrexExceptionMapper(ExceptionMapper):
6969
),
7070
TransactionException.INSUFFICIENT_MAX_FEE_PER_BLOB_GAS: (
7171
r"blob gas price is greater than max fee per blob gas|"
72-
r"Insufficient max fee per blob gas"
72+
r"Insufficient max fee per blob gas.*"
7373
),
7474
TransactionException.INITCODE_SIZE_EXCEEDED: (
75-
r"create initcode size limit|Initcode size exceeded"
75+
r"create initcode size limit|Initcode size exceeded.*"
7676
),
77+
TransactionException.GAS_ALLOWANCE_EXCEEDED: (r"Gas allowance exceeded.*"),
78+
TransactionException.TYPE_3_TX_BLOB_COUNT_EXCEEDED: (r"Blob count exceeded.*"),
7779
BlockException.SYSTEM_CONTRACT_CALL_FAILED: (r"System call failed.*"),
7880
BlockException.SYSTEM_CONTRACT_EMPTY: (r"System contract:.* has no code after deployment"),
7981
BlockException.INCORRECT_BLOB_GAS_USED: (r"Blob gas used doesn't match value in header"),

0 commit comments

Comments
 (0)