-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(viem): add
crossChainSendETH
action (#584)
feat(viem): add crossChainSendETH action
- Loading branch information
1 parent
04beea5
commit 852b42d
Showing
79 changed files
with
762 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@eth-optimism/viem": patch | ||
--- | ||
|
||
add crossChainSendETH action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[**@eth-optimism/viem**](../README.md) • **Docs** | ||
|
||
*** | ||
|
||
[@eth-optimism/viem](../README.md) / crossChainSendETH | ||
|
||
# crossChainSendETH() | ||
|
||
> **crossChainSendETH**\<`chain`, `account`, `chainOverride`\>(`client`, `parameters`): `Promise`\<[`CrossChainSendETHContractReturnType`](../type-aliases/CrossChainSendETHContractReturnType.md)\> | ||
Sends ETH to the specified recipient on the destination chain | ||
|
||
## 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**: [`CrossChainSendETHParameters`](../type-aliases/CrossChainSendETHParameters.md)\<`chain`, `account`, `chainOverride`, `DeriveChain`\<`chain`, `chainOverride`\>\> | ||
|
||
[CrossChainSendETHParameters](../type-aliases/CrossChainSendETHParameters.md) | ||
|
||
## Returns | ||
|
||
`Promise`\<[`CrossChainSendETHContractReturnType`](../type-aliases/CrossChainSendETHContractReturnType.md)\> | ||
|
||
The crosschainSendETH transaction hash. [CrossChainSendETHContractReturnType](../type-aliases/CrossChainSendETHContractReturnType.md) | ||
|
||
## Defined in | ||
|
||
[packages/viem/src/actions/crosschainSendETH.ts:67](https://github.com/ethereum-optimism/ecosystem/blob/1d855f26d1024617b154d28d909dbc33a421f5de/packages/viem/src/actions/crosschainSendETH.ts#L67) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
packages/viem/docs/functions/estimateCrossChainSendETHGas.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[**@eth-optimism/viem**](../README.md) • **Docs** | ||
|
||
*** | ||
|
||
[@eth-optimism/viem](../README.md) / estimateCrossChainSendETHGas | ||
|
||
# estimateCrossChainSendETHGas() | ||
|
||
> **estimateCrossChainSendETHGas**\<`TChain`, `TAccount`, `TChainOverride`\>(`client`, `parameters`): `Promise`\<`bigint`\> | ||
Estimates gas for [crossChainSendETH](crossChainSendETH.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**: [`CrossChainSendETHParameters`](../type-aliases/CrossChainSendETHParameters.md)\<`TChain`, `TAccount`, `TChainOverride`, `DeriveChain`\<`TChain`, `TChainOverride`\>\> | ||
|
||
[CrossChainSendETHParameters](../type-aliases/CrossChainSendETHParameters.md) | ||
|
||
## Returns | ||
|
||
`Promise`\<`bigint`\> | ||
|
||
The estimated gas value. | ||
|
||
## Defined in | ||
|
||
[packages/viem/src/actions/crosschainSendETH.ts:96](https://github.com/ethereum-optimism/ecosystem/blob/1d855f26d1024617b154d28d909dbc33a421f5de/packages/viem/src/actions/crosschainSendETH.ts#L96) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[**@eth-optimism/viem**](../README.md) • **Docs** | ||
|
||
*** | ||
|
||
[@eth-optimism/viem](../README.md) / simulateCrossChainSendETH | ||
|
||
# simulateCrossChainSendETH() | ||
|
||
> **simulateCrossChainSendETH**\<`TChain`, `TAccount`, `TChainOverride`\>(`client`, `parameters`): `Promise`\<[`CrossChainSendETHContractReturnType`](../type-aliases/CrossChainSendETHContractReturnType.md)\> | ||
Simulate contract call for [crossChainSendETH](crossChainSendETH.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**: [`CrossChainSendETHParameters`](../type-aliases/CrossChainSendETHParameters.md)\<`TChain`, `TAccount`, `TChainOverride`, `DeriveChain`\<`TChain`, `TChainOverride`\>\> | ||
|
||
[CrossChainSendETHParameters](../type-aliases/CrossChainSendETHParameters.md) | ||
|
||
## Returns | ||
|
||
`Promise`\<[`CrossChainSendETHContractReturnType`](../type-aliases/CrossChainSendETHContractReturnType.md)\> | ||
|
||
The contract functions return value. [CrossChainSendETHContractReturnType](../type-aliases/CrossChainSendETHContractReturnType.md) | ||
|
||
## Defined in | ||
|
||
[packages/viem/src/actions/crosschainSendETH.ts:122](https://github.com/ethereum-optimism/ecosystem/blob/1d855f26d1024617b154d28d909dbc33a421f5de/packages/viem/src/actions/crosschainSendETH.ts#L122) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/viem/docs/type-aliases/CrossChainSendETHContractReturnType.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[**@eth-optimism/viem**](../README.md) • **Docs** | ||
|
||
*** | ||
|
||
[@eth-optimism/viem](../README.md) / CrossChainSendETHContractReturnType | ||
|
||
# CrossChainSendETHContractReturnType | ||
|
||
> **CrossChainSendETHContractReturnType**: `ContractFunctionReturnType`\<*typeof* [`superchainWETHABI`](../variables/superchainWETHABI.md), `"payable"`, `"sendETH"`\> | ||
## Defined in | ||
|
||
[packages/viem/src/actions/crosschainSendETH.ts:46](https://github.com/ethereum-optimism/ecosystem/blob/1d855f26d1024617b154d28d909dbc33a421f5de/packages/viem/src/actions/crosschainSendETH.ts#L46) |
13 changes: 13 additions & 0 deletions
13
packages/viem/docs/type-aliases/CrossChainSendETHErrorType.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[**@eth-optimism/viem**](../README.md) • **Docs** | ||
|
||
*** | ||
|
||
[@eth-optimism/viem](../README.md) / CrossChainSendETHErrorType | ||
|
||
# CrossChainSendETHErrorType | ||
|
||
> **CrossChainSendETHErrorType**: `EstimateContractGasErrorType` \| `WriteContractErrorType` \| `ErrorType` | ||
## Defined in | ||
|
||
[packages/viem/src/actions/crosschainSendETH.ts:55](https://github.com/ethereum-optimism/ecosystem/blob/1d855f26d1024617b154d28d909dbc33a421f5de/packages/viem/src/actions/crosschainSendETH.ts#L55) |
Oops, something went wrong.