Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Arachnid committed Oct 16, 2023
1 parent 39feaee commit 6fc13b5
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# EVM CCIP-Read Gateway
This repository implements a generic CCIP-Read gateway framework for fetching state proofs of data on other EVM chains.
This repository implements a generic CCIP-Read gateway framework for fetching state proofs of data on other EVM chains. This allows L1 smart contracts to fetch and verify state from L2s. The library is built to be as modular and interchangeable as possible. This means:

- Anyone can operate their own gateway, but...
- Only one gateway needs to be operated for each chain, regardless of the applications requesting data from it.
- Gateways do not need to be trusted; their responses are fully verified on L1.
- Contracts can fetch L2 state using a simple builder interface and callbacks.
- Contracts can change targets (eg, a different L2) just by swapping out the address of a verifier contract for another.

While this functionality is written primarily with read calls in mind, it also functions for transactions; using a compliant
library like Ethers, a transaction that includes relevant L2 proofs can be generated and signed.

## Usage

Expand All @@ -19,15 +28,15 @@ import { EVMFetcher } from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';
import { EVMFetchTarget } from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';
import { IEVMVerifier } from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';
contract TestL1 {
contract TestL2 {
uint256 testUint; // Slot 0
constructor() {
testUint = 42;
}
}
contract TestL2 is EVMFetchTarget {
contract TestL1 is EVMFetchTarget {
using EVMFetcher for EVMFetcher.EVMFetchRequest;
IEVMVerifier verifier;
Expand Down Expand Up @@ -79,3 +88,9 @@ functionality.
A complete Solidity library that facilitates sending CCIP-Read requests for L1 state, and verifying the responses.

This repository also contains the end-to-end tests for the entire stack.

### [op-gateway](/op-gateway/)
An instantiation of `evm-gateway` that targets Optimism. Combined with `op-verifier`, makes it possible for L1 contracts to fetch contract state data from Optimism.

### [op-verifier](/op-verifier/)
A complete Solidity library that facilitates sending CCIP-Read requests for Optimism state, and verifying the responses.

0 comments on commit 6fc13b5

Please sign in to comment.