Skip to content

Commit

Permalink
code-groups v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabnock01 committed Sep 19, 2023
1 parent 67766e7 commit 01c256c
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 20 deletions.
4 changes: 0 additions & 4 deletions site/docs/actions/public/L1/getOutputForL2Block.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

Calls to the L2OutputOracle contract on L1 to get the output for a given L2 block.

::: code-group

```ts [example.ts]
import { publicL1Actions } from 'op-viem'
import { base } from 'op-viem/chains'
Expand All @@ -20,5 +18,3 @@ await getOutputForL2Block(publicClient, {
l2Chain: base,
})
```

:::
4 changes: 0 additions & 4 deletions site/docs/actions/public/L1/getSecondsToNextL2Output.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

Returns how long until the next L2 output, for a given chain, is posted on L1. This is useful when waiting to prove a withdrawal.

::: code-group

```ts [example.ts]
const l2Client = createPublicClient({
chain: base,
Expand All @@ -22,8 +20,6 @@ const time = await l1Client.getSecondsToNextL2Output(, {
})
```

:::

## Return Value

`bigint`
Expand Down
4 changes: 0 additions & 4 deletions site/docs/actions/public/L1/readProvenWithdrawals.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

Returns a `ProvenWithdrawal` struct containing the `outputRoot`, `timestamp`, and `l2OutputIndex` for a given withdrawal hash. Returns error if withdrawal has not been proven.

::: code-group

```ts [example.ts]
import { publicL1Actions } from 'op-viem'
import { createPublicClient } from 'viem'
Expand All @@ -21,8 +19,6 @@ const provenWithdrawal = await readProvenWithdrawals(publicClient, {
})
```

:::

## Return Value

Returns an object that represents a `ProvenWithdrawl` struct that contains the `outputRoot`, `timestamp`, and `l2OutputIndex`
Expand Down
4 changes: 0 additions & 4 deletions site/docs/actions/public/L1/simulateDepositETH.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

Simulates a deposit of ETH from L1 to L2.

::: code-group

```ts [example.ts]
import { base, publicL1Actions } from 'op-viem'
import { createPublicClient } from 'viem'
Expand All @@ -25,8 +23,6 @@ const { request } = await publicClient.simulateDepositETH({
})
```

:::

## Return Value

Returns a `request` that can be passed to Viem's `writeContract` and a `result` indicating whether the simulation succeeded.
Expand Down
4 changes: 0 additions & 4 deletions site/docs/actions/wallet/L1/writeDepositETH.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

Writes a deposit of ETH from L1 to L2.

::: code-group

```ts [example.ts]
import { base, walletL1OpStackActions } from 'op-viem'
import { createWalletClient } from 'viem'
Expand All @@ -24,8 +22,6 @@ const hash = await walletClient.writeDepositETH({
})
```

:::

## Return Value

Returns a transaction hash of the deposit transaction.
Expand Down

0 comments on commit 01c256c

Please sign in to comment.