Skip to content

Commit

Permalink
fix(viem): separated L2ToL2CDM and CrossL2Inbox abstractions (#496)
Browse files Browse the repository at this point in the history
* fix: viem to use latest abstractions

* tests pass & wagmi updates

* viem lint

* viem docs

* wagmi docs

* specify account

* changeset
  • Loading branch information
hamdiallam authored Oct 9, 2024
1 parent 11d7c80 commit 9954f3f
Show file tree
Hide file tree
Showing 78 changed files with 2,665 additions and 1,108 deletions.
6 changes: 6 additions & 0 deletions .changeset/plenty-shrimps-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@eth-optimism/wagmi": patch
"@eth-optimism/viem": patch
---

seperated CrossL2Inbox & L2ToL2CrossDomainMessenger actions/util abstractions
42 changes: 25 additions & 17 deletions packages/viem/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,29 @@

## L2 Public Actions

- [simulateExecuteL2ToL2Message](functions/simulateExecuteL2ToL2Message.md)
- [simulateRelayL2ToL2Message](functions/simulateRelayL2ToL2Message.md)
- [simulateSendL2ToL2Message](functions/simulateSendL2ToL2Message.md)

## L2 Wallet Actions

- [estimateExecuteL2ToL2MessageGas](functions/estimateExecuteL2ToL2MessageGas.md)
- [estimateRelayL2ToL2MessageGas](functions/estimateRelayL2ToL2MessageGas.md)
- [estimateSendL2ToL2MessageGas](functions/estimateSendL2ToL2MessageGas.md)
- [executeL2ToL2Message](functions/executeL2ToL2Message.md)
- [relayL2ToL2Message](functions/relayL2ToL2Message.md)
- [sendL2ToL2Message](functions/sendL2ToL2Message.md)

## Other

- [CreateInteropMessageParameters](type-aliases/CreateInteropMessageParameters.md)
- [CreateInteropMessageReturnType](type-aliases/CreateInteropMessageReturnType.md)
- [CreateInteropSentL2ToL2MessagesParameters](type-aliases/CreateInteropSentL2ToL2MessagesParameters.md)
- [CreateInteropSentL2ToL2MessagesReturnType](type-aliases/CreateInteropSentL2ToL2MessagesReturnType.md)
- [DecodeExecutingMessagesParameters](type-aliases/DecodeExecutingMessagesParameters.md)
- [DecodeExecutingMessagesReturnType](type-aliases/DecodeExecutingMessagesReturnType.md)
- [DecodeRelayedL2ToL2MessagesParameters](type-aliases/DecodeRelayedL2ToL2MessagesParameters.md)
- [DecodeRelayedL2ToL2MessagesReturnType](type-aliases/DecodeRelayedL2ToL2MessagesReturnType.md)
- [DecodeSentL2ToL2MessagesParameters](type-aliases/DecodeSentL2ToL2MessagesParameters.md)
- [DecodeSentL2ToL2MessagesReturnType](type-aliases/DecodeSentL2ToL2MessagesReturnType.md)

## Predeploy Addresses

- [contracts](variables/contracts.md)
Expand All @@ -35,25 +48,20 @@

## Types

- [DecodeExecutingMessageParameters](type-aliases/DecodeExecutingMessageParameters.md)
- [DecodeExecutingMessageReturnType](type-aliases/DecodeExecutingMessageReturnType.md)
- [DecodeSentMessageParameters](type-aliases/DecodeSentMessageParameters.md)
- [DecodeSentMessageReturnType](type-aliases/DecodeSentMessageReturnType.md)
- [ExecuteL2ToL2MessageContractReturnType](type-aliases/ExecuteL2ToL2MessageContractReturnType.md)
- [ExecuteL2ToL2MessageErrorType](type-aliases/ExecuteL2ToL2MessageErrorType.md)
- [ExecuteL2ToL2MessageParameters](type-aliases/ExecuteL2ToL2MessageParameters.md)
- [ExecuteL2ToL2MessageReturnType](type-aliases/ExecuteL2ToL2MessageReturnType.md)
- [ExtractMessageIdentifierFromLogsErrorType](type-aliases/ExtractMessageIdentifierFromLogsErrorType.md)
- [ExtractMessageIdentifierFromLogsParameters](type-aliases/ExtractMessageIdentifierFromLogsParameters.md)
- [ExtractMessageIdentifierFromLogsReturnType](type-aliases/ExtractMessageIdentifierFromLogsReturnType.md)
- [MessageIdentifier](type-aliases/MessageIdentifier.md)
- [RelayL2ToL2MessageContractReturnType](type-aliases/RelayL2ToL2MessageContractReturnType.md)
- [RelayL2ToL2MessageErrorType](type-aliases/RelayL2ToL2MessageErrorType.md)
- [RelayL2ToL2MessageParameters](type-aliases/RelayL2ToL2MessageParameters.md)
- [RelayL2ToL2MessageReturnType](type-aliases/RelayL2ToL2MessageReturnType.md)
- [SendL2ToL2MessageContractReturnType](type-aliases/SendL2ToL2MessageContractReturnType.md)
- [SendL2ToL2MessageErrorType](type-aliases/SendL2ToL2MessageErrorType.md)
- [SendL2ToL2MessageParameters](type-aliases/SendL2ToL2MessageParameters.md)
- [SendL2ToL2MessageReturnType](type-aliases/SendL2ToL2MessageReturnType.md)

## Utils

- [decodeExecutingMessage](functions/decodeExecutingMessage.md)
- [decodeSentMessage](functions/decodeSentMessage.md)
- [extractMessageIdentifierFromLogs](functions/extractMessageIdentifierFromLogs.md)
- [createInteropMessage](functions/createInteropMessage.md)
- [createInteropSentL2ToL2Messages](functions/createInteropSentL2ToL2Messages.md)
- [decodeExecutingMessages](functions/decodeExecutingMessages.md)
- [decodeRelayedL2ToL2Messages](functions/decodeRelayedL2ToL2Messages.md)
- [decodeSentL2ToL2Messages](functions/decodeSentL2ToL2Messages.md)
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

***

[@eth-optimism/viem](../README.md) / extractMessageIdentifierFromLogs
[@eth-optimism/viem](../README.md) / createInteropMessage

# extractMessageIdentifierFromLogs()
# createInteropMessage()

> **extractMessageIdentifierFromLogs**\<`chain`, `account`\>(`client`, `parameters`): `Promise`\<[`ExtractMessageIdentifierFromLogsReturnType`](../type-aliases/ExtractMessageIdentifierFromLogsReturnType.md)\>
> **createInteropMessage**\<`chain`, `account`\>(`client`, `params`): `Promise`\<[`CreateInteropMessageReturnType`](../type-aliases/CreateInteropMessageReturnType.md)\>
Retrieves a message identifier from the logs returned with the receipt from the sendL2ToL2Message transaction.
Utility for creating an interoperable [MessageIdentifier](../type-aliases/MessageIdentifier.md) & MessagePayload from a log

## Type Parameters

Expand All @@ -20,8 +20,6 @@ Retrieves a message identifier from the logs returned with the receipt from the

**client**

L2 Public Client

**client.account**: `account`

The Account of the Client.
Expand Down Expand Up @@ -1365,16 +1363,16 @@ const unwatch = await client.watchPendingTransactions({
})
```

**parameters**: [`ExtractMessageIdentifierFromLogsParameters`](../type-aliases/ExtractMessageIdentifierFromLogsParameters.md)
**params**: [`CreateInteropMessageParameters`](../type-aliases/CreateInteropMessageParameters.md)

GetGameParameters
[CreateInteropMessageParameters](../type-aliases/CreateInteropMessageParameters.md)

## Returns

`Promise`\<[`ExtractMessageIdentifierFromLogsReturnType`](../type-aliases/ExtractMessageIdentifierFromLogsReturnType.md)\>
`Promise`\<[`CreateInteropMessageReturnType`](../type-aliases/CreateInteropMessageReturnType.md)\>

A valid message identifier. GetGameReturnType
created interop message Message

## Defined in

[packages/viem/src/utils/extractMessageIdentifierFromLogs.ts:58](https://github.com/ethereum-optimism/ecosystem/blob/a6a591d88cd41aa48aa7325dbb668dbe8084e5ee/packages/viem/src/utils/extractMessageIdentifierFromLogs.ts#L58)
[packages/viem/src/utils/interop.ts:32](https://github.com/ethereum-optimism/ecosystem/blob/c6de7f1b878b611a9ec2ae09ccf5f2ca7cfa2bce/packages/viem/src/utils/interop.ts#L32)
Loading

0 comments on commit 9954f3f

Please sign in to comment.