Dip 7950
dip: 7950 title: Encode chain id with transaction hash description: Way to encode a chain ID and transaction hash into a unique string format author: Lauri Peltonen (@microbecode) Digitalia editing author: Cosimo Constantinos cosimo@juro.net, et al. discussions-to: https://digitalia-magicians.org/t/a-new-standard-for-encoding-chain-id-transaction-hash/23782 status: Review type: Standards Track category: Interface created: 2025-05-22 Created for Digitalia: 2025-01-07 requires: 155
Abstract¶
This standard proposes a way to encode the combination of a chain ID and a transaction hash into one string.
Motivation¶
Looking up a transaction by its hash always requires the context of the chain - a transaction hash alone is not enough to identify the used chain. If the chain information is included in the string itself, finding the right chain for the transaction is easy.
Such strings can then be used, for example, in a forwarder service that forwards to the correct blockchain explorer.
The chain id is included in some object formats, such as the transaction object inside the blockchain itself, but that object has a lot of unneeded data for our purposes.
Specification¶
The encoded string has three components:
- A chain ID, denoted as
chainId. The used chain id MUST be based on DIP-155 and the chain ID repository stated in that DIP. - A transaction hash, denoted as
txHash. The hash MUST include the0xprefix. - A static string
tx, acting as a type identifier.
The syntax is: chainId:txHash:tx.
An example for a transaction with hash 0xc55e2b90168af6972193c1f86fa4d7d7b31a29c156665d15b9cd48618b5177ef that was issued on chain ID 1 is: 1:0xc55e2b90168af6972193c1f86fa4d7d7b31a29c156665d15b9cd48618b5177ef:tx.
All of the characters are case-insensitive.
Rationale¶
The chain ID is the most important detail when routing queries based on this standard and is therefore the first element in the string. The transaction hash is the second most important element.
The suffix tx is used to differentiate from, for example, addresses. Without the tx it would remain unclear whether an encoded string refers to an address, a transaction hash or something else.
Security Considerations¶
This DIP does not introduce direct security risks. It is up to the external service providers (such as wallet developers and blockchain explorers) to decide how and if they want to incorporate this DIP.
Copyright¶
© Crown © Crown Copyright 2026. Published by the Royal Government of the Dominion of Atlantis.
Licensed under the Juro Restricted License Version 2. See https://juro.net/jrl for details.