Skip to content

Commit

Permalink
Merge branch 'main' into hive_full_snap_upgrade_
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Sep 12, 2024
2 parents 4e343a9 + fd68794 commit 7cb7f50
Show file tree
Hide file tree
Showing 309 changed files with 2,621 additions and 2,276 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/eventindexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- "packages/eventindexer/**"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/eventindexer/**"
- "go.mod"
Expand All @@ -14,6 +15,7 @@ on:
jobs:
lint-eventindexer:
name: lint-eventindexer
if: github.event_name == 'pull_request'
runs-on: [taiko-runner]
steps:
- uses: actions/setup-go@v5
Expand All @@ -32,6 +34,7 @@ jobs:

test-eventindexer:
runs-on: [taiko-runner]
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
needs: lint-eventindexer
steps:
- name: Cancel Previous Runs
Expand All @@ -55,7 +58,8 @@ jobs:
flags: eventindexer

push-eventindexer-docker-image:
if: ${{ github.event_name == 'pull_request' }}
# Skip dependabot PRs
if: ${{ github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/dependabot/') }}
name: Build and push docker image
runs-on: [taiko-runner]

Expand Down Expand Up @@ -93,7 +97,6 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
push: true
context: .
tags: ${{ steps.meta.outputs.tags }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/guardian-prover-health-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ jobs:
flags: guardian-prover-health-check

push-guardian-prover-health-check-docker-image:
if: ${{ github.event_name == 'pull_request' }}
# Skip dependabot PRs
if: ${{ github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/dependabot/') }}
name: Build and push docker image
runs-on: [taiko-runner]

Expand Down Expand Up @@ -93,7 +94,6 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
push: true
context: .
tags: ${{ steps.meta.outputs.tags }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/nfts.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: NFTs

on:
push:
branches: [main]
paths:
- "packages/nfts/**"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/nfts/**"

jobs:
build-nfts-contracts:
if: github.event.pull_request.draft == false
runs-on: [taiko-runner]
steps:
- name: Cancel previous runs
Expand Down
22 changes: 6 additions & 16 deletions .github/workflows/protocol.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: Protocol

on:
push:
branches: [main]
paths:
- "packages/protocol/**"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/protocol/**"

jobs:
build-protocol:
if: github.event.pull_request.draft == false
runs-on: [taiko-runner]
permissions:
# Give the necessary permissions for stefanzweifel/git-auto-commit-action.
Expand All @@ -34,24 +32,16 @@ jobs:

- name: Unit tests
working-directory: ./packages/protocol
run: pnpm clean && pnpm test

- name: Format solidity && update contract layout table
working-directory: ./packages/protocol
run: pnpm layout && forge fmt
run: pnpm clean && forge fmt && pnpm test:l1 && pnpm layout:l1 && pnpm test:l2 && pnpm layout:l2

- name: Commit contract layout table
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "forge fmt & update contract layout table"
commit_message: "forge fmt & update contract layout tables"

- name: Generate genesis
working-directory: ./packages/protocol
run: pnpm test:genesis

- name: Run snapshot (Foundry)
working-directory: ./packages/protocol
run: pnpm snapshot
run: pnpm genesis:test

- name: Deploy L1 contracts
working-directory: ./packages/protocol
Expand All @@ -60,4 +50,4 @@ jobs:
while ! nc -z localhost 8545; do
sleep 1
done
pnpm test:deploy
pnpm test:deploy:l1
7 changes: 5 additions & 2 deletions .github/workflows/relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- "packages/relayer/**"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/relayer/**"
- "go.mod"
Expand All @@ -14,6 +15,7 @@ on:
jobs:
lint-relayer:
name: lint-relayer
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
runs-on: [taiko-runner]
steps:
- uses: actions/setup-go@v5
Expand All @@ -31,6 +33,7 @@ jobs:
args: --config=.golangci.yml --timeout=4m

test-relayer:
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
runs-on: [taiko-runner]
needs: lint-relayer
steps:
Expand All @@ -55,7 +58,8 @@ jobs:
flags: relayer

push-relayer-docker-image:
if: ${{ github.event_name == 'pull_request' }}
# Skip dependabot PRs
if: ${{ github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/dependabot/') }}
name: Build and push docker image
runs-on: [taiko-runner]

Expand Down Expand Up @@ -93,7 +97,6 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
push: true
context: .
tags: ${{ steps.meta.outputs.tags }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/repo--auto-approve-pr.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Auto Approve PR

on: pull_request_target
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
auto-approve:
if: github.event.pull_request.draft == false && github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: github.actor == 'dependabot[bot]'
steps:
- uses: hmarr/auto-approve-action@v4
3 changes: 2 additions & 1 deletion .github/workflows/repo--typo-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on: [pull_request]

jobs:
check-for-typos:
runs-on: [taiko-runner]
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/repo--validate-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ on:
types:
- opened
- edited
- synchronize
push:
branches:
- release-please-* # Trigger for release-please PRs, but skip the job

jobs:
validate-pr-title:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/repo--vercel-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ env:

jobs:
build-deploy:
if: github.actor != 'dependabot'
runs-on: [taiko-runner]
steps:
- name: Print Vercel Project ID
run: |
echo "Vercel Project ID: ${{ env.VERCEL_PROJECT_ID }}"
- name: Checkout repository
uses: actions/checkout@v4

Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/snaefell-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Snaefell UI CI/CD

on:
push:
branches-ignore:
- dependabot/**
tags:
- "snaefull-ui-v*"
pull_request:
Expand All @@ -13,17 +15,18 @@ jobs:
uses: ./.github/workflows/snaefell-ui--ci.yml

# Deployment name follow the pattern: deploy_<appname(snaefell-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)>
deploy_snaefell-ui_mainnet_preview:
if: ${{ github.ref_name != 'main' }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
environment: "preview"
flags: ""
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_SNAEFELL_UI_MAINNET }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
# The following Vercel project is not found, so disable it at least for now.
# deploy_snaefell-ui_mainnet_preview:
# if: ${{ github.ref_name != 'main' }}
# needs: build-and-test
# uses: ./.github/workflows/repo--vercel-deploy.yml
# with:
# environment: "preview"
# flags: ""
# secrets:
# vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_SNAEFELL_UI_MAINNET }}
# vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
# vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_snaefell-ui_mainnet_production:
if: ${{ startsWith(github.ref, 'refs/tags/snaefull-ui-v') }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/supplementary-contracts.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: Supplementary Contracts

on:
push:
branches: [main]
paths:
- "packages/supplementary-contracts/**"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/supplementary-contracts/**"

jobs:
build-supplementary-contracts:
if: github.event.pull_request.draft == false
runs-on: [taiko-runner]
steps:
- name: Cancel previous runs
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/taiko-client--docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ jobs:
type=sha
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: packages/taiko-client/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 3 additions & 0 deletions .github/workflows/taiko-client--hive_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ name: "Taiko Client Hive Tests"
on:
push:
branches: [hive_full_snap_upgrade_]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/taiko-client/**"
- "go.mod"
- "go.sum"

jobs:
hive_tests:
if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'option.hive-test')
name: hive tests
runs-on: ubuntu-latest

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/taiko-client--test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
name: "CI"

on:
push:
branches: [main]
paths:
- "packages/taiko-client/**"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/taiko-client/**"
- "go.mod"
- "go.sum"

jobs:
lint:
if: github.event.pull_request.draft == false
name: Lint
runs-on: ubuntu-latest
steps:
Expand All @@ -29,6 +27,7 @@ jobs:
run: make lint

integration_tests:
if: github.event.pull_request.draft == false
name: Integration tests
runs-on: ubuntu-latest

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/taikoon-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ name: Taikoon UI CI/CD

on:
push:
branches-ignore:
- dependabot/**
tags:
- "taikoon-ui-v*"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/taikoon-ui/**"

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ __pycache__/

# VSCode
.vscode/launch.json
packages/protocol/config.js
.vercel

# Idea
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"packages/relayer": "0.12.0",
"packages/snaefell-ui": "1.1.0",
"packages/supplementary-contracts": "1.0.0",
"packages/taiko-client": "0.35.0",
"packages/taiko-client": "0.36.0",
"packages/taikoon-ui": "1.2.0",
"packages/ui-lib": "1.0.0"
}
4 changes: 1 addition & 3 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ extend-exclude = [
"go.mod",
"CHANGELOG.md",
"packages/protocol/audit/code4rena-2024-03-taiko-final-report.md",
"packages/protocol/contracts/automata-attestation/**",
"packages/protocol/contracts/thirdparty/**",
"packages/protocol/contracts/compiled/**",
"packages/protocol/contracts/layer1/automata-attestation/**",
"packages/protocol/deployments/**",
# TODO: fix typos and remove these
"packages/taiko-client/**",
Expand Down
10 changes: 10 additions & 0 deletions packages/docs-site/src/content/docs/resources/developer-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,14 @@ import { LinkCard, CardGrid } from "@astrojs/starlight/components";
description="API3 offers over 200 first-party, OEV-enabled price feeds on Taiko Mainnet and Testnet, providing reliable and decentralized data through the API3 Market."
href="https://market.api3.org/taiko"
/>
</CardGrid>

## Node Providers

<CardGrid>
<LinkCard
title="Porters TKN Api"
description="PORTERS provides Web3 DePIN infrastructure through the POKT Network. The PORTERS Token Name Service API provides API access to token metadata, including TAIKO, through REST endpoints that may be accessed through the user's PORTERS App."
href="https://docs.porters.xyz/"
/>
</CardGrid>
Loading

0 comments on commit 7cb7f50

Please sign in to comment.