Skip to content

Type 4 (EIP4337/ERC4337) not supported by etherjs v6 #4968

Open
@kopax

Description

@kopax

Describe the Feature

On Binance Smart Chain, I can now see new type of transaction, type 4.

This type was added recently after their latest fork: https://www.binance.com/en/square/post/03-07-2025-bnb-chain-3-20-pascal-21231944846273

This is the spec for type 4 : https://www.erc4337.io/docs

Since this type is not yet implemented, etherjs v6 will throw errors here:

assertArgument(false, "unsupported transaction type", "type", value);

Code Example

Example of transaction type 4 on BSC mainnet:

{
  "_type": "TransactionResponse",
  "accessList": [],
  "blockNumber": 47800830,
  "blockHash": "0x58deb47eae6a0211b837e35ff47a846724e3d205b8536a6fa98e9f03d7e45515",
  "blobVersionedHashes": null,
  "chainId": "56",
  "data": "0x",
  "from": "0x0c0C540895481084639Cd315e966BABcddb76777",
  "gasLimit": "1000000",
  "gasPrice": "1100000000",
  "hash": "0x94891985bbe85fd89c4f3fbf6a98ee18197d292c3d5e034477b9a4c44fe32cd3",
  "maxFeePerGas": "1100000000",
  "maxPriorityFeePerGas": "1100000000",
  "maxFeePerBlobGas": null,
  "nonce": 6643,
  "signature": {
    "_type": "signature",
    "networkV": null,
    "r": "0xbf78f482c34952c1e35d9f10a9995f4c34494b60dcce56ba651dad9e41e8278a",
    "s": "0x77c260be2e8c19377d12f5d42b1e989164e493617298e3c8a951b2cb48d2b139",
    "v": 27
  },
  "to": "0x0c0C540895481084639Cd315e966BABcddb76777",
  "index": 142,
  "type": 4,
  "value": "0"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions