Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ethereum-optimism/supersim
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1c05fa098461ef0ada024a73921b2e87825bfa85
Choose a base ref
..
head repository: ethereum-optimism/supersim
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1b6a011fbe0dbf1c1831454d425ab823fa7ce88c
Choose a head ref
Showing with 8 additions and 8 deletions.
  1. +4 −3 examples/tictactoe/README.md
  2. +3 −4 examples/tictactoe/package.json
  3. +1 −1 examples/tictactoe/src/constants/tictactoe.ts
7 changes: 4 additions & 3 deletions examples/tictactoe/README.md
Original file line number Diff line number Diff line change
@@ -32,17 +32,18 @@ The forge script will log the deployed deterministic contract address.
...
Script ran successfully..
== Logs ==
Deployed at: 0x14eFE545C60FB3b65B9eeb23E22b8013908e48Bc

Deployed at: 0x14eFE545C60FB3b65B9eeb23E22b8013908e48Bc
...
```

### 2. Run The Frontend

Ensure the contract address matches the constant within `examples/tictactoe/src/constants/tictactoe.ts`
Supply the address as an environment variable when running the frontend.

```bash
cd examples/tictactoe

export VITE_TICTACTOE_ADDRESS=0x14eFE545C60FB3b65B9eeb23E22b8013908e48Bc
pnpn i && pnpm run dev
```

7 changes: 3 additions & 4 deletions examples/tictactoe/package.json
Original file line number Diff line number Diff line change
@@ -4,10 +4,9 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "test -n \"$npm_config_address\" && TICTACTOE_ADDRESS=$npm_config_address vite || (echo 'Error: --address parameter is required' && exit 1)",
"build": "test -n \"$npm_config_address\" && TICTACTOE_ADDRESS=$npm_config_address tsc -b && vite build || (echo 'Error: --address parameter is required' && exit 1)",
"lint": "eslint .",
"preview": "vite preview"
"dev": "if [ -z \"$VITE_TICTACTOE_ADDRESS\" ]; then echo 'Error: VITE_TICTACTOE_ADDRESS env is required' && exit 1; else vite; fi",
"build": "if [ -z \"$VITE_TICTACTOE_ADDRESS\" ]; then echo 'Error: VITE_TICTACTOE_ADDRESS env is required' && exit 1; else tsc -b && vite build; fi",
"lint": "eslint ."
},
"dependencies": {
"@eth-optimism/viem": "^0.0.7",
2 changes: 1 addition & 1 deletion examples/tictactoe/src/constants/tictactoe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const address = import.meta.env.TICTACTOE_ADDRESS
export const address = import.meta.env.VITE_TICTACTOE_ADDRESS

export const abi = [
{