web3wagmi
← All standards

ERC-8002 Simplified Payment Verification Gateway

DraftERCcreated 2025-08-07

Trustless singleton contract for on-chain verification of Bitcoin transactions through block headers

Authors: Artem Chystiakov (@arvolear), Oleh Komendant (@Hrom131)

ERC-165 interface ids

Computed here as the XOR of the selectors each interface defines.

ISPVGateway0xb4063ed8

Functions this standard introduces (11)

0x633cc31eaddBlockHeader(bytes)
0xebbe0b65addBlockHeaderBatch(bytes[])
0x9739ec58blockExists(bytes32)view
0xb85b36fbcheckTxInclusion(bytes32[],bytes32,bytes32,uint256,uint256)view
0x23ac7136getBlockHash(uint64)view
0x6b4f9b9dgetBlockHeader(bytes32)view
0x2df0696cgetBlockHeight(bytes32)view
0x690dc201getBlockMerkleRoot(bytes32)view
0x8f657259getBlockStatus(bytes32)view
0xafaa65f3getMainchainHead()view
0x3f377a6cgetMainchainHeight()view

Events (2)

Topic0 is the keccak256 hash of the signature, which is what a log filter matches on.

0x69178d4e683f38fecfbc8c49445d0cf1c5e1df54f862916aa87dabbc47a6a4ddMainchainHeadUpdated(uint64,bytes32)
0xbe2da3ece3208645642b3c8bbef3f720f76ddfc9d768bba312777fd56a8bcd9aBlockHeaderAdded(uint64,bytes32)

What the specification covers

Compare with

Parsed from the canonical specification · discussion