ensdomains / evmgateway

This repository implements a generic CCIP-Read gateway for fetching state proofs of data on other EVM chains. The intended use is for contracts on L1 to be able to fetch and verify data from contracts on L2 in a read context.
MIT License
128 stars 28 forks source link

l1-verifier tests not passing #9

Open clowestab opened 10 months ago

clowestab commented 10 months ago

I'm just having a play with the gateway code.

The l1-verifier repo has a test script testL1Verifier.ts.

Running the tests with npx hardhat test results in failures across the board.

Looking at the code it seems obvious why - the tests are expecting primitive type values whereas the fetch method of EVMFetcher reverts with the 3668 OffchainLookup error.

These tests seem to be testing the wrong thing..?

These repos are not well documented at this point. Could clarity please be provided.

Arachnid commented 10 months ago

The tests should pass using bun run test. This uses a script to run the tests via ganache, which is necessary because hardhat-network does not support eth_getProof.

The OffchainData error is handled internally by Ethers, which implements eip 3668.