Skip to content

How Data Stays Fresh

  1. Once initialized, Drizzle instantiates web3 and our desired contracts, then observes the chain by subscribing to new block headers.

Drizzle Sync Step 1

  1. Drizzle keeps track of contract calls so it knows what to synchronize.

Drizzle Sync Step 2

  1. When a new block header comes in, Drizzle checks that the block isn't pending, then goes through the transactions looking to see if any of them touched our contracts.

Drizzle Sync Step 3

  1. If they did, we replay the calls already in the store to refresh any potentially altered data. If they didn't we continue with the store data.

Drizzle Sync Step 4