// After hitting a reset error, it reset derivation, and drops the old L1 chain
sequencer.ActL2PipelineFull(t)
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
// Can build new L2 blocks with good L1 origin
sequencer.ActBuildToL1HeadUnsafe(t)
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,newStatus.HeadL1.Hash,sequencer.SyncStatus().UnsafeL2.L1Origin.Hash,"build L2 chain with new correct L1 origins")
@@ -38,13 +38,15 @@ The typescript sdk provides a clean [wagmi](https://wagmi.sh/) based interface f
...
@@ -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
The cli provides a convenient cli for interacting with the attestation station contract
TODO put a gif here of using it

## React API
## 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.
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
...
@@ -192,6 +192,7 @@ These definitions allow you to communicate with AttestationStation, but are not
#### `ATTESTATION_STATION_ADDRESS`
#### `ATTESTATION_STATION_ADDRESS`
The deployment address for the attestation station currently deployed with create2 on Optimism and Optimism Goerli `0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77`.
The deployment address for the attestation station currently deployed with create2 on Optimism and Optimism Goerli `0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77`.
```typescript
```typescript
...
@@ -211,7 +212,6 @@ import { abi } from '@eth-optimism/atst'
...
@@ -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.
`createKey` hashes keys longer than 31 bytes, because the atst key size is limited to 32 bytes.
```typescript
```typescript
constkey=awaitcreateKey(
constkey=awaitcreateKey(
'i.am.a.key.much.longer.than.32.bytes.long'
'i.am.a.key.much.longer.than.32.bytes.long'
...
@@ -221,7 +221,6 @@ const key = await createKey(
...
@@ -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.
createKey will keep the key as is if it is shorter than 32 bytes and otherwise run it through keccak256.