Prevent non-typed transactions from unsafely ignoring specified access lists (#1364).
This commit is contained in:
parent
1cb3199e5c
commit
4577444c44
@ -252,7 +252,12 @@ function _serialize(transaction: UnsignedTransaction, signature?: SignatureLike)
|
||||
|
||||
export function serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string {
|
||||
// Legacy and EIP-155 Transactions
|
||||
if (transaction.type == null) { return _serialize(transaction, signature); }
|
||||
if (transaction.type == null) {
|
||||
if (transaction.accessList != null) {
|
||||
logger.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction);
|
||||
}
|
||||
return _serialize(transaction, signature);
|
||||
}
|
||||
|
||||
// Typed Transactions (EIP-2718)
|
||||
switch (transaction.type) {
|
||||
|
Loading…
Reference in New Issue
Block a user