You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/stack/interop/reading-logs.mdx
+1-19Lines changed: 1 addition & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ This enables developers to:
31
31
32
32
***Reference existing logs**: Allows contracts to verify and use logs that were already emitted, without requiring those logs to have been sent as cross-chain messages.
33
33
***Consistent trust model**: Uses the same trust assumptions as the underlying OP Stack infrastructure.
34
+
***Trust-minimized security**: Leverages the existing Superchain security model with no additional trust assumptions, unlike traditional oracle solutions that require trusting external validators.
34
35
***Flexibility**: Can be used to validate events from another chain or even the local chain.
35
36
36
37
## How it works
@@ -116,25 +117,6 @@ sequenceDiagram
116
117
117
118
8. If validation is successful, the DeFi application grants the user access based on the verified attestation.
118
119
119
-
### Conceptual approach for attestation verification
120
-
121
-
When implementing an attestation verification system using `CrossL2Inbox`, you would need to:
122
-
123
-
1.**Create an Identifier struct** that uniquely identifies the attestation event:
124
-
* Include the source chain ID where the attestation was created
125
-
* Specify the EAS contract address (origin) that emitted the event
126
-
* Include other necessary parameters to identify the specific log
127
-
128
-
2.**Validate the attestation event**:
129
-
* Call the `validateMessage()` function on the CrossL2Inbox contract
130
-
* Pass the identifier struct and a hash of the attestation event data
131
-
* Handle potential validation failures in your contract logic
132
-
133
-
3.**Process the validated attestation**:
134
-
* Once validated, your contract can trust that the attestation exists on the source chain
135
-
* Extract relevant data from the attestation to inform your application's logic
136
-
* Implement business rules based on the verified attestation (e.g., grant access, enable features)
137
-
138
120
The primary benefit of this approach is that it allows your contract to verify attestations that already exist on another chain without requiring those attestations to have been explicitly sent as cross-chain messages.
0 commit comments