Skip to content

Commit

Permalink
Merge branch 'npm' into mdt/remove-log-result-fn
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanrikulu committed Apr 25, 2024
2 parents ffd3fca + 68c3dc4 commit 4db280f
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 29 deletions.
7 changes: 3 additions & 4 deletions arb-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`.

7 changes: 1 addition & 6 deletions arb-gateway/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion arb-gateway/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions arb-verifier/test/testArbVerifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 5 additions & 5 deletions l1-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion l1-gateway/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ compatibility_date = "2023-10-13"
port = 8080

[build]
command = "yarn build"
command = "bun run build"

[vars]
4 changes: 2 additions & 2 deletions op-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 2 additions & 7 deletions op-gateway/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion op-gateway/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 4db280f

Please sign in to comment.