& \{ `args`: `Omit`\<`Pick`\<`WriteWithdrawETHActionParameters`, `"args"`\>[`"args"`], `"minGasLimit"`\> & \{ `minGasLimit?`: `number` } } & \{ `chainId`: `number` }
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
-| `chainId` | extends `config`[``"chains"``][`number`][``"id"``] = `number` |
+| Name | Type |
+| :-------- | :-------------------------------------------------------- |
+| `config` | extends `Config` = `OpConfig` |
+| `chainId` | extends `config`[`"chains"`][`number`][`"id"`] = `number` |
#### Defined in
@@ -356,15 +356,15 @@ Simulates a deposit of ERC20 tokens to L2
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
+| Name | Type |
+| :-------- | :-------------------------------------------- |
+| `config` | extends `Config` = `OpConfig` |
| `chainId` | extends `undefined` \| `number` = `undefined` |
#### Parameters
-| Name | Type | Description |
-| :------ | :------ | :------ |
+| Name | Type | Description |
+| :----------- | :-------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------- |
| `parameters` | [`UseSimulateDepositERC20Parameters`](/reference/modules.md#usesimulatedepositerc20parameters)\<`config`, `chainId`\> | [UseSimulateDepositERC20Parameters](/reference/modules.md#usesimulatedepositerc20parameters) |
#### Returns
@@ -377,7 +377,7 @@ wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/u
[hooks/L1/useSimulateDepositERC20.ts:33](https://github.com/base-org/op-wagmi/blob/master/src/hooks/L1/useSimulateDepositERC20.ts#L33)
-___
+---
### useSimulateDepositETH
@@ -387,15 +387,15 @@ Simulates a deposit of ETH to L2
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
+| Name | Type |
+| :-------- | :-------------------------------------------- |
+| `config` | extends `Config` = `OpConfig` |
| `chainId` | extends `undefined` \| `number` = `undefined` |
#### Parameters
-| Name | Type | Description |
-| :------ | :------ | :------ |
+| Name | Type | Description |
+| :----------- | :---------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- |
| `parameters` | [`UseSimulateDepositETHParameters`](/reference/modules.md#usesimulatedepositethparameters)\<`config`, `chainId`\> | [UseSimulateDepositETHParameters](/reference/modules.md#usesimulatedepositethparameters) |
#### Returns
@@ -408,7 +408,7 @@ wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/u
[hooks/L1/useSimulateDepositETH.ts:33](https://github.com/base-org/op-wagmi/blob/master/src/hooks/L1/useSimulateDepositETH.ts#L33)
-___
+---
### useSimulateFinalizeWithdrawalTransaction
@@ -418,15 +418,15 @@ Simulates finalizing a withdrawal transaction.
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
+| Name | Type |
+| :-------- | :-------------------------------------------- |
+| `config` | extends `Config` = `OpConfig` |
| `chainId` | extends `undefined` \| `number` = `undefined` |
#### Parameters
-| Name | Type | Description |
-| :------ | :------ | :------ |
+| Name | Type | Description |
+| :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------- |
| `parameters` | [`UseSimulateFinalizeWithdrawalTransactionParameters`](/reference/modules.md#usesimulatefinalizewithdrawaltransactionparameters)\<`config`, `chainId`\> | [UseSimulateFinalizeWithdrawalTransactionParameters](/reference/modules.md#usesimulatefinalizewithdrawaltransactionparameters) |
#### Returns
@@ -439,7 +439,7 @@ wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/u
[hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts:39](https://github.com/base-org/op-wagmi/blob/master/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts#L39)
-___
+---
### useSimulateProveWithdrawalTransaction
@@ -449,15 +449,15 @@ Simulates proving a withdrawal transaction.
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
+| Name | Type |
+| :-------- | :-------------------------------------------- |
+| `config` | extends `Config` = `OpConfig` |
| `chainId` | extends `undefined` \| `number` = `undefined` |
#### Parameters
-| Name | Type | Description |
-| :------ | :------ | :------ |
+| Name | Type | Description |
+| :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------- |
| `parameters` | [`UseSimulateProveWithdrawalTransactionParameters`](/reference/modules.md#usesimulateprovewithdrawaltransactionparameters)\<`config`, `chainId`\> | [UseSimulateProveWithdrawalTransactionParameters](/reference/modules.md#usesimulateprovewithdrawaltransactionparameters) |
#### Returns
@@ -470,7 +470,7 @@ wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/u
[hooks/L1/useSimulateProveWithdrawalTransaction.ts:45](https://github.com/base-org/op-wagmi/blob/master/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts#L45)
-___
+---
### useSimulateWithdrawERC20
@@ -480,15 +480,15 @@ Simulates a withdrawal of ERC20 tokens to an L1 address.
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
+| Name | Type |
+| :-------- | :-------------------------------------------- |
+| `config` | extends `Config` = `OpConfig` |
| `chainId` | extends `undefined` \| `number` = `undefined` |
#### Parameters
-| Name | Type | Description |
-| :------ | :------ | :------ |
+| Name | Type | Description |
+| :----------- | :---------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- |
| `parameters` | [`UseSimulateWithdrawERC20Parameters`](/reference/modules.md#usesimulatewithdrawerc20parameters)\<`config`, `chainId`\> | [UseSimulateWithdrawERC20Parameters](/reference/modules.md#usesimulatewithdrawerc20parameters) |
#### Returns
@@ -501,7 +501,7 @@ wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/u
[hooks/L2/useSimulateWithdrawERC20.ts:34](https://github.com/base-org/op-wagmi/blob/master/src/hooks/L2/useSimulateWithdrawERC20.ts#L34)
-___
+---
### useSimulateWithdrawETH
@@ -511,15 +511,15 @@ Simulates a withdrawal of ETH to an L1 address.
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
+| Name | Type |
+| :-------- | :-------------------------------------------- |
+| `config` | extends `Config` = `OpConfig` |
| `chainId` | extends `undefined` \| `number` = `undefined` |
#### Parameters
-| Name | Type | Description |
-| :------ | :------ | :------ |
+| Name | Type | Description |
+| :----------- | :------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------- |
| `parameters` | [`UseSimulateWithdrawETHParameters`](/reference/modules.md#usesimulatewithdrawethparameters)\<`config`, `chainId`\> | [UseSimulateWithdrawETHParameters](/reference/modules.md#usesimulatewithdrawethparameters) |
#### Returns
@@ -532,7 +532,7 @@ wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/u
[hooks/L2/useSimulateWithdrawETH.ts:35](https://github.com/base-org/op-wagmi/blob/master/src/hooks/L2/useSimulateWithdrawETH.ts#L35)
-___
+---
### useWriteDepositERC20
@@ -542,15 +542,15 @@ Deposits ERC20 tokens to L2 using the standard bridge
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
-| `context` | `unknown` |
+| Name | Type |
+| :-------- | :---------------------------- |
+| `config` | extends `Config` = `OpConfig` |
+| `context` | `unknown` |
#### Parameters
-| Name | Type |
-| :------ | :------ |
+| Name | Type |
+| :----- | :-------------------------------------------------------------------------------------------------------------- |
| `args` | [`UseWriteDepositERC20Parameters`](/reference/modules.md#usewritedepositerc20parameters)\<`config`, `context`\> |
#### Returns
@@ -563,7 +563,7 @@ wagmi [useWriteContract return type](https://alpha.wagmi.sh/react/api/hooks/useW
[hooks/L1/useWriteDepositERC20.ts:42](https://github.com/base-org/op-wagmi/blob/master/src/hooks/L1/useWriteDepositERC20.ts#L42)
-___
+---
### useWriteDepositETH
@@ -573,15 +573,15 @@ Deposits ETH to L2 using the OptimismPortal contract
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
-| `context` | `unknown` |
+| Name | Type |
+| :-------- | :---------------------------- |
+| `config` | extends `Config` = `OpConfig` |
+| `context` | `unknown` |
#### Parameters
-| Name | Type |
-| :------ | :------ |
+| Name | Type |
+| :----- | :---------------------------------------------------------------------------------------------------------- |
| `args` | [`UseWriteDepositETHParameters`](/reference/modules.md#usewritedepositethparameters)\<`config`, `context`\> |
#### Returns
@@ -594,7 +594,7 @@ wagmi [useWriteContract return type](https://alpha.wagmi.sh/react/api/hooks/useW
[hooks/L1/useWriteDepositETH.ts:83](https://github.com/base-org/op-wagmi/blob/master/src/hooks/L1/useWriteDepositETH.ts#L83)
-___
+---
### useWriteFinalizeWithdrawalTransaction
@@ -604,15 +604,15 @@ Deposits ETH to L2 using the OptimismPortal contract
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
-| `context` | `unknown` |
+| Name | Type |
+| :-------- | :---------------------------- |
+| `config` | extends `Config` = `OpConfig` |
+| `context` | `unknown` |
#### Parameters
-| Name | Type |
-| :------ | :------ |
+| Name | Type |
+| :----- | :------------------------------------------------------------------------------------------------------------------------------------------------ |
| `args` | [`UseWriteFinalizeWithdrawalTransactionParameters`](/reference/modules.md#usewritefinalizewithdrawaltransactionparameters)\<`config`, `context`\> |
#### Returns
@@ -625,7 +625,7 @@ wagmi [useWriteContract return type](https://alpha.wagmi.sh/react/api/hooks/useW
[hooks/L1/useWriteFinalizeWithdrawalTransaction.ts:87](https://github.com/base-org/op-wagmi/blob/master/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts#L87)
-___
+---
### useWriteProveWithdrawalTransaction
@@ -635,15 +635,15 @@ Deposits ETH to L2 using the OptimismPortal contract
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
-| `context` | `unknown` |
+| Name | Type |
+| :-------- | :---------------------------- |
+| `config` | extends `Config` = `OpConfig` |
+| `context` | `unknown` |
#### Parameters
-| Name | Type |
-| :------ | :------ |
+| Name | Type |
+| :----- | :------------------------------------------------------------------------------------------------------------------------------------------ |
| `args` | [`UseWriteProveWithdrawalTransactionParameters`](/reference/modules.md#usewriteprovewithdrawaltransactionparameters)\<`config`, `context`\> |
#### Returns
@@ -656,7 +656,7 @@ wagmi [useWriteContract return type](https://alpha.wagmi.sh/react/api/hooks/useW
[hooks/L1/useWriteProveWithdrawalTransaction.ts:104](https://github.com/base-org/op-wagmi/blob/master/src/hooks/L1/useWriteProveWithdrawalTransaction.ts#L104)
-___
+---
### useWriteWithdrawERC20
@@ -666,15 +666,15 @@ Withdraws ERC20 tokens to an L1 address.
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
-| `context` | `unknown` |
+| Name | Type |
+| :-------- | :---------------------------- |
+| `config` | extends `Config` = `OpConfig` |
+| `context` | `unknown` |
#### Parameters
-| Name | Type |
-| :------ | :------ |
+| Name | Type |
+| :----- | :---------------------------------------------------------------------------------------------------------------- |
| `args` | [`UseWriteWithdrawERC20Parameters`](/reference/modules.md#usewritewithdrawerc20parameters)\<`config`, `context`\> |
#### Returns
@@ -687,7 +687,7 @@ wagmi [useWriteContract return type](https://alpha.wagmi.sh/react/api/hooks/useW
[hooks/L2/useWriteWithdrawERC20.ts:42](https://github.com/base-org/op-wagmi/blob/master/src/hooks/L2/useWriteWithdrawERC20.ts#L42)
-___
+---
### useWriteWithdrawETH
@@ -697,15 +697,15 @@ Withdraws ETH to an L1 address.
#### Type parameters
-| Name | Type |
-| :------ | :------ |
-| `config` | extends `Config` = `OpConfig` |
-| `context` | `unknown` |
+| Name | Type |
+| :-------- | :---------------------------- |
+| `config` | extends `Config` = `OpConfig` |
+| `context` | `unknown` |
#### Parameters
-| Name | Type |
-| :------ | :------ |
+| Name | Type |
+| :----- | :------------------------------------------------------------------------------------------------------------ |
| `args` | [`UseWriteWithdrawETHParameters`](/reference/modules.md#usewritewithdrawethparameters)\<`config`, `context`\> |
#### Returns
From 7e601a3c5065eb05ad2d6abb76dbc21174ecbc8a Mon Sep 17 00:00:00 2001
From: Lukas Rosario <36800180+lukasrosario@users.noreply.github.com>
Date: Mon, 27 Nov 2023 18:10:42 -0500
Subject: [PATCH 4/6] readmes
---
README.md | 14 ++++++++------
example/README.md | 22 ++++++++++++++++++++++
example/components/AssetTypeToggle.tsx | 2 +-
3 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 30fec52..2dd3b5c 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,12 @@
-# OP Wagmi
+
-Wagmi hooks for OP Stack Chains
+
+ OP Wagmi
+
+
+
+ Wagmi hooks for OP Stack Chains
+
@@ -29,10 +35,6 @@ Wagmi hooks for OP Stack Chains
- TypeScript ready
- Test suite running against [forked](https://ethereum.org/en/glossary/#fork) Ethereum network
-## Overview
-
-## Community
-
## Contributing
If you're interested in contributing, please read the [contributing docs](CONTRIBUTING.md) **before submitting a pull request**.
diff --git a/example/README.md b/example/README.md
index e69de29..92b92c8 100644
--- a/example/README.md
+++ b/example/README.md
@@ -0,0 +1,22 @@
+
+
+
+ 🔴🔵 Superchain Bridge 🔵🔴
+
+
+This is a basic Superchain Bridge example app, here to showcase OP Wagmi's features. To start the development server, run
+
+```bash
+pnpm dev:example
+```
+
+from the root of the repository.
+
+In this example app, you can:
+
+- Deposit ETH / ERC20s
+- Initiate ETH / ERC20 withdrawals
+- Prove withdrawals
+- Finalize withdrawals
+
+to / from Base Goerli / Optimism Goerli.
diff --git a/example/components/AssetTypeToggle.tsx b/example/components/AssetTypeToggle.tsx
index 6f10469..2db0252 100644
--- a/example/components/AssetTypeToggle.tsx
+++ b/example/components/AssetTypeToggle.tsx
@@ -22,7 +22,7 @@ export function AssetTypeToggle({ selectedAssetType, setSelectedAssetType }: Ass
}`}
onClick={() => setSelectedAssetType('erc20')}
>
- ERC-20
+ ERC20
)
From d9d3df6c5c96baa413df0b2048c32d018edd41f5 Mon Sep 17 00:00:00 2001
From: Lukas Rosario <36800180+lukasrosario@users.noreply.github.com>
Date: Mon, 27 Nov 2023 18:17:04 -0500
Subject: [PATCH 5/6] update package jsons
---
example/package.json | 2 +-
package.json | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/example/package.json b/example/package.json
index 87ab350..9a73f86 100644
--- a/example/package.json
+++ b/example/package.json
@@ -1,5 +1,5 @@
{
- "name": "example",
+ "name": "@op-wagmi/example",
"version": "0.1.1",
"private": true,
"scripts": {
diff --git a/package.json b/package.json
index 7df73e7..d4b94f6 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,9 @@
{
"name": "op-wagmi",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/base-org/op-wagmi.git"
+ },
"version": "0.0.2",
"type": "module",
"main": "./dist/cjs/index.js",
From 1b9503443f7709870a872fabb6275f387c701d14 Mon Sep 17 00:00:00 2001
From: Lukas Rosario <36800180+lukasrosario@users.noreply.github.com>
Date: Mon, 27 Nov 2023 18:18:34 -0500
Subject: [PATCH 6/6] changeset
---
.changeset/honest-shirts-serve.md | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 .changeset/honest-shirts-serve.md
diff --git a/.changeset/honest-shirts-serve.md b/.changeset/honest-shirts-serve.md
new file mode 100644
index 0000000..ece4a22
--- /dev/null
+++ b/.changeset/honest-shirts-serve.md
@@ -0,0 +1,7 @@
+---
+"@op-wagmi/docs": minor
+"op-wagmi": minor
+"@op-wagmi/example": patch
+---
+
+Add docs