diff --git a/arb-gateway/README.md b/arb-gateway/README.md index 4b7daaa5..da036dac 100644 --- a/arb-gateway/README.md +++ b/arb-gateway/README.md @@ -1,24 +1,24 @@ # @ensdomains/arb-gateway -An instantiation of [evm-gateway](https://github.com/ensdomains/evmgateway/tree/main/evm-gateway) that targets Optimism - that is, it implements a CCIP-Read gateway that generates proofs of contract state on Optimism. +An instantiation of [evm-gateway](https://github.com/ensdomains/evmgateway/tree/main/evm-gateway) that targets Arbitrum - that is, it implements a CCIP-Read gateway that generates proofs of contract state on Arbitrum. For a detailed readme and usage instructions, see the [monorepo readme](https://github.com/ensdomains/evmgateway/tree/main). -## How to use op-gateway locally via cloudflare dev env (aka wrangler) +## How to use arb-gateway locally via cloudflare dev env (aka wrangler) ``` npm install -g bun -cd op-gateway +cd arb-gateway bun install touch .dev.vars ## set L1_PROVIDER_URL, L2_PROVIDER_URL, L2_ROLLUP yarn dev ``` -## How to deploy op-gateway to cloudflare +## How to deploy arb-gateway to cloudflare ``` -cd op-gateway +cd arb-gateway npm install -g wrangler wrngler login diff --git a/arb-verifier/README.md b/arb-verifier/README.md index b4d563eb..ce5d8671 100644 --- a/arb-verifier/README.md +++ b/arb-verifier/README.md @@ -1,4 +1,4 @@ -# @ensdomains/op-verifier +# @ensdomains/arb-verifier A complete Solidity library that facilitates sending CCIP-Read requests for Arbitrum state, and verifying the responses. diff --git a/arb-verifier/contracts/ArbVerifier.sol b/arb-verifier/contracts/ArbVerifier.sol index 13d5b720..1b699794 100644 --- a/arb-verifier/contracts/ArbVerifier.sol +++ b/arb-verifier/contracts/ArbVerifier.sol @@ -77,14 +77,13 @@ contract ArbVerifier is IEVMVerifier { * Decodes a block by extracting and converting the bytes32 value from the RLP-encoded block information. * * @param {bytes} rlpEncodedBlock - The RLP-encoded block information. - * @returns {bytes32} The decoded bytes32 value extracted from the RLP-encoded block information. - * - * @notice This function is designed to be used internally within the contract. + * @returns {bytes32} The stateRoot extracted from the RLP-encoded block information. */ function decodeBlock( bytes memory rlpEncdoedBlock ) internal pure returns (bytes32) { RLPReader.RLPItem[] memory i = RLPReader.readList(rlpEncdoedBlock); + //StateRoot is located at idx 3 return bytes32(RLPReader.readBytes(i[3])); } } diff --git a/arb-verifier/hardhat.config.ts b/arb-verifier/hardhat.config.ts index d5163453..9b5f07e4 100644 --- a/arb-verifier/hardhat.config.ts +++ b/arb-verifier/hardhat.config.ts @@ -2,8 +2,10 @@ import '@nomicfoundation/hardhat-toolbox'; import 'hardhat-deploy'; import 'hardhat-deploy-ethers'; import { HardhatUserConfig } from 'hardhat/config'; -import 'ethers' -const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY || "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; +import 'ethers'; +const DEPLOYER_PRIVATE_KEY = + process.env.DEPLOYER_PRIVATE_KEY || + 'ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'; const L1_PROVIDER_URL = process.env.L1_PROVIDER_URL || ''; const L1_ETHERSCAN_API_KEY = process.env.L1_ETHERSCAN_API_KEY; const L2_ETHERSCAN_API_KEY = process.env.L2_ETHERSCAN_API_KEY; @@ -12,26 +14,26 @@ const config: HardhatUserConfig = { solidity: '0.8.19', networks: { arbDevnetL1: { - url: "http://127.0.0.1:8545/", + url: 'http://127.0.0.1:8545/', accounts: [ '0xb6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659', ], - deploy: ["deploy_l1/"], + deploy: ['deploy_l1/'], companionNetworks: { - l2: "arbDevnetL2", + l2: 'arbDevnetL2', }, }, arbDevnetL2: { - url: "http://127.0.0.1:8547/", + url: 'http://127.0.0.1:8547/', accounts: [ '0xb6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659', ], - deploy: ["deploy_l2/"], + deploy: ['deploy_l2/'], }, goerli: { url: L1_PROVIDER_URL, accounts: [DEPLOYER_PRIVATE_KEY], - deploy: ["deploy_l1/"], + deploy: ['deploy_l1/'], companionNetworks: { l2: 'arbitrumGoerli', }, @@ -59,8 +61,8 @@ const config: HardhatUserConfig = { ], }, namedAccounts: { - 'deployer': 0, - } + deployer: 0, + }, }; export default config; diff --git a/arb-verifier/package.json b/arb-verifier/package.json index 3abfcf4b..3d10fe72 100644 --- a/arb-verifier/package.json +++ b/arb-verifier/package.json @@ -38,8 +38,6 @@ }, "dependencies": { "@ensdomains/evm-verifier": "^0.1.0", - "@eth-optimism/contracts": "^0.6.0", - "@eth-optimism/contracts-bedrock": "^0.16.2", "@arbitrum/nitro-contracts": "^1.1.0" } }