// After hitting a reset error, it reset derivation, and drops the old L1 chain
// After hitting a reset error, it resets derivation, and drops the old L1 chain
sequencer.ActL2PipelineFull(t)
require.Zero(t,sequencer.SyncStatus().UnsafeL2.L1Origin.Number,"back to genesis block with good L1 origin, drop old unsafe L2 chain with bad L1 origins")
// Can build new L2 blocks with good L1 origin
sequencer.ActBuildToL1HeadUnsafe(t)
require.Equal(t,newStatus.HeadL1.Hash,sequencer.SyncStatus().UnsafeL2.L1Origin.Hash,"build L2 chain with new correct L1 origins")
require.Equal(t,refB1,eq.SafeL2Head(),"L2 reset should go back to sequence window ago: blocks with origin E and D are not safe until we reconcile, C is extra, and B1 is the end we look for")
require.Equal(t,refB,eq.Origin(),"Expecting to be set back derivation L1 progress to B")
require.Equal(t,refA1,eq.Finalized(),"A1 is recognized as finalized before we run any steps")
// First step after reset will do a fork choice update
require.Equal(t,refB1,eq.SafeL2Head(),"L2 reset should go back to sequence window ago: blocks with origin E and D are not safe until we reconcile, C is extra, and B1 is the end we look for")
require.Equal(t,refB,eq.Origin(),"Expecting to be set back derivation L1 progress to B")
require.Equal(t,refA1,eq.Finalized(),"A1 is recognized as finalized before we run any steps")
// First step after reset will do a fork choice update
@@ -38,13 +38,15 @@ The typescript sdk provides a clean [wagmi](https://wagmi.sh/) based interface f
The cli provides a convenient cli for interacting with the attestation station contract
TODO put a gif here of using it

## React API
For react hooks we recomend using the [wagmi cli](https://wagmi.sh/cli/getting-started) with the [etherscan plugin](https://wagmi.sh/cli/plugins/etherscan) and [react plugin](https://wagmi.sh/cli/plugins/react) to automatically generate react hooks around the attestation station.
Use `parseAttestationBytes` and `stringifyAttestationBytes` to parse and stringify attestations before passing them into wagmi hooks.
Use `createKey` and `createValue` to convert your raw keys and values into bytes that can be used in the attestation station contract calls
Use `parseString`, `parseBool`, `parseAddress` and `parseNumber` to convert values returned by attestation station to their correct data type.
@@ -192,6 +192,7 @@ These definitions allow you to communicate with AttestationStation, but are not
#### `ATTESTATION_STATION_ADDRESS`
The deployment address for the attestation station currently deployed with create2 on Optimism and Optimism Goerli `0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77`.
```typescript
...
...
@@ -211,7 +212,6 @@ import { abi } from '@eth-optimism/atst'
`createKey` hashes keys longer than 31 bytes, because the atst key size is limited to 32 bytes.
```typescript
constkey=awaitcreateKey(
'i.am.a.key.much.longer.than.32.bytes.long'
...
...
@@ -221,7 +221,6 @@ const key = await createKey(
createKey will keep the key as is if it is shorter than 32 bytes and otherwise run it through keccak256.