Skip to content

Commit 702f9af

Browse files
douglancemouseless0xplusminushalfgithub-actions[bot]pavlovdog
authored
upstream merge from alto (#5)
Co-authored-by: mouseless <97399882+mouseless-eth@users.noreply.github.com> Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: pavlovdog <5871170+pavlovdog@users.noreply.github.com> Co-authored-by: mous <97399882+mouseless0x@users.noreply.github.com> Co-authored-by: Dmitry <98899785+mdqst@users.noreply.github.com> Co-authored-by: Nikita Melnikov <nikmel2803@gmail.com> Co-authored-by: Danilo Tuler <tuler@pobox.com> Co-authored-by: Slava <bet.middle_9d@icloud.com> Co-authored-by: Sergey Potekhin <sergey@pimlico.io> Co-authored-by: plusminushalf <5251472+plusminushalf@users.noreply.github.com> Co-authored-by: Adam Clark <aclark@aclark-d190n1.tail6f50.ts.net> Co-authored-by: Sahil Vasava <sahilvasava@gmail.com> Co-authored-by: SahilVasava <24778390+SahilVasava@users.noreply.github.com>
1 parent 28668aa commit 702f9af

185 files changed

Lines changed: 20709 additions & 10635 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ src/**/lib
1212
**/coverage
1313
**/node_modules
1414
**/test
15-
**/lib
1615
**/.tmp
1716
**/dist
1817
*.log
1918
**/*.log
2019
.idea
2120
.tmp
2221

23-
.env
24-
contracts
22+
.env

.github/actions/install-dependencies/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ runs:
66
steps:
77
- name: Set up pnpm
88
uses: pnpm/action-setup@v4
9+
10+
- name: Install Foundry
11+
uses: foundry-rs/foundry-toolchain@v1

.github/workflows/build-push-ecr.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
steps:
2121
- name: Checkout code
2222
uses: actions/checkout@v4
23+
with:
24+
submodules: recursive
2325

2426
- name: Configure AWS credentials
2527
uses: aws-actions/configure-aws-credentials@v4

.github/workflows/build.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
steps:
1212
- name: Checkout repository
1313
uses: actions/checkout@v4
14+
with:
15+
submodules: recursive
1416

1517
- name: Set up QEMU
1618
if: startsWith(github.ref, 'refs/tags/')

.github/workflows/canary.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release (Canary)
22
on:
33
push:
44
branches:
5-
- main
5+
- main
66
workflow_dispatch:
77

88
jobs:
@@ -18,14 +18,13 @@ jobs:
1818
- name: Install dependencies
1919
uses: ./.github/actions/install-dependencies
2020

21-
2221
- name: Install test dependencies
2322
run: pnpm install
2423

2524
- name: Setup .npmrc file
2625
uses: actions/setup-node@v3
2726
with:
28-
registry-url: 'https://registry.npmjs.org'
27+
registry-url: "https://registry.npmjs.org"
2928

3029
- name: Set alto version
3130
run: |
@@ -35,7 +34,7 @@ jobs:
3534
npm --no-git-tag-version version $(npm pkg get version | sed 's/"//g')-$(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//').$(date +'%Y%m%dT%H%M%S')
3635
- name: Build
3736
run: |
38-
pnpm run build:esm && jq '. + {type: "module"}' ./src/package.json > ./src/package.tmp.json && mv ./src/package.tmp.json ./src/package.json
37+
pnpm run build:contracts && pnpm run build && jq '. + {type: "module"}' ./src/package.json > ./src/package.tmp.json && mv ./src/package.tmp.json ./src/package.json
3938
4039
- name: Publish alto to npm
4140
run: cd src && npm publish --access public --tag $(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//')
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Contract Tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'contracts/**'
7+
- '.github/workflows/contracts-test.yaml'
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
with:
16+
submodules: recursive
17+
18+
- name: Install Foundry
19+
uses: foundry-rs/foundry-toolchain@v1
20+
with:
21+
version: nightly
22+
23+
- name: Run Forge build
24+
run: |
25+
cd contracts
26+
forge build --sizes
27+
id: build
28+
29+
- name: Run Forge tests
30+
run: |
31+
cd contracts
32+
forge test -vvv
33+
id: test

.github/workflows/e2e.yaml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,41 @@ on:
44
workflow_call:
55
push:
66
branches:
7-
- main
7+
- main
88
pull_request:
99
branches:
10-
- main
10+
- main
1111

1212
jobs:
1313
docker-e2e:
1414
timeout-minutes: 10
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v4
18+
- name: Cache pnpm store
19+
uses: actions/cache@v4
20+
with:
21+
path: ~/.pnpm-store
22+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
23+
restore-keys: |
24+
${{ runner.os }}-pnpm-store-
2025
21-
- name: Install Node.js
22-
uses: actions/setup-node@v3
23-
with:
24-
node-version: 22
26+
- name: Checkout
27+
uses: actions/checkout@v4
2528

26-
- name: Set up foundry
27-
uses: foundry-rs/foundry-toolchain@v1
29+
- name: Install Node.js
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: 22
2833

29-
- name: Install dependencies
30-
uses: ./.github/actions/install-dependencies
34+
- name: Set up foundry
35+
uses: foundry-rs/foundry-toolchain@v1
3136

32-
- name: Install test dependencies
33-
run: pnpm install
37+
- name: Install dependencies
38+
uses: ./.github/actions/install-dependencies
3439

35-
- name: Start tests
36-
run: pnpm run test:ci
40+
- name: Install test dependencies
41+
run: pnpm install
3742

43+
- name: Start tests
44+
run: pnpm run test:ci

.github/workflows/lint.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Lint the Pull Request
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize, ready_for_review]
6+
7+
jobs:
8+
lint:
9+
name: Lint
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Install dependencies
17+
uses: ./.github/actions/install-dependencies
18+
19+
- name: Install dependencies
20+
run: pnpm install
21+
22+
- name: Run format check
23+
run: pnpm run lint:fix && pnpm run lint
24+
25+
- uses: stefanzweifel/git-auto-commit-action@v5
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
with:
29+
commit_message: 'chore: format'
30+
commit_user_name: 'github-actions[bot]'
31+
commit_user_email: 'github-actions[bot]@users.noreply.github.com'

.github/workflows/on-push-to-main.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
with:
3131
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
3232
fetch-depth: 0
33+
submodules: recursive
3334

3435
- name: Install core dependencies
3536
uses: ./.github/actions/install-dependencies
@@ -55,6 +56,8 @@ jobs:
5556
steps:
5657
- name: Clone repository
5758
uses: actions/checkout@v3
59+
with:
60+
submodules: recursive
5861

5962
- name: Install core dependencies
6063
uses: ./.github/actions/install-dependencies
@@ -64,7 +67,7 @@ jobs:
6467

6568
- name: Build
6669
run: |
67-
pnpm run build && pnpm run build:esm && jq '. + {type: "module"}' ./src/package.json > ./src/package.tmp.json && mv ./src/package.tmp.json ./src/package.json
70+
pnpm run build:contracts && pnpm run build && jq '. + {type: "module"}' ./src/package.json > ./src/package.tmp.json && mv ./src/package.tmp.json ./src/package.json
6871
6972
- name: Publish to NPM
7073
uses: changesets/action@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ Alto-Bruno/
1414
.nx/cache
1515
.vscode/
1616
.sentryclirc
17+
src/contracts

0 commit comments

Comments
 (0)