Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tame-eagles-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ox": minor
---

Added `ox/tempo` entrypoint.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VITE_ANVIL_FORK_URL= # anvil fork url.
VITE_TEMPO_ENV=localnet # node environment. values: localnet|devnet|testnet
VITE_TEMPO_LOG=false # whether to enable logs, if VITE_TEMPO_ENV=localnet. values: true|debug|error|trace|warn|info
VITE_TEMPO_TAG= # docker image tag, if VITE_TEMPO_ENV=localnet.
VITE_TEMPO_HTTP_LOG=false # whether to enable logs on HTTP RPC requests. values: true|false
21 changes: 12 additions & 9 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ This guide is intended to help you get started with contributing. By following t

1. [Cloning the repository](#cloning-the-repository)
2. [Installing Node.js and pnpm](#installing-nodejs-and-pnpm)
3. [Installing Foundry](#installing-foundry)
4. [Installing dependencies](#installing-dependencies)
5. [Running the test suite](#running-the-test-suite)
6. [Writing documentation](#writing-documentation)
7. [Submitting a pull request](#submitting-a-pull-request)
8. [Versioning](#versioning)
3. [Installing Foundry & Tempo](#installing-foundry--tempo)
5. [Installing dependencies](#installing-dependencies)
6. [Running the test suite](#running-the-test-suite)
7. [Writing documentation](#writing-documentation)
8. [Submitting a pull request](#submitting-a-pull-request)
9. [Versioning](#versioning)

---

Expand Down Expand Up @@ -67,14 +67,17 @@ If the versions are not correct or you don't have Node.js or pnpm installed, dow

---

### Installing Foundry
### Installing Foundry & Tempo

Ox uses [Foundry](https://book.getfoundry.sh/) for testing. We run a local [Anvil](https://github.com/foundry-rs/foundry/tree/master/anvil) instance against a forked Ethereum node, where we can also use tools like [Forge](https://book.getfoundry.sh/forge/) to deploy test contracts to it.
Ox uses [Foundry](https://book.getfoundry.sh/) & [Tempo](https://github.com/tempoxyz/tempo) for testing.

Install Foundry using the following command:
We run a local [Anvil](https://github.com/foundry-rs/foundry/tree/master/anvil) instance against a forked Ethereum node, where we can also use tools like [Forge](https://book.getfoundry.sh/forge/) to deploy test contracts to it.

Install Foundry & Tempo using the following command:

```bash
curl -L https://foundry.paradigm.xyz | bash
curl -L https://tempo.xyz/install | bash
```

<div align="right">
Expand Down
52 changes: 49 additions & 3 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ jobs:
- name: Check TSDoc
run: pnpm check:tsdoc

test:
name: Test Runtime
test-core:
name: Test Runtime (core)
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v4
Expand All @@ -40,10 +41,55 @@ jobs:
uses: ./.github/actions/install-dependencies

- name: Run tests
run: pnpm test:ci
run: pnpm test --project core,ercs --bail=1 --coverage
env:
VITE_ANVIL_FORK_URL: ${{ secrets.VITE_ANVIL_FORK_URL }}

test-tempo:
name: 'Test Runtime (tempo, env: localnet, tag: ${{ matrix.tag }})'
runs-on: ubuntu-latest
strategy:
matrix:
tag:
- latest
- https://rpc.testnet.tempo.xyz

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install-dependencies

- name: Run tests
run: pnpm test --project tempo --bail=1 --coverage
env:
VITE_TEMPO_TAG: ${{ matrix.tag }}

test-tempo-e2e:
name: 'Test Runtime (tempo, env: ${{ matrix.tempo-env }}, e2e)'
runs-on: ubuntu-latest
strategy:
matrix:
tempo-env:
- testnet

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install-dependencies

- name: Run tests
run: pnpm test --project tempo e2e --bail=1
env:
VITE_TEMPO_ENV: ${{ matrix.tempo-env }}

vectors:
name: Vectors
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ lookup.json
config-generated.ts
site/pages/api
site/pages/ercs
site/pages/tempo
site/pages/glossary
tsdoc-metadata.json
*.timestamp*
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"prepare": "pnpm simple-git-hooks",
"size": "size-limit",
"test": "vitest -c ./test/vitest.config.ts",
"test:ci": "CI=true vitest -c ./test/vitest.config.ts --coverage --retry=3 --bail=1",
"test:cov": "vitest -c ./test/vitest.config.ts --coverage",
"test:types": "TYPES=true vitest -c ./test/vitest.config.ts",
"vectors": "bun test vectors/**/*.test.ts",
Expand All @@ -55,7 +54,7 @@
"@types/bun": "^1.1.6",
"@types/fs-extra": "^11.0.4",
"@types/node": "^22.5.4",
"@vitest/coverage-v8": "1.0.4",
"@vitest/coverage-v8": "^4.0.15",
"bun": "^1.1.24",
"eslint": "^9.9.0",
"eslint-plugin-jsdoc": "^50.0.1",
Expand All @@ -64,18 +63,20 @@
"fs-extra": "^11.2.0",
"knip": "^5.27.2",
"micro-eth-signer": "^0.15.0",
"prool": "^0.0.23",
"prool": "~0.2.1",
"rimraf": "^5.0.10",
"sherif": "^0.11.0",
"simple-git-hooks": "^2.11.1",
"size-limit": "^11.1.4",
"tempo.ts": "^0.10.5",
"testcontainers": "^11.10.0",
"ts-morph": "^24.0.0",
"tsx": "^4.17.0",
"typescript": "^5.5.4",
"typescript-eslint": "^8.1.0",
"viem": "^2.21.9",
"viem": "^2.41.2",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "1.0.4",
"vitest": "^4.0.15",
"vocs": "^1.0.13",
"web3": "^4.12.1"
},
Expand Down
Loading
Loading