diff --git a/.changeset/gorgeous-steaks-clean.md b/.changeset/gorgeous-steaks-clean.md new file mode 100644 index 00000000..1f1a36fb --- /dev/null +++ b/.changeset/gorgeous-steaks-clean.md @@ -0,0 +1,5 @@ +--- +"@eth-optimism/viem": patch +--- + +add depositSuperchainWETH diff --git a/packages/viem/docs/README.md b/packages/viem/docs/README.md index 470e5a8e..fa00be08 100644 --- a/packages/viem/docs/README.md +++ b/packages/viem/docs/README.md @@ -14,6 +14,7 @@ ## L2 Public Actions +- [simulateDepositSuperchainWETH](functions/simulateDepositSuperchainWETH.md) - [simulateRelayL2ToL2Message](functions/simulateRelayL2ToL2Message.md) - [simulateSendL2ToL2Message](functions/simulateSendL2ToL2Message.md) - [simulateSendSupERC20](functions/simulateSendSupERC20.md) @@ -21,6 +22,8 @@ ## L2 Wallet Actions +- [depositSuperchainWETH](functions/depositSuperchainWETH.md) +- [estimateDepositSuperchainWETHGas](functions/estimateDepositSuperchainWETHGas.md) - [estimateRelayL2ToL2MessageGas](functions/estimateRelayL2ToL2MessageGas.md) - [estimateSendL2ToL2MessageGas](functions/estimateSendL2ToL2MessageGas.md) - [estimateSendSupERC20Gas](functions/estimateSendSupERC20Gas.md) @@ -55,6 +58,10 @@ ## Types +- [DepositSuperchainWETHContractReturnType](type-aliases/DepositSuperchainWETHContractReturnType.md) +- [DepositSuperchainWETHErrorType](type-aliases/DepositSuperchainWETHErrorType.md) +- [DepositSuperchainWETHParameters](type-aliases/DepositSuperchainWETHParameters.md) +- [DepositSuperchainWETHReturnType](type-aliases/DepositSuperchainWETHReturnType.md) - [MessageIdentifier](type-aliases/MessageIdentifier.md) - [RelayL2ToL2MessageContractReturnType](type-aliases/RelayL2ToL2MessageContractReturnType.md) - [RelayL2ToL2MessageErrorType](type-aliases/RelayL2ToL2MessageErrorType.md) diff --git a/packages/viem/docs/functions/createInteropMessage.md b/packages/viem/docs/functions/createInteropMessage.md index a680057d..ccfdccaf 100644 --- a/packages/viem/docs/functions/createInteropMessage.md +++ b/packages/viem/docs/functions/createInteropMessage.md @@ -1375,4 +1375,4 @@ created interop message Message ## Defined in -[packages/viem/src/utils/interop.ts:32](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/interop.ts#L32) +[packages/viem/src/utils/interop.ts:32](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/interop.ts#L32) diff --git a/packages/viem/docs/functions/createInteropSentL2ToL2Messages.md b/packages/viem/docs/functions/createInteropSentL2ToL2Messages.md index 1f27dcee..39299a82 100644 --- a/packages/viem/docs/functions/createInteropSentL2ToL2Messages.md +++ b/packages/viem/docs/functions/createInteropSentL2ToL2Messages.md @@ -1375,4 +1375,4 @@ Decoded interop messages [CreateInteropSentL2ToL2MessagesReturnType](../type-ali ## Defined in -[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:60](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L60) +[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:60](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L60) diff --git a/packages/viem/docs/functions/decodeExecutingMessages.md b/packages/viem/docs/functions/decodeExecutingMessages.md index 25a974c8..af4aba6c 100644 --- a/packages/viem/docs/functions/decodeExecutingMessages.md +++ b/packages/viem/docs/functions/decodeExecutingMessages.md @@ -24,4 +24,4 @@ Decoded cross-chain calls [DecodeExecutingMessagesReturnType](../type-aliases/De ## Defined in -[packages/viem/src/utils/interop.ts:66](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/interop.ts#L66) +[packages/viem/src/utils/interop.ts:66](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/interop.ts#L66) diff --git a/packages/viem/docs/functions/decodeRelayedL2ToL2Messages.md b/packages/viem/docs/functions/decodeRelayedL2ToL2Messages.md index d7891580..5081ec8a 100644 --- a/packages/viem/docs/functions/decodeRelayedL2ToL2Messages.md +++ b/packages/viem/docs/functions/decodeRelayedL2ToL2Messages.md @@ -24,4 +24,4 @@ Identified relayed messages [DecodeRelayedL2ToL2MessagesReturnType](../type-alia ## Defined in -[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:106](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L106) +[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:106](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L106) diff --git a/packages/viem/docs/functions/decodeSentL2ToL2Messages.md b/packages/viem/docs/functions/decodeSentL2ToL2Messages.md index f3a69e70..b7de0be6 100644 --- a/packages/viem/docs/functions/decodeSentL2ToL2Messages.md +++ b/packages/viem/docs/functions/decodeSentL2ToL2Messages.md @@ -24,4 +24,4 @@ Decoded cross-chain calls [DecodeSentL2ToL2MessagesReturnType](../type-aliases/D ## Defined in -[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:85](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L85) +[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:85](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L85) diff --git a/packages/viem/docs/functions/depositSuperchainWETH.md b/packages/viem/docs/functions/depositSuperchainWETH.md new file mode 100644 index 00000000..83262e88 --- /dev/null +++ b/packages/viem/docs/functions/depositSuperchainWETH.md @@ -0,0 +1,39 @@ +[**@eth-optimism/viem**](../README.md) • **Docs** + +*** + +[@eth-optimism/viem](../README.md) / depositSuperchainWETH + +# depositSuperchainWETH() + +> **depositSuperchainWETH**\<`chain`, `account`, `chainOverride`\>(`client`, `parameters`): `Promise`\<[`DepositSuperchainWETHReturnType`](../type-aliases/DepositSuperchainWETHReturnType.md)\> + +Deposits ETH to the SuperchainWETH contract. + +## Type Parameters + +• **chain** *extends* `undefined` \| `Chain` + +• **account** *extends* `undefined` \| `Account` + +• **chainOverride** *extends* `undefined` \| `Chain` = `undefined` + +## Parameters + +• **client**: `Client`\<`Transport`, `chain`, `account`\> + +L2 Wallet Client + +• **parameters**: [`DepositSuperchainWETHParameters`](../type-aliases/DepositSuperchainWETHParameters.md)\<`chain`, `account`, `chainOverride`, `DeriveChain`\<`chain`, `chainOverride`\>\> + +[DepositSuperchainWETHParameters](../type-aliases/DepositSuperchainWETHParameters.md) + +## Returns + +`Promise`\<[`DepositSuperchainWETHReturnType`](../type-aliases/DepositSuperchainWETHReturnType.md)\> + +The depositSuperchainWETH transaction hash. [DepositSuperchainWETHReturnType](../type-aliases/DepositSuperchainWETHReturnType.md) + +## Defined in + +[packages/viem/src/actions/depositSuperchainWETH.ts:64](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/depositSuperchainWETH.ts#L64) diff --git a/packages/viem/docs/functions/estimateDepositSuperchainWETHGas.md b/packages/viem/docs/functions/estimateDepositSuperchainWETHGas.md new file mode 100644 index 00000000..9bb17f40 --- /dev/null +++ b/packages/viem/docs/functions/estimateDepositSuperchainWETHGas.md @@ -0,0 +1,39 @@ +[**@eth-optimism/viem**](../README.md) • **Docs** + +*** + +[@eth-optimism/viem](../README.md) / estimateDepositSuperchainWETHGas + +# estimateDepositSuperchainWETHGas() + +> **estimateDepositSuperchainWETHGas**\<`TChain`, `TAccount`, `TChainOverride`\>(`client`, `parameters`): `Promise`\<`bigint`\> + +Estimates gas for [depositSuperchainWETH](depositSuperchainWETH.md) + +## Type Parameters + +• **TChain** *extends* `undefined` \| `Chain` + +• **TAccount** *extends* `undefined` \| `Account` + +• **TChainOverride** *extends* `undefined` \| `Chain` = `undefined` + +## Parameters + +• **client**: `Client`\<`Transport`, `TChain`, `TAccount`\> + +L2 Wallet Client + +• **parameters**: [`DepositSuperchainWETHParameters`](../type-aliases/DepositSuperchainWETHParameters.md)\<`TChain`, `TAccount`, `TChainOverride`, `DeriveChain`\<`TChain`, `TChainOverride`\>\> + +[DepositSuperchainWETHParameters](../type-aliases/DepositSuperchainWETHParameters.md) + +## Returns + +`Promise`\<`bigint`\> + +The estimated gas value. + +## Defined in + +[packages/viem/src/actions/depositSuperchainWETH.ts:91](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/depositSuperchainWETH.ts#L91) diff --git a/packages/viem/docs/functions/estimateRelayL2ToL2MessageGas.md b/packages/viem/docs/functions/estimateRelayL2ToL2MessageGas.md index aee18141..13cf2d12 100644 --- a/packages/viem/docs/functions/estimateRelayL2ToL2MessageGas.md +++ b/packages/viem/docs/functions/estimateRelayL2ToL2MessageGas.md @@ -36,4 +36,4 @@ The estimated gas value. ## Defined in -[packages/viem/src/actions/relayL2ToL2Message.ts:103](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/relayL2ToL2Message.ts#L103) +[packages/viem/src/actions/relayL2ToL2Message.ts:103](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/relayL2ToL2Message.ts#L103) diff --git a/packages/viem/docs/functions/estimateSendL2ToL2MessageGas.md b/packages/viem/docs/functions/estimateSendL2ToL2MessageGas.md index ab99ee24..7f75f274 100644 --- a/packages/viem/docs/functions/estimateSendL2ToL2MessageGas.md +++ b/packages/viem/docs/functions/estimateSendL2ToL2MessageGas.md @@ -36,4 +36,4 @@ The estimated gas value. ## Defined in -[packages/viem/src/actions/sendL2ToL2Message.ts:105](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendL2ToL2Message.ts#L105) +[packages/viem/src/actions/sendL2ToL2Message.ts:105](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendL2ToL2Message.ts#L105) diff --git a/packages/viem/docs/functions/estimateSendSupERC20Gas.md b/packages/viem/docs/functions/estimateSendSupERC20Gas.md index 778d19c2..03d471f3 100644 --- a/packages/viem/docs/functions/estimateSendSupERC20Gas.md +++ b/packages/viem/docs/functions/estimateSendSupERC20Gas.md @@ -36,4 +36,4 @@ The estimated gas value. ## Defined in -[packages/viem/src/actions/sendSupERC20.ts:106](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendSupERC20.ts#L106) +[packages/viem/src/actions/sendSupERC20.ts:106](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendSupERC20.ts#L106) diff --git a/packages/viem/docs/functions/estimateSendSuperchainWETHGas.md b/packages/viem/docs/functions/estimateSendSuperchainWETHGas.md index f4f1d42f..5c28d748 100644 --- a/packages/viem/docs/functions/estimateSendSuperchainWETHGas.md +++ b/packages/viem/docs/functions/estimateSendSuperchainWETHGas.md @@ -36,4 +36,4 @@ The estimated gas value. ## Defined in -[packages/viem/src/actions/sendSuperchainWETH.ts:74](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendSuperchainWETH.ts#L74) +[packages/viem/src/actions/sendSuperchainWETH.ts:74](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendSuperchainWETH.ts#L74) diff --git a/packages/viem/docs/functions/relayL2ToL2Message.md b/packages/viem/docs/functions/relayL2ToL2Message.md index 8eb24ce1..ddaa9c35 100644 --- a/packages/viem/docs/functions/relayL2ToL2Message.md +++ b/packages/viem/docs/functions/relayL2ToL2Message.md @@ -36,4 +36,4 @@ The relayMessage transaction hash. [RelayL2ToL2MessageReturnType](../type-aliase ## Defined in -[packages/viem/src/actions/relayL2ToL2Message.ts:74](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/relayL2ToL2Message.ts#L74) +[packages/viem/src/actions/relayL2ToL2Message.ts:74](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/relayL2ToL2Message.ts#L74) diff --git a/packages/viem/docs/functions/sendL2ToL2Message.md b/packages/viem/docs/functions/sendL2ToL2Message.md index f7d18623..1c878376 100644 --- a/packages/viem/docs/functions/sendL2ToL2Message.md +++ b/packages/viem/docs/functions/sendL2ToL2Message.md @@ -36,4 +36,4 @@ The sendL2ToL2Message transaction hash. [SendL2ToL2MessageReturnType](../type-al ## Defined in -[packages/viem/src/actions/sendL2ToL2Message.ts:76](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendL2ToL2Message.ts#L76) +[packages/viem/src/actions/sendL2ToL2Message.ts:76](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendL2ToL2Message.ts#L76) diff --git a/packages/viem/docs/functions/sendSupERC20.md b/packages/viem/docs/functions/sendSupERC20.md index 922e8060..eca874b5 100644 --- a/packages/viem/docs/functions/sendSupERC20.md +++ b/packages/viem/docs/functions/sendSupERC20.md @@ -36,4 +36,4 @@ The sendSupERC20 transaction hash. [SendSupERC20ReturnType](../type-aliases/Send ## Defined in -[packages/viem/src/actions/sendSupERC20.ts:77](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendSupERC20.ts#L77) +[packages/viem/src/actions/sendSupERC20.ts:77](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendSupERC20.ts#L77) diff --git a/packages/viem/docs/functions/sendSuperchainWETH.md b/packages/viem/docs/functions/sendSuperchainWETH.md index 6c929554..1e914c2c 100644 --- a/packages/viem/docs/functions/sendSuperchainWETH.md +++ b/packages/viem/docs/functions/sendSuperchainWETH.md @@ -36,4 +36,4 @@ The sendSuperchainWETH transaction hash. [SendSupERC20ReturnType](../type-aliase ## Defined in -[packages/viem/src/actions/sendSuperchainWETH.ts:53](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendSuperchainWETH.ts#L53) +[packages/viem/src/actions/sendSuperchainWETH.ts:53](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendSuperchainWETH.ts#L53) diff --git a/packages/viem/docs/functions/simulateDepositSuperchainWETH.md b/packages/viem/docs/functions/simulateDepositSuperchainWETH.md new file mode 100644 index 00000000..f60e7622 --- /dev/null +++ b/packages/viem/docs/functions/simulateDepositSuperchainWETH.md @@ -0,0 +1,39 @@ +[**@eth-optimism/viem**](../README.md) • **Docs** + +*** + +[@eth-optimism/viem](../README.md) / simulateDepositSuperchainWETH + +# simulateDepositSuperchainWETH() + +> **simulateDepositSuperchainWETH**\<`TChain`, `TAccount`, `TChainOverride`\>(`client`, `parameters`): `Promise`\<[`DepositSuperchainWETHContractReturnType`](../type-aliases/DepositSuperchainWETHContractReturnType.md)\> + +Simulate contract call for [depositSuperchainWETH](depositSuperchainWETH.md) + +## Type Parameters + +• **TChain** *extends* `undefined` \| `Chain` + +• **TAccount** *extends* `undefined` \| `Account` + +• **TChainOverride** *extends* `undefined` \| `Chain` = `undefined` + +## Parameters + +• **client**: `Client`\<`Transport`, `TChain`, `TAccount`\> + +L2 Public Client + +• **parameters**: [`DepositSuperchainWETHParameters`](../type-aliases/DepositSuperchainWETHParameters.md)\<`TChain`, `TAccount`, `TChainOverride`, `DeriveChain`\<`TChain`, `TChainOverride`\>\> + +[DepositSuperchainWETHParameters](../type-aliases/DepositSuperchainWETHParameters.md) + +## Returns + +`Promise`\<[`DepositSuperchainWETHContractReturnType`](../type-aliases/DepositSuperchainWETHContractReturnType.md)\> + +The contract functions return value. depositSuperchainWETHContractReturnType + +## Defined in + +[packages/viem/src/actions/depositSuperchainWETH.ts:115](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/depositSuperchainWETH.ts#L115) diff --git a/packages/viem/docs/functions/simulateRelayL2ToL2Message.md b/packages/viem/docs/functions/simulateRelayL2ToL2Message.md index dd9a55e2..98dbe7bf 100644 --- a/packages/viem/docs/functions/simulateRelayL2ToL2Message.md +++ b/packages/viem/docs/functions/simulateRelayL2ToL2Message.md @@ -36,4 +36,4 @@ The contract functions return value. [RelayL2ToL2MessageContractReturnType](../t ## Defined in -[packages/viem/src/actions/relayL2ToL2Message.ts:129](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/relayL2ToL2Message.ts#L129) +[packages/viem/src/actions/relayL2ToL2Message.ts:129](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/relayL2ToL2Message.ts#L129) diff --git a/packages/viem/docs/functions/simulateSendL2ToL2Message.md b/packages/viem/docs/functions/simulateSendL2ToL2Message.md index c97637ad..325bd71b 100644 --- a/packages/viem/docs/functions/simulateSendL2ToL2Message.md +++ b/packages/viem/docs/functions/simulateSendL2ToL2Message.md @@ -36,4 +36,4 @@ The contract functions return value. [SendL2ToL2MessageContractReturnType](../ty ## Defined in -[packages/viem/src/actions/sendL2ToL2Message.ts:131](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendL2ToL2Message.ts#L131) +[packages/viem/src/actions/sendL2ToL2Message.ts:131](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendL2ToL2Message.ts#L131) diff --git a/packages/viem/docs/functions/simulateSendSupERC20.md b/packages/viem/docs/functions/simulateSendSupERC20.md index a9bcf4b0..625ebdfa 100644 --- a/packages/viem/docs/functions/simulateSendSupERC20.md +++ b/packages/viem/docs/functions/simulateSendSupERC20.md @@ -36,4 +36,4 @@ The contract functions return value. [SendSupERC20ContractReturnType](../type-al ## Defined in -[packages/viem/src/actions/sendSupERC20.ts:132](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendSupERC20.ts#L132) +[packages/viem/src/actions/sendSupERC20.ts:132](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendSupERC20.ts#L132) diff --git a/packages/viem/docs/functions/simulateSendSuperchainWETH.md b/packages/viem/docs/functions/simulateSendSuperchainWETH.md index 3dab7b22..ad9dcf3a 100644 --- a/packages/viem/docs/functions/simulateSendSuperchainWETH.md +++ b/packages/viem/docs/functions/simulateSendSuperchainWETH.md @@ -36,4 +36,4 @@ The contract functions return value. [SendSupERC20ContractReturnType](../type-al ## Defined in -[packages/viem/src/actions/sendSuperchainWETH.ts:95](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendSuperchainWETH.ts#L95) +[packages/viem/src/actions/sendSuperchainWETH.ts:95](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendSuperchainWETH.ts#L95) diff --git a/packages/viem/docs/type-aliases/CreateInteropMessageParameters.md b/packages/viem/docs/type-aliases/CreateInteropMessageParameters.md index cc480d33..8a93bf46 100644 --- a/packages/viem/docs/type-aliases/CreateInteropMessageParameters.md +++ b/packages/viem/docs/type-aliases/CreateInteropMessageParameters.md @@ -16,4 +16,4 @@ ## Defined in -[packages/viem/src/utils/interop.ts:15](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/interop.ts#L15) +[packages/viem/src/utils/interop.ts:15](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/interop.ts#L15) diff --git a/packages/viem/docs/type-aliases/CreateInteropMessageReturnType.md b/packages/viem/docs/type-aliases/CreateInteropMessageReturnType.md index 1e3fb6b1..91461640 100644 --- a/packages/viem/docs/type-aliases/CreateInteropMessageReturnType.md +++ b/packages/viem/docs/type-aliases/CreateInteropMessageReturnType.md @@ -20,4 +20,4 @@ ## Defined in -[packages/viem/src/utils/interop.ts:16](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/interop.ts#L16) +[packages/viem/src/utils/interop.ts:16](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/interop.ts#L16) diff --git a/packages/viem/docs/type-aliases/CreateInteropSentL2ToL2MessagesParameters.md b/packages/viem/docs/type-aliases/CreateInteropSentL2ToL2MessagesParameters.md index f659e017..4121d8ac 100644 --- a/packages/viem/docs/type-aliases/CreateInteropSentL2ToL2MessagesParameters.md +++ b/packages/viem/docs/type-aliases/CreateInteropSentL2ToL2MessagesParameters.md @@ -16,4 +16,4 @@ ## Defined in -[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:24](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L24) +[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:24](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L24) diff --git a/packages/viem/docs/type-aliases/CreateInteropSentL2ToL2MessagesReturnType.md b/packages/viem/docs/type-aliases/CreateInteropSentL2ToL2MessagesReturnType.md index c949439b..ab1586c9 100644 --- a/packages/viem/docs/type-aliases/CreateInteropSentL2ToL2MessagesReturnType.md +++ b/packages/viem/docs/type-aliases/CreateInteropSentL2ToL2MessagesReturnType.md @@ -16,4 +16,4 @@ ## Defined in -[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:27](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L27) +[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:27](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L27) diff --git a/packages/viem/docs/type-aliases/DecodeExecutingMessagesParameters.md b/packages/viem/docs/type-aliases/DecodeExecutingMessagesParameters.md index 962771b2..f20150cd 100644 --- a/packages/viem/docs/type-aliases/DecodeExecutingMessagesParameters.md +++ b/packages/viem/docs/type-aliases/DecodeExecutingMessagesParameters.md @@ -16,4 +16,4 @@ ## Defined in -[packages/viem/src/utils/interop.ts:21](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/interop.ts#L21) +[packages/viem/src/utils/interop.ts:21](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/interop.ts#L21) diff --git a/packages/viem/docs/type-aliases/DecodeExecutingMessagesReturnType.md b/packages/viem/docs/type-aliases/DecodeExecutingMessagesReturnType.md index 223c3231..3b8b3e7b 100644 --- a/packages/viem/docs/type-aliases/DecodeExecutingMessagesReturnType.md +++ b/packages/viem/docs/type-aliases/DecodeExecutingMessagesReturnType.md @@ -16,4 +16,4 @@ ## Defined in -[packages/viem/src/utils/interop.ts:22](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/interop.ts#L22) +[packages/viem/src/utils/interop.ts:22](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/interop.ts#L22) diff --git a/packages/viem/docs/type-aliases/DecodeRelayedL2ToL2MessagesParameters.md b/packages/viem/docs/type-aliases/DecodeRelayedL2ToL2MessagesParameters.md index 81095eee..0e6acbab 100644 --- a/packages/viem/docs/type-aliases/DecodeRelayedL2ToL2MessagesParameters.md +++ b/packages/viem/docs/type-aliases/DecodeRelayedL2ToL2MessagesParameters.md @@ -16,4 +16,4 @@ ## Defined in -[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:43](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L43) +[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:43](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L43) diff --git a/packages/viem/docs/type-aliases/DecodeRelayedL2ToL2MessagesReturnType.md b/packages/viem/docs/type-aliases/DecodeRelayedL2ToL2MessagesReturnType.md index c9147f07..ca0b2ce5 100644 --- a/packages/viem/docs/type-aliases/DecodeRelayedL2ToL2MessagesReturnType.md +++ b/packages/viem/docs/type-aliases/DecodeRelayedL2ToL2MessagesReturnType.md @@ -16,4 +16,4 @@ ## Defined in -[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:46](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L46) +[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:46](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L46) diff --git a/packages/viem/docs/type-aliases/DecodeSentL2ToL2MessagesParameters.md b/packages/viem/docs/type-aliases/DecodeSentL2ToL2MessagesParameters.md index ce61361a..3834b9ae 100644 --- a/packages/viem/docs/type-aliases/DecodeSentL2ToL2MessagesParameters.md +++ b/packages/viem/docs/type-aliases/DecodeSentL2ToL2MessagesParameters.md @@ -16,4 +16,4 @@ ## Defined in -[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:31](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L31) +[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:31](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L31) diff --git a/packages/viem/docs/type-aliases/DecodeSentL2ToL2MessagesReturnType.md b/packages/viem/docs/type-aliases/DecodeSentL2ToL2MessagesReturnType.md index cbc0678f..ab3933fc 100644 --- a/packages/viem/docs/type-aliases/DecodeSentL2ToL2MessagesReturnType.md +++ b/packages/viem/docs/type-aliases/DecodeSentL2ToL2MessagesReturnType.md @@ -16,4 +16,4 @@ ## Defined in -[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:32](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L32) +[packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts:32](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/utils/l2ToL2CrossDomainMessenger.ts#L32) diff --git a/packages/viem/docs/type-aliases/DepositSuperchainWETHContractReturnType.md b/packages/viem/docs/type-aliases/DepositSuperchainWETHContractReturnType.md new file mode 100644 index 00000000..e0042ab1 --- /dev/null +++ b/packages/viem/docs/type-aliases/DepositSuperchainWETHContractReturnType.md @@ -0,0 +1,13 @@ +[**@eth-optimism/viem**](../README.md) • **Docs** + +*** + +[@eth-optimism/viem](../README.md) / DepositSuperchainWETHContractReturnType + +# DepositSuperchainWETHContractReturnType + +> **DepositSuperchainWETHContractReturnType**: `ContractFunctionReturnType`\<*typeof* [`superchainWETHABI`](../variables/superchainWETHABI.md), `"payable"`, `"deposit"`\> + +## Defined in + +[packages/viem/src/actions/depositSuperchainWETH.ts:46](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/depositSuperchainWETH.ts#L46) diff --git a/packages/viem/docs/type-aliases/DepositSuperchainWETHErrorType.md b/packages/viem/docs/type-aliases/DepositSuperchainWETHErrorType.md new file mode 100644 index 00000000..dc65a75f --- /dev/null +++ b/packages/viem/docs/type-aliases/DepositSuperchainWETHErrorType.md @@ -0,0 +1,13 @@ +[**@eth-optimism/viem**](../README.md) • **Docs** + +*** + +[@eth-optimism/viem](../README.md) / DepositSuperchainWETHErrorType + +# DepositSuperchainWETHErrorType + +> **DepositSuperchainWETHErrorType**: `EstimateContractGasErrorType` \| `WriteContractErrorType` \| `ErrorType` + +## Defined in + +[packages/viem/src/actions/depositSuperchainWETH.ts:52](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/depositSuperchainWETH.ts#L52) diff --git a/packages/viem/docs/type-aliases/DepositSuperchainWETHParameters.md b/packages/viem/docs/type-aliases/DepositSuperchainWETHParameters.md new file mode 100644 index 00000000..99a4fbce --- /dev/null +++ b/packages/viem/docs/type-aliases/DepositSuperchainWETHParameters.md @@ -0,0 +1,23 @@ +[**@eth-optimism/viem**](../README.md) • **Docs** + +*** + +[@eth-optimism/viem](../README.md) / DepositSuperchainWETHParameters + +# DepositSuperchainWETHParameters\ + +> **DepositSuperchainWETHParameters**\<`TChain`, `TAccount`, `TChainOverride`, `TDerivedChain`\>: `BaseWriteContractActionParameters`\<`TChain`, `TAccount`, `TChainOverride`, `TDerivedChain`\> + +## Type Parameters + +• **TChain** *extends* `Chain` \| `undefined` = `Chain` \| `undefined` + +• **TAccount** *extends* `Account` \| `undefined` = `Account` \| `undefined` + +• **TChainOverride** *extends* `Chain` \| `undefined` = `Chain` \| `undefined` + +• **TDerivedChain** *extends* `Chain` \| `undefined` = `DeriveChain`\<`TChain`, `TChainOverride`\> + +## Defined in + +[packages/viem/src/actions/depositSuperchainWETH.ts:26](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/depositSuperchainWETH.ts#L26) diff --git a/packages/viem/docs/type-aliases/DepositSuperchainWETHReturnType.md b/packages/viem/docs/type-aliases/DepositSuperchainWETHReturnType.md new file mode 100644 index 00000000..39f23d91 --- /dev/null +++ b/packages/viem/docs/type-aliases/DepositSuperchainWETHReturnType.md @@ -0,0 +1,13 @@ +[**@eth-optimism/viem**](../README.md) • **Docs** + +*** + +[@eth-optimism/viem](../README.md) / DepositSuperchainWETHReturnType + +# DepositSuperchainWETHReturnType + +> **DepositSuperchainWETHReturnType**: `Hash` + +## Defined in + +[packages/viem/src/actions/depositSuperchainWETH.ts:41](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/depositSuperchainWETH.ts#L41) diff --git a/packages/viem/docs/type-aliases/MessageIdentifier.md b/packages/viem/docs/type-aliases/MessageIdentifier.md index fb2bd722..774977f0 100644 --- a/packages/viem/docs/type-aliases/MessageIdentifier.md +++ b/packages/viem/docs/type-aliases/MessageIdentifier.md @@ -44,4 +44,4 @@ The timestamp that the log was emitted. Used to enforce the timestamp invariant ## Defined in -[packages/viem/src/types/interop.ts:7](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/types/interop.ts#L7) +[packages/viem/src/types/interop.ts:7](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/types/interop.ts#L7) diff --git a/packages/viem/docs/type-aliases/RelayL2ToL2MessageContractReturnType.md b/packages/viem/docs/type-aliases/RelayL2ToL2MessageContractReturnType.md index 40da24c3..d45e6100 100644 --- a/packages/viem/docs/type-aliases/RelayL2ToL2MessageContractReturnType.md +++ b/packages/viem/docs/type-aliases/RelayL2ToL2MessageContractReturnType.md @@ -10,4 +10,4 @@ ## Defined in -[packages/viem/src/actions/relayL2ToL2Message.ts:53](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/relayL2ToL2Message.ts#L53) +[packages/viem/src/actions/relayL2ToL2Message.ts:53](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/relayL2ToL2Message.ts#L53) diff --git a/packages/viem/docs/type-aliases/RelayL2ToL2MessageErrorType.md b/packages/viem/docs/type-aliases/RelayL2ToL2MessageErrorType.md index ab3a9da4..70a0adf2 100644 --- a/packages/viem/docs/type-aliases/RelayL2ToL2MessageErrorType.md +++ b/packages/viem/docs/type-aliases/RelayL2ToL2MessageErrorType.md @@ -10,4 +10,4 @@ ## Defined in -[packages/viem/src/actions/relayL2ToL2Message.ts:62](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/relayL2ToL2Message.ts#L62) +[packages/viem/src/actions/relayL2ToL2Message.ts:62](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/relayL2ToL2Message.ts#L62) diff --git a/packages/viem/docs/type-aliases/RelayL2ToL2MessageParameters.md b/packages/viem/docs/type-aliases/RelayL2ToL2MessageParameters.md index cf57a8a1..585f1811 100644 --- a/packages/viem/docs/type-aliases/RelayL2ToL2MessageParameters.md +++ b/packages/viem/docs/type-aliases/RelayL2ToL2MessageParameters.md @@ -34,4 +34,4 @@ MessagePayload of the SentMessage event * ## Defined in -[packages/viem/src/actions/relayL2ToL2Message.ts:28](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/relayL2ToL2Message.ts#L28) +[packages/viem/src/actions/relayL2ToL2Message.ts:28](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/relayL2ToL2Message.ts#L28) diff --git a/packages/viem/docs/type-aliases/RelayL2ToL2MessageReturnType.md b/packages/viem/docs/type-aliases/RelayL2ToL2MessageReturnType.md index 0e591e8b..faa57761 100644 --- a/packages/viem/docs/type-aliases/RelayL2ToL2MessageReturnType.md +++ b/packages/viem/docs/type-aliases/RelayL2ToL2MessageReturnType.md @@ -10,4 +10,4 @@ ## Defined in -[packages/viem/src/actions/relayL2ToL2Message.ts:48](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/relayL2ToL2Message.ts#L48) +[packages/viem/src/actions/relayL2ToL2Message.ts:48](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/relayL2ToL2Message.ts#L48) diff --git a/packages/viem/docs/type-aliases/SendL2ToL2MessageContractReturnType.md b/packages/viem/docs/type-aliases/SendL2ToL2MessageContractReturnType.md index be6ba6b9..98565c29 100644 --- a/packages/viem/docs/type-aliases/SendL2ToL2MessageContractReturnType.md +++ b/packages/viem/docs/type-aliases/SendL2ToL2MessageContractReturnType.md @@ -10,4 +10,4 @@ ## Defined in -[packages/viem/src/actions/sendL2ToL2Message.ts:55](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendL2ToL2Message.ts#L55) +[packages/viem/src/actions/sendL2ToL2Message.ts:55](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendL2ToL2Message.ts#L55) diff --git a/packages/viem/docs/type-aliases/SendL2ToL2MessageErrorType.md b/packages/viem/docs/type-aliases/SendL2ToL2MessageErrorType.md index cf3e1e34..c7d806b9 100644 --- a/packages/viem/docs/type-aliases/SendL2ToL2MessageErrorType.md +++ b/packages/viem/docs/type-aliases/SendL2ToL2MessageErrorType.md @@ -10,4 +10,4 @@ ## Defined in -[packages/viem/src/actions/sendL2ToL2Message.ts:64](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendL2ToL2Message.ts#L64) +[packages/viem/src/actions/sendL2ToL2Message.ts:64](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendL2ToL2Message.ts#L64) diff --git a/packages/viem/docs/type-aliases/SendL2ToL2MessageParameters.md b/packages/viem/docs/type-aliases/SendL2ToL2MessageParameters.md index 355d4964..b3910b0f 100644 --- a/packages/viem/docs/type-aliases/SendL2ToL2MessageParameters.md +++ b/packages/viem/docs/type-aliases/SendL2ToL2MessageParameters.md @@ -40,4 +40,4 @@ Target contract or wallet address. ## Defined in -[packages/viem/src/actions/sendL2ToL2Message.ts:28](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendL2ToL2Message.ts#L28) +[packages/viem/src/actions/sendL2ToL2Message.ts:28](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendL2ToL2Message.ts#L28) diff --git a/packages/viem/docs/type-aliases/SendL2ToL2MessageReturnType.md b/packages/viem/docs/type-aliases/SendL2ToL2MessageReturnType.md index ca840efc..e5a79425 100644 --- a/packages/viem/docs/type-aliases/SendL2ToL2MessageReturnType.md +++ b/packages/viem/docs/type-aliases/SendL2ToL2MessageReturnType.md @@ -10,4 +10,4 @@ ## Defined in -[packages/viem/src/actions/sendL2ToL2Message.ts:50](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendL2ToL2Message.ts#L50) +[packages/viem/src/actions/sendL2ToL2Message.ts:50](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendL2ToL2Message.ts#L50) diff --git a/packages/viem/docs/type-aliases/SendSupERC20ContractReturnType.md b/packages/viem/docs/type-aliases/SendSupERC20ContractReturnType.md index e7e87188..983cc9ac 100644 --- a/packages/viem/docs/type-aliases/SendSupERC20ContractReturnType.md +++ b/packages/viem/docs/type-aliases/SendSupERC20ContractReturnType.md @@ -10,4 +10,4 @@ ## Defined in -[packages/viem/src/actions/sendSupERC20.ts:56](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendSupERC20.ts#L56) +[packages/viem/src/actions/sendSupERC20.ts:56](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendSupERC20.ts#L56) diff --git a/packages/viem/docs/type-aliases/SendSupERC20ErrorType.md b/packages/viem/docs/type-aliases/SendSupERC20ErrorType.md index 729e515d..d3b4e3ff 100644 --- a/packages/viem/docs/type-aliases/SendSupERC20ErrorType.md +++ b/packages/viem/docs/type-aliases/SendSupERC20ErrorType.md @@ -10,4 +10,4 @@ ## Defined in -[packages/viem/src/actions/sendSupERC20.ts:65](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendSupERC20.ts#L65) +[packages/viem/src/actions/sendSupERC20.ts:65](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendSupERC20.ts#L65) diff --git a/packages/viem/docs/type-aliases/SendSupERC20Parameters.md b/packages/viem/docs/type-aliases/SendSupERC20Parameters.md index 5cdd7624..9e7c454c 100644 --- a/packages/viem/docs/type-aliases/SendSupERC20Parameters.md +++ b/packages/viem/docs/type-aliases/SendSupERC20Parameters.md @@ -46,4 +46,4 @@ Token to send. ## Defined in -[packages/viem/src/actions/sendSupERC20.ts:27](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendSupERC20.ts#L27) +[packages/viem/src/actions/sendSupERC20.ts:27](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendSupERC20.ts#L27) diff --git a/packages/viem/docs/type-aliases/SendSupERC20ReturnType.md b/packages/viem/docs/type-aliases/SendSupERC20ReturnType.md index 8dd82e3c..de818ff8 100644 --- a/packages/viem/docs/type-aliases/SendSupERC20ReturnType.md +++ b/packages/viem/docs/type-aliases/SendSupERC20ReturnType.md @@ -10,4 +10,4 @@ ## Defined in -[packages/viem/src/actions/sendSupERC20.ts:51](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendSupERC20.ts#L51) +[packages/viem/src/actions/sendSupERC20.ts:51](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendSupERC20.ts#L51) diff --git a/packages/viem/docs/type-aliases/SendSuperchainWETHParameters.md b/packages/viem/docs/type-aliases/SendSuperchainWETHParameters.md index e3d6af17..d370b6a2 100644 --- a/packages/viem/docs/type-aliases/SendSuperchainWETHParameters.md +++ b/packages/viem/docs/type-aliases/SendSuperchainWETHParameters.md @@ -40,4 +40,4 @@ Address to send tokens to. ## Defined in -[packages/viem/src/actions/sendSuperchainWETH.ts:27](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/actions/sendSuperchainWETH.ts#L27) +[packages/viem/src/actions/sendSuperchainWETH.ts:27](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/actions/sendSuperchainWETH.ts#L27) diff --git a/packages/viem/docs/variables/contracts.md b/packages/viem/docs/variables/contracts.md index d94827d3..d62c8efc 100644 --- a/packages/viem/docs/variables/contracts.md +++ b/packages/viem/docs/variables/contracts.md @@ -94,4 +94,4 @@ OP Stack Predeploy Addresses ## Defined in -[packages/viem/src/contracts.ts:8](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/contracts.ts#L8) +[packages/viem/src/contracts.ts:8](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/contracts.ts#L8) diff --git a/packages/viem/docs/variables/crossL2InboxABI.md b/packages/viem/docs/variables/crossL2InboxABI.md index fae1ab88..0aeaef55 100644 --- a/packages/viem/docs/variables/crossL2InboxABI.md +++ b/packages/viem/docs/variables/crossL2InboxABI.md @@ -12,4 +12,4 @@ ABI for the OP Stack contract `CrossL2Inbox` ## Defined in -[packages/viem/src/abis.ts:7](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/abis.ts#L7) +[packages/viem/src/abis.ts:7](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/abis.ts#L7) diff --git a/packages/viem/docs/variables/l2ToL2CrossDomainMessengerABI.md b/packages/viem/docs/variables/l2ToL2CrossDomainMessengerABI.md index fee02551..83c6b40b 100644 --- a/packages/viem/docs/variables/l2ToL2CrossDomainMessengerABI.md +++ b/packages/viem/docs/variables/l2ToL2CrossDomainMessengerABI.md @@ -12,4 +12,4 @@ ABI for the OP Stack contract `L2ToL2CrossDomainMessenger` ## Defined in -[packages/viem/src/abis.ts:293](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/abis.ts#L293) +[packages/viem/src/abis.ts:293](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/abis.ts#L293) diff --git a/packages/viem/docs/variables/superchainERC20ABI.md b/packages/viem/docs/variables/superchainERC20ABI.md index 7b19c0e9..6f6563d1 100644 --- a/packages/viem/docs/variables/superchainERC20ABI.md +++ b/packages/viem/docs/variables/superchainERC20ABI.md @@ -12,4 +12,4 @@ ABI for the OP Stack contract `SuperchainERC20` ## Defined in -[packages/viem/src/abis.ts:980](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/abis.ts#L980) +[packages/viem/src/abis.ts:980](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/abis.ts#L980) diff --git a/packages/viem/docs/variables/superchainTokenBridgeABI.md b/packages/viem/docs/variables/superchainTokenBridgeABI.md index a18bdc5d..271dc227 100644 --- a/packages/viem/docs/variables/superchainTokenBridgeABI.md +++ b/packages/viem/docs/variables/superchainTokenBridgeABI.md @@ -12,4 +12,4 @@ ABI for the OP Stack contract `SuperchainTokenBridge` ## Defined in -[packages/viem/src/abis.ts:1411](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/abis.ts#L1411) +[packages/viem/src/abis.ts:1411](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/abis.ts#L1411) diff --git a/packages/viem/docs/variables/superchainWETHABI.md b/packages/viem/docs/variables/superchainWETHABI.md index 10ce632b..1e9f678d 100644 --- a/packages/viem/docs/variables/superchainWETHABI.md +++ b/packages/viem/docs/variables/superchainWETHABI.md @@ -12,4 +12,4 @@ ABI for the OP Stack contract `SuperchainWETH` ## Defined in -[packages/viem/src/abis.ts:588](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/abis.ts#L588) +[packages/viem/src/abis.ts:588](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/abis.ts#L588) diff --git a/packages/viem/docs/variables/supersimL1.md b/packages/viem/docs/variables/supersimL1.md index 2c280103..f5f870b6 100644 --- a/packages/viem/docs/variables/supersimL1.md +++ b/packages/viem/docs/variables/supersimL1.md @@ -152,4 +152,4 @@ Flag for test networks ## Defined in -[packages/viem/src/chains/supersim.ts:8](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/chains/supersim.ts#L8) +[packages/viem/src/chains/supersim.ts:8](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/chains/supersim.ts#L8) diff --git a/packages/viem/docs/variables/supersimL2A.md b/packages/viem/docs/variables/supersimL2A.md index 7affa648..327d9ec8 100644 --- a/packages/viem/docs/variables/supersimL2A.md +++ b/packages/viem/docs/variables/supersimL2A.md @@ -504,4 +504,4 @@ Flag for test networks ## Defined in -[packages/viem/src/chains/supersim.ts:24](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/chains/supersim.ts#L24) +[packages/viem/src/chains/supersim.ts:24](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/chains/supersim.ts#L24) diff --git a/packages/viem/docs/variables/supersimL2B.md b/packages/viem/docs/variables/supersimL2B.md index c0ed43ba..391ae373 100644 --- a/packages/viem/docs/variables/supersimL2B.md +++ b/packages/viem/docs/variables/supersimL2B.md @@ -504,4 +504,4 @@ Flag for test networks ## Defined in -[packages/viem/src/chains/supersim.ts:41](https://github.com/ethereum-optimism/ecosystem/blob/2fda6aba11612b1bd271ada62170b607e878a916/packages/viem/src/chains/supersim.ts#L41) +[packages/viem/src/chains/supersim.ts:41](https://github.com/ethereum-optimism/ecosystem/blob/13a9597363979821622ee318a8281c7048f1a00b/packages/viem/src/chains/supersim.ts#L41) diff --git a/packages/viem/src/actions/depositSuperchainWETH.spec.ts b/packages/viem/src/actions/depositSuperchainWETH.spec.ts new file mode 100644 index 00000000..7284adc9 --- /dev/null +++ b/packages/viem/src/actions/depositSuperchainWETH.spec.ts @@ -0,0 +1,57 @@ +import { describe, expect, it } from 'vitest' + +import { superchainWETHABI } from '@/abis.js' +import { contracts } from '@/contracts.js' +import { publicClientA, testAccount, walletClientA } from '@/test/clients.js' + +const AMOUNT_TO_SEND = 10n + +describe('depositSuperchainWETH', () => { + describe('write contract', () => { + it('should return expected request', async () => { + const startingBalance = await publicClientA.readContract({ + address: contracts.superchainWETH.address, + abi: superchainWETHABI, + functionName: 'balanceOf', + args: [testAccount.address], + }) + + const hash = await walletClientA.depositSuperchainWETH({ + value: AMOUNT_TO_SEND, + }) + + await publicClientA.waitForTransactionReceipt({ hash }) + + const endingBalance = await publicClientA.readContract({ + address: contracts.superchainWETH.address, + abi: superchainWETHABI, + functionName: 'balanceOf', + args: [testAccount.address], + }) + + expect(endingBalance).toEqual(startingBalance + AMOUNT_TO_SEND) + }) + }) + + describe('estimate gas', () => { + it('should estimate gas', async () => { + const gas = await publicClientA.estimateDepositSuperchainWETHGas({ + account: testAccount.address, + value: AMOUNT_TO_SEND, + }) + + expect(gas).toBeDefined() + }) + }) + + describe('simulate', () => { + it('should simulate', async () => { + expect(() => + publicClientA.simulateDepositSuperchainWETH({ + account: testAccount.address, + value: AMOUNT_TO_SEND, + }), + ).not.throw() + }) + }) +}) diff --git a/packages/viem/src/actions/depositSuperchainWETH.ts b/packages/viem/src/actions/depositSuperchainWETH.ts new file mode 100644 index 00000000..5cf21eed --- /dev/null +++ b/packages/viem/src/actions/depositSuperchainWETH.ts @@ -0,0 +1,136 @@ +/** @module depositSuperchainWETH */ +import type { + Account, + Chain, + Client, + ContractFunctionReturnType, + DeriveChain, + EstimateContractGasErrorType, + EstimateContractGasParameters, + Hash, + SimulateContractParameters, + Transport, + WriteContractErrorType, +} from 'viem' +import { estimateContractGas, simulateContract } from 'viem/actions' + +import { superchainWETHABI } from '@/abis.js' +import { contracts } from '@/contracts.js' +import type { BaseWriteContractActionParameters } from '@/core/baseWriteAction.js' +import { baseWriteAction } from '@/core/baseWriteAction.js' +import type { ErrorType } from '@/types/utils.js' + +/** + * @category Types + */ +export type DepositSuperchainWETHParameters< + TChain extends Chain | undefined = Chain | undefined, + TAccount extends Account | undefined = Account | undefined, + TChainOverride extends Chain | undefined = Chain | undefined, + TDerivedChain extends Chain | undefined = DeriveChain, +> = BaseWriteContractActionParameters< + TChain, + TAccount, + TChainOverride, + TDerivedChain +> + +/** + * @category Types + */ +export type DepositSuperchainWETHReturnType = Hash + +/** + * @category Types + */ +export type DepositSuperchainWETHContractReturnType = + ContractFunctionReturnType + +/** + * @category Types + */ +export type DepositSuperchainWETHErrorType = + | EstimateContractGasErrorType + | WriteContractErrorType + | ErrorType + +/** + * Deposits ETH to the SuperchainWETH contract. + * @category L2 Wallet Actions + * @param client - L2 Wallet Client + * @param parameters - {@link DepositSuperchainWETHParameters} + * @returns The depositSuperchainWETH transaction hash. {@link DepositSuperchainWETHReturnType} + */ +export async function depositSuperchainWETH< + chain extends Chain | undefined, + account extends Account | undefined, + chainOverride extends Chain | undefined = undefined, +>( + client: Client, + parameters: DepositSuperchainWETHParameters, +): Promise { + return baseWriteAction( + client, + { + abi: superchainWETHABI, + contractAddress: contracts.superchainWETH.address, + contractFunctionName: 'deposit', + contractArgs: [], + }, + parameters, + ) +} + +/** + * Estimates gas for {@link depositSuperchainWETH} + * @category L2 Wallet Actions + * @param client - L2 Wallet Client + * @param parameters - {@link DepositSuperchainWETHParameters} + * @returns The estimated gas value. + */ +export async function estimateDepositSuperchainWETHGas< + TChain extends Chain | undefined, + TAccount extends Account | undefined, + TChainOverride extends Chain | undefined = undefined, +>( + client: Client, + parameters: DepositSuperchainWETHParameters, +): Promise { + return estimateContractGas(client, { + abi: superchainWETHABI, + address: contracts.superchainWETH.address, + functionName: 'deposit', + args: [], + ...parameters, + } as EstimateContractGasParameters) +} + +/** + * Simulate contract call for {@link depositSuperchainWETH} + * @category L2 Public Actions + * @param client - L2 Public Client + * @param parameters - {@link DepositSuperchainWETHParameters} + * @returns The contract functions return value. {@link depositSuperchainWETHContractReturnType} + */ +export async function simulateDepositSuperchainWETH< + TChain extends Chain | undefined, + TAccount extends Account | undefined, + TChainOverride extends Chain | undefined = undefined, +>( + client: Client, + parameters: DepositSuperchainWETHParameters, +): Promise { + const { account, value } = parameters + + const res = await simulateContract(client, { + account, + abi: superchainWETHABI, + address: contracts.superchainWETH.address, + chain: client.chain, + functionName: 'deposit', + args: [], + value, + } as SimulateContractParameters) + + return res.result as DepositSuperchainWETHContractReturnType +} diff --git a/packages/viem/src/actions/sendSuperchainWETH.spec.ts b/packages/viem/src/actions/sendSuperchainWETH.spec.ts index d12670be..4d8efab7 100644 --- a/packages/viem/src/actions/sendSuperchainWETH.spec.ts +++ b/packages/viem/src/actions/sendSuperchainWETH.spec.ts @@ -14,10 +14,7 @@ const AMOUNT_TO_SEND = 10n describe('sendSuperchainWETH', () => { beforeAll(async () => { - const hash = await walletClientA.writeContract({ - address: contracts.superchainWETH.address, - abi: parseAbi(['function deposit() payable']), - functionName: 'deposit', + const hash = await walletClientA.depositSuperchainWETH({ value: 1000n, }) diff --git a/packages/viem/src/core/baseWriteAction.ts b/packages/viem/src/core/baseWriteAction.ts index 68d32179..726c7683 100644 --- a/packages/viem/src/core/baseWriteAction.ts +++ b/packages/viem/src/core/baseWriteAction.ts @@ -37,7 +37,6 @@ export type BaseWriteContractActionParameters< | 'gasPrice' | 'to' | 'type' - | 'value' > > & GetAccountParameter & @@ -82,6 +81,7 @@ export async function baseWriteAction< maxFeePerGas, maxPriorityFeePerGas, nonce, + value, } = parameters const gas_ = @@ -96,6 +96,7 @@ export async function baseWriteAction< maxFeePerGas, maxPriorityFeePerGas, nonce, + value, } as EstimateContractGasParameters) : gas ?? undefined @@ -110,5 +111,6 @@ export async function baseWriteAction< maxFeePerGas, maxPriorityFeePerGas, nonce, + value, } satisfies WriteContractParameters as any) } diff --git a/packages/viem/src/decorators/publicL2.ts b/packages/viem/src/decorators/publicL2.ts index ea3ed521..fc5d335d 100644 --- a/packages/viem/src/decorators/publicL2.ts +++ b/packages/viem/src/decorators/publicL2.ts @@ -2,6 +2,14 @@ import type { Account, Chain, Client, Transport } from 'viem' import type { PublicActionsL2 as UpstreamPublicActionsL2 } from 'viem/op-stack' import { publicActionsL2 as upstreamPublicActionsL2 } from 'viem/op-stack' +import type { + DepositSuperchainWETHContractReturnType, + DepositSuperchainWETHParameters, +} from '@/actions/depositSuperchainWETH.js' +import { + estimateDepositSuperchainWETHGas, + simulateDepositSuperchainWETH, +} from '@/actions/depositSuperchainWETH.js' import type { RelayL2ToL2MessageContractReturnType, RelayL2ToL2MessageParameters, @@ -54,6 +62,16 @@ export type PublicActionsL2< parameters: SendSupERC20Parameters, ) => Promise + estimateDepositSuperchainWETHGas: < + TChainOverride extends Chain | undefined = undefined, + >( + parameters: DepositSuperchainWETHParameters< + TChain, + TAccount, + TChainOverride + >, + ) => Promise + estimateSendSuperchainWETHGas: < TChainOverride extends Chain | undefined = undefined, >( @@ -76,6 +94,16 @@ export type PublicActionsL2< parameters: SendSupERC20Parameters, ) => Promise + simulateDepositSuperchainWETH: < + TChainOverride extends Chain | undefined = undefined, + >( + parameters: DepositSuperchainWETHParameters< + TChain, + TAccount, + TChainOverride + >, + ) => Promise + simulateSendSuperchainWETH: < TChainOverride extends Chain | undefined = undefined, >( @@ -100,11 +128,15 @@ export function publicActionsL2() { estimateSendSupERC20Gas: (args) => estimateSendSupERC20Gas(client, args), estimateSendSuperchainWETHGas: (args) => estimateSendSuperchainWETHGas(client, args), + estimateDepositSuperchainWETHGas: (args) => + estimateDepositSuperchainWETHGas(client, args), simulateSendL2ToL2Message: (args) => simulateSendL2ToL2Message(client, args), simulateRelayL2ToL2Message: (args) => simulateRelayL2ToL2Message(client, args), simulateSendSupERC20: (args) => simulateSendSupERC20(client, args), + simulateDepositSuperchainWETH: (args) => + simulateDepositSuperchainWETH(client, args), simulateSendSuperchainWETH: (args) => simulateSendSuperchainWETH(client, args), } as PublicActionsL2 diff --git a/packages/viem/src/decorators/walletL2.ts b/packages/viem/src/decorators/walletL2.ts index cbc302d8..2d80a7c5 100644 --- a/packages/viem/src/decorators/walletL2.ts +++ b/packages/viem/src/decorators/walletL2.ts @@ -2,6 +2,11 @@ import type { Account, Chain, Client, Transport } from 'viem' import type { WalletActionsL2 as UpstreamWalletActionsL2 } from 'viem/op-stack' import { walletActionsL2 as upstreamWalletActionsL2 } from 'viem/op-stack' +import { + depositSuperchainWETH, + type DepositSuperchainWETHParameters, + type DepositSuperchainWETHReturnType, +} from '@/actions/depositSuperchainWETH.js' import type { RelayL2ToL2MessageParameters, RelayL2ToL2MessageReturnType, @@ -36,6 +41,9 @@ export type WalletActionsL2< sendSuperchainWETH: ( parameters: SendSuperchainWETHParameters, ) => Promise + depositSuperchainWETH: ( + parameters: DepositSuperchainWETHParameters, + ) => Promise } export function walletActionsL2() { @@ -52,6 +60,7 @@ export function walletActionsL2() { relayL2ToL2Message: (args) => relayL2ToL2Message(client, args), sendSupERC20: (args) => sendSupERC20(client, args), sendSuperchainWETH: (args) => sendSuperchainWETH(client, args), + depositSuperchainWETH: (args) => depositSuperchainWETH(client, args), } as WalletActionsL2 } } diff --git a/packages/viem/src/index.ts b/packages/viem/src/index.ts index 6b0543ab..7b19e857 100644 --- a/packages/viem/src/index.ts +++ b/packages/viem/src/index.ts @@ -11,6 +11,17 @@ export { supersimL1, supersimL2A, supersimL2B } from '@/chains/supersim.js' export { contracts } from '@/contracts.js' // actions +export type { + DepositSuperchainWETHContractReturnType, + DepositSuperchainWETHErrorType, + DepositSuperchainWETHParameters, + DepositSuperchainWETHReturnType, +} from '@/actions/depositSuperchainWETH.js' +export { + depositSuperchainWETH, + estimateDepositSuperchainWETHGas, + simulateDepositSuperchainWETH, +} from '@/actions/depositSuperchainWETH.js' export type { RelayL2ToL2MessageContractReturnType, RelayL2ToL2MessageErrorType, diff --git a/packages/viem/src/test/e2e/interop.spec.ts b/packages/viem/src/test/e2e/interop.spec.ts index 67b81373..f5538d2c 100644 --- a/packages/viem/src/test/e2e/interop.spec.ts +++ b/packages/viem/src/test/e2e/interop.spec.ts @@ -1,6 +1,7 @@ import { encodeFunctionData, parseAbi } from 'viem' import { beforeAll, describe, expect, it } from 'vitest' +import { superchainWETHABI } from '@/abis.js' import { supersimL2B } from '@/chains/supersim.js' import { contracts } from '@/contracts.js' import { @@ -125,15 +126,8 @@ describe('SuperchainERC20 Flow', () => { }) describe('SuperchainWETH Flow', () => { - const balanceOfABI = parseAbi([ - 'function balanceOf(address account) view returns (uint256)', - ]) - beforeAll(async () => { - const hash = await walletClientA.writeContract({ - address: contracts.superchainWETH.address, - abi: parseAbi(['function deposit() payable']), - functionName: 'deposit', + const hash = await walletClientA.depositSuperchainWETH({ value: 1000n, }) @@ -143,7 +137,7 @@ describe('SuperchainWETH Flow', () => { it('should send SuperchainWETH and relay cross chain message to burn/mint tokens', async () => { const startingBalance = await publicClientB.readContract({ address: contracts.superchainWETH.address, - abi: balanceOfABI, + abi: superchainWETHABI, functionName: 'balanceOf', args: [testAccount.address], }) @@ -179,7 +173,7 @@ describe('SuperchainWETH Flow', () => { const endingBalance = await publicClientB.readContract({ address: contracts.superchainWETH.address, - abi: balanceOfABI, + abi: superchainWETHABI, functionName: 'balanceOf', args: [testAccount.address], })