Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines ERC-7950, which proposes a string format for identifying a blockchain transaction together with the chain to which it belongs.

This article translates, summarizes, and supplements the material linked below.

I have also covered other EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.

Overview

ERC-7950 proposes encoding a chain ID and a transaction hash in a single string.

Blockchain transactions are usually referenced by their transaction hashes. However, the same transaction hash can exist on different chains, so the hash alone does not necessarily identify the chain on which a transaction occurred.

The proposal defines a way to encode the chain ID, which identifies the blockchain, alongside the transaction hash. A single string can therefore identify both the transaction and its chain.

Motivation

Looking up a transaction by its hash requires knowing which chain the transaction belongs to. For example, a transaction with the same hash could exist on both Ethereum and Polygon. The hash alone would not identify which chain is intended.

Combining chain information with the hash makes the relevant chain immediately identifiable. One application is a forwarding service that redirects users who click such an identifier to the appropriate blockchain explorer.

Transaction objects already contain chain information in applicable transaction formats, but they also include much more data than is needed for identification. A compact string containing only the necessary chain ID and transaction hash is therefore useful.

Specification

The encoded string defined by ERC-7950 consists of three elements. Together, they form an identifier for a transaction on a particular chain.

Element Description
chainId Chain ID defined according to EIP-155. It must be a value registered in the chain ID repository referenced by EIP-155.
txHash Transaction hash. The 0x prefix is required to indicate hexadecimal encoding.
tx The fixed string tx, a type identifier indicating that the string represents a transaction.

See the following article for EIP-155.

[EIP-155] Preventing Replay Attacks Across Ethereum Networks

Syntax

The encoded string follows this syntax.

text
chainId:txHash:tx

The elements are separated by colons (:) and ordered as chain ID, transaction hash, and type identifier.

Example

Consider the following transaction.

  • Chain ID: 1 (Ethereum Mainnet).
  • Transaction hash: 0xc55e2b90168af6972193c1f86fa4d7d7b31a29c156665d15b9cd48618b5177ef.

The corresponding encoded string is as follows.

text
1:0xc55e2b90168af6972193c1f86fa4d7d7b31a29c156665d15b9cd48618b5177ef:tx

This identifies both the chain and the transaction. Tools and services can use the format to recognize the relevant chain and transaction automatically.

Case Sensitivity

All characters are case-insensitive. The following two representations have the same meaning.

text
1:0xc55e2b90168af6972193c1f86fa4d7d7b31a29c156665d15b9cd48618b5177ef:tx
text
1:0XC55E2B90168AF6972193C1F86FA4D7D7B31A29C156665D15B9CD48618B5177EF:TX

This rule prevents inconsistent interpretation caused by letter case and helps maintain consistency across implementations and displays.

Additional Notes

ERC-7950 places the chain ID first because it is the most important information for routing queries. The chain ID identifies which blockchain contains the transaction.

In a multi-chain system, the chain must be identified before a transaction can be looked up or verified. Placing the chain ID first therefore facilitates parsing and routing to the appropriate destination.

The transaction hash comes next. It identifies the individual transaction within the chain. Combining it with a distinct chain ID produces an identifier for the transaction in that chain's context.

Finally, the fixed suffix tx explicitly identifies the string as a transaction reference. Without it, distinguishing similar structured strings, such as addresses or block identifiers, could be difficult.

The suffix serves as a type identifier, potentially allowing distinctions such as the following.

  • tx Represents a transaction.
  • addr Could represent an address if such an extension were introduced in the future. It is not defined by this proposal.

For example, consider the following string, which does not explicitly identify whether it represents an address, transaction, or another kind of data.

text
1:0xc55e2b90168af6972193c1f86fa4d7d7b31a29c156665d15b9cd48618b5177ef

Appending tx makes its intended meaning explicit.

text
1:0xc55e2b90168af6972193c1f86fa4d7d7b31a29c156665d15b9cd48618b5177ef:tx

The type suffix reduces ambiguity between systems and improves readability and safe interpretation.

Security

ERC-7950 defines a data representation rather than a security mechanism. It does not specify encryption, signatures, or access control and does not itself introduce a direct new security risk.

Security decisions and implementation details are left to external service providers, such as wallet developers and blockchain explorer operators. Each service must design and implement appropriate safeguards when processing these identifiers.

In other words, the standard neither provides authentication nor guarantees the safety of a referenced transaction. It supplies a consistent, readable identifier; secure processing remains the responsibility of each implementation.

Citation

Lauri Peltonen (@microbecode), "ERC-7950: Encode chain id with transaction hash," Ethereum Improvement Proposals, no. 7950, May 2025. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7950.

Conclusion

ERC-7950 provides a way to represent a transaction and its blockchain in a single string.

If you have questions, feel free to contact me on Twitter.

Twitter @cardene777

I also publish articles on the following platforms.

https://chaldene.net/