diff --git a/arb-gateway/README.md b/arb-gateway/README.md index e580afeb..a317c7de 100644 --- a/arb-gateway/README.md +++ b/arb-gateway/README.md @@ -9,12 +9,12 @@ To get started, you need to have an RPC URL for both Ethereum Mainnet and Arbitr ## How to use arb-gateway locally via cloudflare dev env (aka wrangler) ``` -npm install -g bun cd arb-gateway +npm install -g bun wrangler bun install touch .dev.vars ## set L1_PROVIDER_URL, L2_PROVIDER_URL, L2_ROLLUP -yarn dev +bun run dev ``` ## How to deploy arb-gateway to cloudflare @@ -40,6 +40,5 @@ yarn deploy --env sepolia 5. Navigate to the Gateway directory using `cd ./arb-gateway`. 6. Start the Gateway by running `bun run start -u http://127.0.0.1:8545/ -v http://127.0.0.1:8547/ -p 8089`. 7. Open another Terminal Tab and navigate to the verifier directory using `cd ./arb-verifier/`. -8. Deploy contracts to the node using the command ` npx hardhat --network arbDevnetL2 deploy && npx hardhat --network arbDevnetL1 deploy `. +8. Deploy contracts to the node using the command `npx hardhat --network arbDevnetL2 deploy && npx hardhat --network arbDevnetL1 deploy`. 9. Run the test using the command `bun run test`. - diff --git a/arb-gateway/src/worker.ts b/arb-gateway/src/worker.ts index b83d66f3..662aeb07 100644 --- a/arb-gateway/src/worker.ts +++ b/arb-gateway/src/worker.ts @@ -71,12 +71,7 @@ async function fetch(request: CFWRequest, env: Env) { } const props = propsDecoder(request); - await tracker.trackEvent( - request, - 'request', - { props: { ...props, ...{} } }, - true - ); + await tracker.trackEvent(request, 'request', { props }, true); return app .handle(request) .then(tracker.logResult.bind(null, propsDecoder, request)); diff --git a/arb-gateway/wrangler.toml b/arb-gateway/wrangler.toml index 47885357..e7999351 100644 --- a/arb-gateway/wrangler.toml +++ b/arb-gateway/wrangler.toml @@ -9,7 +9,7 @@ compatibility_date = "2024-01-25" port = 8080 [build] -command = "yarn build" +command = "bun run build" [env.sepolia] name = "arb-sepolia-gateway-worker" diff --git a/arb-verifier/test/testArbVerifier.ts b/arb-verifier/test/testArbVerifier.ts index bdf92c15..99edc8f8 100644 --- a/arb-verifier/test/testArbVerifier.ts +++ b/arb-verifier/test/testArbVerifier.ts @@ -47,8 +47,6 @@ describe('ArbVerifier', () => { // When testing against Goerli, replace with this address // const rollupAddress = '0x45e5cAea8768F42B385A366D3551Ad1e0cbFAb17'; const chainId = hre.network.config.chainId - console.log(hre.network.config) - console.log({chainId}) const gateway = await makeArbGateway( (hre.network.config as any).url, (hre.config.networks[hre.network.companionNetworks.l2] as any).url, diff --git a/bunfig.toml b/bunfig.toml new file mode 100644 index 00000000..d3016b23 --- /dev/null +++ b/bunfig.toml @@ -0,0 +1,2 @@ +# Only run 1 script at a time to prevent race conditions (see https://github.com/ensdomains/evmgateway/issues/31) +install.concurrentScripts = 1 diff --git a/l1-gateway/README.md b/l1-gateway/README.md index bd11ed12..b8827101 100644 --- a/l1-gateway/README.md +++ b/l1-gateway/README.md @@ -18,22 +18,22 @@ bun add @ensdomains/l1-gateway ## How to use l1-gateway locally via cloudflare dev env (aka wrangler) ``` -npm install -g bun cd l1-gateway +npm install -g bun wrangler bun install touch .dev.vars ## set WORKER_PROVIDER_URL -yarn dev +bun run dev ``` ## How to deploy l1-gateway to cloudflare ``` cd l1-gateway -npm install -g wrangler -wrngler login +npm install -g bun wrangler +wrangler login wrangler secret put WORKER_PROVIDER_URL -yarn deploy +bun run deploy ``` ## How to test diff --git a/l1-gateway/wrangler.toml b/l1-gateway/wrangler.toml index 3edd4c13..7079595d 100644 --- a/l1-gateway/wrangler.toml +++ b/l1-gateway/wrangler.toml @@ -8,6 +8,6 @@ compatibility_date = "2023-10-13" port = 8080 [build] -command = "yarn build" +command = "bun run build" [vars] diff --git a/op-gateway/README.md b/op-gateway/README.md index 3eb67566..b6249a6c 100644 --- a/op-gateway/README.md +++ b/op-gateway/README.md @@ -7,12 +7,12 @@ For a detailed readme and usage instructions, see the [monorepo readme](https:// ## How to use op-gateway locally via cloudflare dev env (aka wrangler) ``` -npm install -g bun cd op-gateway +npm install -g bun wrangler bun install touch .dev.vars ## set L1_PROVIDER_URL, L2_PROVIDER_URL, L2_OUTPUT_ORACLE, DELAY=5 -yarn dev +bun run dev ``` ## How to deploy op-gateway to cloudflare diff --git a/op-gateway/src/worker.ts b/op-gateway/src/worker.ts index 3321f45b..a0984ddb 100644 --- a/op-gateway/src/worker.ts +++ b/op-gateway/src/worker.ts @@ -70,14 +70,9 @@ async function fetch(request: CFWRequest, env: Env) { gateway.add(server); app = server.makeApp('/'); } - const props = propsDecoder(request); - await tracker.trackEvent( - request, - 'request', - { props: { ...props, ...{} } }, - true - ); + const props = propsDecoder(request); + await tracker.trackEvent(request, 'request', { props }, true); return app .handle(request) .then(tracker.logResult.bind(null, propsDecoder, request)); diff --git a/op-gateway/wrangler.toml b/op-gateway/wrangler.toml index 9175b4ef..26a9e49c 100644 --- a/op-gateway/wrangler.toml +++ b/op-gateway/wrangler.toml @@ -7,7 +7,7 @@ compatibility_date = "2023-10-13" port = 8080 [build] -command = "yarn build" +command = "bun run build" [env.base-sepolia] name = "base-sepolia-gateway-worker"