A complete Solidity library that facilitates sending CCIP-Read requests for Optimism state, and verifying the responses.
For a detailed readme and usage instructions, see the monorepo readme.
Start up a devnet by following Optimism's instructions here.
Then, deploy the L2 contract:
bun run hardhat deploy --network opDevnetL2
Followed by the L1 contract:
bun run hardhat deploy --network opDevnetL1
The L1 contracts contain a reference to the L2 contract, and so will require redeploying if the L2 contract changes.
Finally, run the tests:
hardhat test --network opDevnetL1
The tests will require small modifications to work on public testnets; specifically, contract addresses are currently fetched from http://localhost:8080/addresses.json
; this will need to be made conditional on the network being used.
- OPVerifier = 0x0e8DA38565915B7e74e2d78F80ba1BF815F34116
- TestL1 = 0x00198c6c94522A81698190ADF411641995Eb180c
- OPVerifier = 0xAdef74372444e716C0473dEe1F9Cb3108EFa3818
- TestL1 = 0x540C93800699C044dB8cf1f0F059ca0FA5CaED92
TARGET_ADDRESS=$TEST_L1_ADDRESS PROVIDER_URL=$L1_PROVIDER_URL npx hardhat run ../l1-verifier/scripts/remote.ts --network sepolia