On-chain drift: agents whose `:uri` key changed from one non-empty value to a different one. First-ever registration (empty -> non-empty) is not drift, so it's excluded here.
Inputs
Package ref
erc8004-identity@v0.1.1Run package
CLI
Run map_uri_drift from the command line.
substreams run erc8004-identity@v0.1.1 map_uri_drift -e base-sepoliasubstreams auth or directly on thegraph.market (see docs).README
General-purpose Substreams module for the ERC-8004 Identity Registry — an ERC-721 agent registry deployed at the same address on every EVM chain that carries it. Decodes every registry-level event — agent registration, agent URI updates, ERC-721 ownership transfers and metadata writes — and derives an on-chain-drift stream from them, independent of any particular downstream sink.
Reused across chains by swapping network and the map_registry_events
param only — no code changes; the Identity Registry contract is identical
on every chain, so one WASM binary works everywhere.
Substreams modules can only read a Block, another module's output, or
params — never an HTTP endpoint. That means this package can tell you an
agent has a URI registered; it can't tell you that URI actually serves a
live agent-card (that needs a real HTTP fetch, done by something outside
Substreams). A sibling package, erc8004-identity-registered, imports this
package's store_agent_state and filters down to agents with a non-empty
URI — the on-chain-verifiable half of that question — without re-reading a
single block.
| Module | Kind | Output |
|---|---|---|
map_registry_events | map | erc8004.identity.v1.Events — every Registered, URIUpdated, Transfer and MetadataSet this block |
store_agent_state | store | agent:{agentId}:uri / agent:{agentId}:owner, latest value only |
map_uri_drift | map | erc8004.identity.v1.UriDrifts — agents whose URI changed to a different non-empty value this block |
cargo build --target wasm32-unknown-unknown --release
substreams pack substreams.yaml
substreams run substreams.yaml map_registry_events -e <firehose-endpoint> -s 36304145 -t +100
Modules
On-chain drift: agents whose `:uri` key changed from one non-empty value to a different one. First-ever registration (empty -> non-empty) is not drift, so it's excluded here.
Inputs
Decodes every IdentityRegistry event in the block: `Registered`, `URIUpdated`, ERC-721 `Transfer` and `MetadataSet`. `params` is the registry contract address (0x-prefixed hex, case-insensitive) -- the only thing that changes between chains.
Inputs
Latest known state per agent, keyed `agent:{agentId}:uri` and `agent:{agentId}:owner`. Deliberately bounded to "one string per agent per field" -- Substreams stores are meant to hold current state, not history, so a growing log of past values belongs in whatever subgraph or database sinks `map_registry_events` instead.
Store value
string
Update policy
set
Inputs