Hey, I have been working on cross-blockchain migration and backup. I have figured out that a generic brick is missing to specify a generic way to archive event from one blockchain to another. I think that it could be a great fit for a new ERC.
I have drafted an ERC proposal and I would like to have insights from the community. Thank you for your help
!
ERC PR : Not done
ERC-XXXX: Cross-Chain Event Archive
Abstract
This ERC defines a standard interface for archiving events from any blockchain (EVM or non-EVM) to an EVM-compatible chain, enabling indexers / off-chain applications to ingest cross-chain event history through a consistent and minimal envelope.
Motivation
As the blockchain ecosystem fragments across L2s, sidechains, and non-EVM chains, protocols increasingly need historical event data to be accessible across chains. Real-world asset (RWA) protocols, for example, must maintain a complete, auditable history of all on-chain events — token transfers, compliance attestations, NAV updates — across every chain where their assets are issued or traded.
Currently, there is no standard way to archive events from a source chain to a destination chain. This standard defines a minimal, universal envelope that:
-
Preserves full provenance of the original event
-
Supports both EVM and non-EVM source chains
-
Requires no knowledge of the source ABI to ingest
Specification
Event
interface IEventArchive {
/// @notice Emitted when an event from a source chain is archived
/// @param sourceChainId keccak256 of the CAIP-2 chain identifier string (e.g. keccak256("eip155:1"))
/// @param sourceTxHash The transaction hash on the source chain that emitted the event
/// @param sourceAddress The contract address on the source chain that emitted the event, zero-padded to bytes32
/// @param sourceLogIndex The log index of the event within the source transaction
/// @param sourceBlockNumber The block number, ledger sequence, slot, or equivalent on the source chain
/// @param payload Original event data in the native encoding of the source chain
event EventArchived(
bytes32 indexed sourceChainId,
bytes32 indexed sourceTxHash,
bytes32 indexed sourceAddress,
uint256 sourceLogIndex,
uint256 sourceBlockNumber,
bytes payload
);
/// @notice Archive an event from a source chain
function archiveEvent(
bytes32 sourceChainId,
bytes32 sourceTxHash,
bytes32 sourceAddress,
uint256 sourceLogIndex,
uint256 sourceBlockNumber,
bytes calldata payload
) external;
}
Event ID
The canonical unique identifier for an archived event is the tuple:
eventId = (sourceChainId, sourceTxHash, sourceLogIndex)
This tuple is globally unique across all chains. Implementations MUST NOT archive the same eventId twice.
Chain Identification
sourceChainId is the keccak256 hash of the CAIP-2 chain identifier string. This allows universal chain identification without maintaining a numeric registry, while remaining efficient for on-chain indexing and filtering.
Well-known values:
| Chain | CAIP-2 | sourceChainId |
|---|---|---|
| Ethereum mainnet | eip155:1 |
keccak256("eip155:1") |
| Base | eip155:8453 |
keccak256("eip155:8453") |
| Arbitrum One | eip155:42161 |
keccak256("eip155:42161") |
| Stellar pubnet | stellar:pubnet |
keccak256("stellar:pubnet") |
| Solana mainnet | solana:mainnet |
keccak256("solana:mainnet") |
Indexed Fields
The three indexed fields enable the most common indexer query patterns:
| Field | Purpose |
|---|---|
sourceChainId |
Filter all archived events originating from a given chain |
sourceTxHash |
Look up whether a specific transaction has been archived |
sourceAddress |
Filter all archived events from a specific source contract |
Source Address
sourceAddress is encoded as bytes32. For EVM chains, the 20-byte address is zero-padded to 32 bytes. For non-EVM chains, the native address format is used directly or encoded as a 32-byte value according to the chain’s conventions.
Source Block Number
sourceBlockNumber represents the position of the event in the source chain’s history. Its semantics depend on the source chain:
| Chain type | sourceBlockNumber meaning |
|---|---|
| EVM | Block number |
| Stellar | Ledger sequence |
| Solana | Slot |
Payload
payload contains the original event data in the native encoding of the source chain. Its format is fully determined by sourceChainId:
| Chain type | Payload encoding |
|---|---|
| EVM | ABI-encoded log (topics + data) |
| Stellar | XDR-encoded contract event |
| Solana | Borsh-encoded program log or CPI event |
The standard does not prescribe payload decoding — this is the responsibility of the indexer, which derives the appropriate decoder from sourceChainId.
Security Considerations
Implementations MUST document their trust assumptions. Indexers SHOULD verify archived events against the source chain when trust is critical.
Implementations MUST enforce uniqueness of (sourceChainId, sourceTxHash, sourceLogIndex) to prevent duplicate archiving.