Skip to content

Commit

Permalink
Merge develop -> main (v2.0.9) (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
ytham authored Apr 25, 2024
2 parents a1fb2e2 + 87c22d8 commit ce73595
Show file tree
Hide file tree
Showing 287 changed files with 50,342 additions and 2,161 deletions.
60 changes: 40 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
env:
PRIVATE_KEY_ANVIL: ${{ secrets.PRIVATE_KEY_ANVIL }}
PRIVATE_KEY_SEPOLIA: ${{ secrets.PRIVATE_KEY_SEPOLIA }}
PRIVATE_KEY_84532: ${{ secrets.PRIVATE_KEY_84532 }}
PRIVATE_KEY_11155111: ${{ secrets.PRIVATE_KEY_11155111 }}
PROVIDER_URI_MAINNET: ${{ secrets.PROVIDER_URI_MAINNET }}
PROVIDER_URI_SEPOLIA: ${{ secrets.PROVIDER_URI_SEPOLIA }}
PROVIDER_URI_GOERLI: ${{ secrets.PROVIDER_URI_GOERLI }}
PROVIDER_URI_1: ${{ secrets.PROVIDER_URI_1 }}
Expand All @@ -19,8 +22,8 @@ env:
PINATA_JWT: ${{ secrets.PINATA_JWT }}

jobs:
circuit-js:
name: JS Circuit Tests
circuit:
name: Circuit & QueryBuilder Tests
runs-on: ubuntu-latest

steps:
Expand All @@ -46,14 +49,10 @@ jobs:

- name: Run Unit Tests
working-directory: ./circuit
run: |
ANVIL_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
export PRIVATE_KEY=$ANVIL_PRIVATE_KEY # just needs to be in the correct format, no tx is sent in unit tests
export PRIVATE_KEY_GOERLI=$ANVIL_PRIVATE_KEY
pnpm test
run: pnpm test

client-tests:
name: Client Tests
client-unit-tests:
name: Client Unit Tests
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -81,12 +80,37 @@ jobs:
working-directory: ./client
run: pnpm test test/unit

harness-integration-tests-11155111:
name: "Harness: Client Integration Tests (11155111)"
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: "Install Node.js"
uses: "actions/setup-node@v4"
with:
node-version: "20.x"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
cache-dependency-path: client/pnpm-lock.yaml

- name: Set all packages to local and build
working-directory: ./
run: pnpm local

- name: Run Integration Tests (Client)
working-directory: ./client
run: pnpm test test/integration
working-directory: ./harness
run: CHAIN_ID=11155111 pnpm test test/integration/start.test.ts

harness:
name: Harness Tests
harness-integration-tests-84532:
name: "Harness: Client Integration Tests (84532)"
runs-on: ubuntu-latest

steps:
Expand All @@ -104,16 +128,12 @@ jobs:
node-version: "20.x"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
cache-dependency-path: harness/pnpm-lock.yaml
cache-dependency-path: client/pnpm-lock.yaml

- name: Set all packages to local and build
working-directory: ./
run: pnpm local

- name: Run Integration Tests (Sepolia)
- name: Run Integration Tests (Client)
working-directory: ./harness
run: |
ANVIL_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
export PRIVATE_KEY=$ANVIL_PRIVATE_KEY # just needs to be in the correct format, no tx is sent in unit tests
export PRIVATE_KEY_SEPOLIA=$ANVIL_PRIVATE_KEY
pnpm test test/unit/sepolia.test.ts
run: CHAIN_ID=84532 pnpm test test/integration/start.test.ts
54 changes: 54 additions & 0 deletions .github/workflows/update_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Update Dependent Repositories

on:
push:
branches:
- main
paths:
- 'package.json'

jobs:
update-dependents:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Extract version from package.json
id: package_version
run: echo "::set-output name=version::$(jq -r '.version' package.json)"

- name: Update axiom-quickstart package version
env:
NEW_VERSION: ${{ steps.package_version.outputs.version }}
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git clone https://github.com/axiom-crypto/axiom-quickstart.git
cd axiom-quickstart
sed -i "s/\"@axiom-crypto\/client\": \".*\"/\"@axiom-crypto\/client\": \"$NEW_VERSION\"/" package.json
git checkout -b update-axiom-sdk-client-version
git add package.json
git commit -m "Update axiom-sdk-client version to $NEW_VERSION"
git push origin update-axiom-sdk-client-version
gh pr create --title "Update axiom-sdk-client version to $NEW_VERSION" --body "This is an automated pull request to update the axiom-sdk-client version to $NEW_VERSION" --repo axiom-crypto/axiom-quickstart --head update-axiom-sdk-client-version --base main
- name: Update axiom-scaffold-nextjs package version
env:
NEW_VERSION: ${{ steps.package_version.outputs.version }}
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git clone https://github.com/axiom-crypto/axiom-scaffold-nextjs.git
cd axiom-scaffold-nextjs
sed -i "s/\"@axiom-crypto\/client\": \".*\"/\"@axiom-crypto\/client\": \"$NEW_VERSION\"/" package.json
git checkout -b update-axiom-sdk-client-version
git add package.json
git commit -m "Update axiom-sdk-client version to $NEW_VERSION"
git push origin update-axiom-sdk-client-version
gh pr create --title "Update axiom-sdk-client version to $NEW_VERSION" --body "This is an automated pull request to update the axiom-sdk-client version to $NEW_VERSION" --repo axiom-crypto/axiom-scaffold-nextjs --head update-axiom-sdk-client-version --base main
9 changes: 4 additions & 5 deletions circuit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axiom-crypto/circuit",
"version": "2.0.8",
"version": "2.0.9",
"author": "Intrinsic Technologies",
"license": "MIT",
"description": "Client SDK to write custom queries for Axiom, the ZK Coprocessor for Ethereum.",
Expand All @@ -24,13 +24,12 @@
"crypto"
],
"dependencies": {
"@axiom-crypto/core": "2.3.8",
"@axiom-crypto/halo2-lib-js": "0.3.4",
"@axiom-crypto/halo2-wasm": "0.3.4",
"@axiom-crypto/tools": "2.1.0",
"@axiom-crypto/tools": "2.1.1",
"commander": "^11.1.0",
"ethers": "^6.8.1",
"viem": "^1.19.9"
"ethers": "^6.12.0",
"viem": "^2.8.18"
},
"devDependencies": {
"@types/jest": "^29.5.11",
Expand Down
Loading

0 comments on commit ce73595

Please sign in to comment.