From 01c256c38958677bb42329aa4875c372413e96c4 Mon Sep 17 00:00:00 2001 From: Sabnock01 <24715302+Sabnock01@users.noreply.github.com> Date: Tue, 19 Sep 2023 16:19:01 -0500 Subject: [PATCH] code-groups v2 --- site/docs/actions/public/L1/getOutputForL2Block.md | 4 ---- site/docs/actions/public/L1/getSecondsToNextL2Output.md | 4 ---- site/docs/actions/public/L1/readProvenWithdrawals.md | 4 ---- site/docs/actions/public/L1/simulateDepositETH.md | 4 ---- site/docs/actions/wallet/L1/writeDepositETH.md | 4 ---- 5 files changed, 20 deletions(-) diff --git a/site/docs/actions/public/L1/getOutputForL2Block.md b/site/docs/actions/public/L1/getOutputForL2Block.md index c9c095ca..8d443520 100644 --- a/site/docs/actions/public/L1/getOutputForL2Block.md +++ b/site/docs/actions/public/L1/getOutputForL2Block.md @@ -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' @@ -20,5 +18,3 @@ await getOutputForL2Block(publicClient, { l2Chain: base, }) ``` - -::: diff --git a/site/docs/actions/public/L1/getSecondsToNextL2Output.md b/site/docs/actions/public/L1/getSecondsToNextL2Output.md index 2967208c..3b747fdd 100644 --- a/site/docs/actions/public/L1/getSecondsToNextL2Output.md +++ b/site/docs/actions/public/L1/getSecondsToNextL2Output.md @@ -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, @@ -22,8 +20,6 @@ const time = await l1Client.getSecondsToNextL2Output(, { }) ``` -::: - ## Return Value `bigint` diff --git a/site/docs/actions/public/L1/readProvenWithdrawals.md b/site/docs/actions/public/L1/readProvenWithdrawals.md index 78035005..bd406df2 100644 --- a/site/docs/actions/public/L1/readProvenWithdrawals.md +++ b/site/docs/actions/public/L1/readProvenWithdrawals.md @@ -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' @@ -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` diff --git a/site/docs/actions/public/L1/simulateDepositETH.md b/site/docs/actions/public/L1/simulateDepositETH.md index 6ec68cef..a427f2e9 100644 --- a/site/docs/actions/public/L1/simulateDepositETH.md +++ b/site/docs/actions/public/L1/simulateDepositETH.md @@ -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' @@ -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. diff --git a/site/docs/actions/wallet/L1/writeDepositETH.md b/site/docs/actions/wallet/L1/writeDepositETH.md index 753195e0..c3a68048 100644 --- a/site/docs/actions/wallet/L1/writeDepositETH.md +++ b/site/docs/actions/wallet/L1/writeDepositETH.md @@ -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' @@ -24,8 +22,6 @@ const hash = await walletClient.writeDepositETH({ }) ``` -::: - ## Return Value Returns a transaction hash of the deposit transaction.