Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Remove Crosschain #13

Merged
merged 3 commits into from
Oct 21, 2024
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
4 changes: 1 addition & 3 deletions .github/workflows/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:

env:
RPC_URL_11155111: ${{ secrets.RPC_URL_11155111 }}
RPC_URL_8453: ${{ secrets.RPC_URL_8453 }}
RPC_URL_84532: ${{ secrets.RPC_URL_84532 }}

jobs:
create-axiom-client-periodic-test:
Expand Down Expand Up @@ -75,7 +73,7 @@ jobs:
run: |
export PNPM_HOME="/home/runner/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
npm_config_yes=true npx create-axiom-client init -p axiom-app -s ${{ env.SCAFFOLD }} -m ${{ env.PKG }} -q samechain -c 11155111
npm_config_yes=true npx create-axiom-client init -p axiom-app -s ${{ env.SCAFFOLD }} -m ${{ env.PKG }} -c 11155111

- name: Write local .env file
working-directory: ./axiom-app
Expand Down
204 changes: 16 additions & 188 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,11 @@ on:
env:
RPC_URL_1: ${{ secrets.RPC_URL_1 }}
RPC_URL_11155111: ${{ secrets.RPC_URL_11155111 }}
RPC_URL_8453: ${{ secrets.RPC_URL_8453 }}
RPC_URL_84532: ${{ secrets.RPC_URL_84532 }}
PROVIDER_URI_1: ${{ secrets.RPC_URL_1 }}
PROVIDER_URI_11155111: ${{ secrets.RPC_URL_11155111 }}
PROVIDER_URI_8453: ${{ secrets.RPC_URL_8453 }}
PROVIDER_URI_84532: ${{ secrets.RPC_URL_84532 }}
PRIVATE_KEY_11155111: ${{ secrets.PRIVATE_KEY_11155111 }}
PRIVATE_KEY_8453: ${{ secrets.PRIVATE_KEY_8453 }}
PRIVATE_KEY_84532: ${{ secrets.PRIVATE_KEY_84532 }}
NEXT_PUBLIC_RPC_URL_11155111: ${{ secrets.RPC_URL_11155111 }}
NEXT_PUBLIC_RPC_URL_8453: ${{ secrets.RPC_URL_8453 }}
NEXT_PUBLIC_RPC_URL_84532: ${{ secrets.RPC_URL_84532 }}
NEXT_PUBLIC_PROVIDER_URI_11155111: ${{ secrets.RPC_URL_11155111 }}
NEXT_PUBLIC_PROVIDER_URI_8453: ${{ secrets.RPC_URL_8453 }}
NEXT_PUBLIC_PROVIDER_URI_84532: ${{ secrets.RPC_URL_84532 }}
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }}

jobs:
Expand Down Expand Up @@ -67,7 +57,7 @@ jobs:

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-nextjs -s nextjs -m npm -q samechain -c 11155111
run: node dist/index.js init -p app-nextjs -s nextjs -m npm -c 11155111

- name: Compile circuit
working-directory: ./axiom-init/app-nextjs
Expand Down Expand Up @@ -134,7 +124,7 @@ jobs:

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-nextjs -s nextjs -m yarn -q samechain -c 11155111
run: node dist/index.js init -p app-nextjs -s nextjs -m yarn -c 11155111

- name: Compile circuit
working-directory: ./axiom-init/app-nextjs
Expand Down Expand Up @@ -201,11 +191,11 @@ jobs:

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-nextjs -s nextjs -m pnpm -q samechain -c 84532
run: node dist/index.js init -p app-nextjs -s nextjs -m pnpm -c 11155111

- name: Compile circuit
working-directory: ./axiom-init/app-nextjs
run: pnpm axiom circuit compile app/axiom/average.circuit.ts -sr ${{ env.RPC_URL_84532 }} --force
run: pnpm axiom circuit compile app/axiom/average.circuit.ts -sr ${{ env.RPC_URL_11155111 }} --force

- name: Forge test
working-directory: ./axiom-init/app-nextjs
Expand All @@ -214,8 +204,8 @@ jobs:
- name: Write .env.local file
working-directory: ./axiom-init/app-nextjs/app
run: |
echo "NEXT_PUBLIC_RPC_URL_84532=${{ env.RPC_URL_84532 }}" > .env.local
echo "NEXT_PUBLIC_PROVIDER_URI_84532=${{ env.RPC_URL_84532 }}" >> .env.local
echo "NEXT_PUBLIC_RPC_URL_11155111=${{ env.RPC_URL_11155111 }}" > .env.local
echo "NEXT_PUBLIC_PROVIDER_URI_11155111=${{ env.RPC_URL_11155111 }}" >> .env.local
echo "NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=${{ env.WALLETCONNECT_PROJECT_ID }}" >> .env.local

- name: Build Next.js app
Expand Down Expand Up @@ -261,11 +251,11 @@ jobs:

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-script -s script -m npm -q samechain -c 84532
run: node dist/index.js init -p app-script -s script -m npm -c 11155111

- name: Compile circuit
working-directory: ./axiom-init/app-script
run: npx axiom circuit compile app/axiom/average.circuit.ts -sr ${{ env.RPC_URL_84532 }} --force
run: npx axiom circuit compile app/axiom/average.circuit.ts -sr ${{ env.RPC_URL_11155111 }} --force

- name: Forge test
working-directory: ./axiom-init/app-script
Expand All @@ -274,8 +264,8 @@ jobs:
- name: Write .env file
working-directory: ./axiom-init/app-script
run: |
echo "RPC_URL_84532=${{ env.RPC_URL_84532 }}" > .env
echo "PROVIDER_URI_84532=${{ env.PROVIDER_URI_84532 }}" >> .env
echo "RPC_URL_11155111=${{ env.RPC_URL_11155111 }}" > .env
echo "PROVIDER_URI_11155111=${{ env.PROVIDER_URI_11155111 }}" >> .env

- name: Send query
working-directory: ./axiom-init/app-script/app
Expand Down Expand Up @@ -323,7 +313,7 @@ jobs:

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-script -s script -m yarn -q samechain -c 11155111
run: node dist/index.js init -p app-script -s script -m yarn -c 11155111

- name: Compile circuit
working-directory: ./axiom-init/app-script
Expand Down Expand Up @@ -385,7 +375,7 @@ jobs:

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-script -s script -m pnpm -q samechain -c 1
run: node dist/index.js init -p app-script -s script -m pnpm -c 1

- name: Compile circuit
working-directory: ./axiom-init/app-script
Expand Down Expand Up @@ -444,7 +434,7 @@ jobs:

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-forge -s forge -m npm -q samechain -c 1
run: node dist/index.js init -p app-forge -s forge -m npm -c 1

- name: Compile circuit
working-directory: ./axiom-init/app-forge
Expand Down Expand Up @@ -500,11 +490,11 @@ jobs:

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-forge -s forge -m yarn -q samechain -c 84532
run: node dist/index.js init -p app-forge -s forge -m yarn -c 11155111

- name: Compile circuit
working-directory: ./axiom-init/app-forge
run: yarn axiom circuit compile app/axiom/average.circuit.ts -sr ${{ env.RPC_URL_84532 }} --force
run: yarn axiom circuit compile app/axiom/average.circuit.ts -sr ${{ env.RPC_URL_11155111 }} --force

- name: Forge test
working-directory: ./axiom-init/app-forge
Expand Down Expand Up @@ -554,169 +544,7 @@ jobs:

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-forge -s forge -m pnpm -q samechain -c 11155111

- name: Compile circuit
working-directory: ./axiom-init/app-forge
run: pnpm axiom circuit compile app/axiom/average.circuit.ts -sr ${{ env.RPC_URL_11155111 }} --force

- name: Forge test
working-directory: ./axiom-init/app-forge
run: forge test -vvv

test-crosschain-nextjs-npm:
name: "axiom-init: Crosschain Next.js (npm)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- 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: axiom-init/pnpm-lock.yaml

- name: Set Git user
run: |
git config --global user.name "Axiom CI"
git config --global user.email "[email protected]"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Check forge version
run: forge --version

- name: Install pnpm packages
working-directory: ./axiom-init
run: pnpm install

- name: Build axiom-init
working-directory: ./axiom-init
run: pnpm run build

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-nextjs -s nextjs -m npm --query-type crosschain -sc 11155111 -tc 84532

- name: Compile circuit
working-directory: ./axiom-init/app-nextjs
run: pnpm axiom circuit compile app/axiom/average.circuit.ts -sr ${{ env.RPC_URL_11155111 }} --force

- name: Forge test
working-directory: ./axiom-init/app-nextjs
run: forge test -vvv

test-crosschain-script-pnpm:
name: "axiom-init: Crosschain Script (pnpm)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- 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: axiom-init/pnpm-lock.yaml

- name: Set Git user
run: |
git config --global user.name "Axiom CI"
git config --global user.email "[email protected]"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Check forge version
run: forge --version

- name: Install pnpm packages
working-directory: ./axiom-init
run: pnpm install

- name: Build axiom-init
working-directory: ./axiom-init
run: pnpm run build

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-script -s script -m pnpm --query-type crosschain -sc 11155111 -tc 84532

- name: Compile circuit
working-directory: ./axiom-init/app-script
run: pnpm axiom circuit compile app/axiom/average.circuit.ts -sr ${{ env.RPC_URL_11155111 }} --force

- name: Forge test
working-directory: ./axiom-init/app-script
run: forge test -vvv

test-crosschain-forge-yarn:
name: "axiom-init: Crosschain Forge (yarn)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- 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: axiom-init/pnpm-lock.yaml

- name: Set Git user
run: |
git config --global user.name "Axiom CI"
git config --global user.email "[email protected]"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Check forge version
run: forge --version

- name: Install pnpm packages
working-directory: ./axiom-init
run: pnpm install

- name: Build axiom-init
working-directory: ./axiom-init
run: pnpm run build

- name: Initialize app
working-directory: ./axiom-init
run: node dist/index.js init -p app-forge -s forge -m yarn --query-type crosschain -sc 11155111 -tc 84532
run: node dist/index.js init -p app-forge -s forge -m pnpm -c 11155111

- name: Compile circuit
working-directory: ./axiom-init/app-forge
Expand Down
2 changes: 1 addition & 1 deletion axiom-init/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "axiom-init",
"description": "Initialize a new Axiom project",
"version": "0.2.0",
"version": "0.2.1",
"author": "Intrinsic Technologies",
"scripts": {
"build": "rm -rf dist && node ./script/preBuild.js && tsc",
Expand Down
Loading