Skip to content

Commit

Permalink
Merge branch 'main' into fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored May 7, 2024
2 parents f809ed4 + 40e2b0c commit e6085cc
Show file tree
Hide file tree
Showing 113 changed files with 6,190 additions and 4,929 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/guardian-prover-health-check-ui-preview.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/guardian-prover-health-check-ui-production.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/guardian-ui-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Deploy Guardians UI to Vercel

on:
workflow_call:
inputs:
environment:
type: string
required: true
flags:
type: string
required: true
vercel_org_id:
type: string
required: true
vercel_project_id:
type: string
required: true

env:
VERCEL_ORG_ID: ${{ inputs.vercel_org_id }}
VERCEL_PROJECT_ID: ${{ inputs.vercel_project_id }}

jobs:
build-deploy:
runs-on: [taiko-runner]
steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Install Vercel CLI
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=${{ inputs.environment }} --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build ${{ inputs.flags }} --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt ${{ inputs.flags }} --token=${{ secrets.VERCEL_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/guardian-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Guardian UI CI/CD

on:
push:
branches-ignore:
- release-please-*
paths:
- "packages/guardian-prover-health-check-ui/**"

jobs:
# Deployment name follow the pattern: deploy_<appname(bridge-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)>
deploy_guardian-ui_hekla_preview:
if: ${{ !github.ref_name == 'main' }}
uses: ./.github/workflows/guardian-ui-deploy.yml
with:
environment: "preview"
flags: ""
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_PROVER_HEALTH_CHECK_UI_HEKLA }}

deploy_guardian-ui_devnet_preview:
if: ${{ !github.ref_name == 'main' }}
uses: ./.github/workflows/guardian-ui-deploy.yml
with:
environment: "preview"
flags: ""
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_PROVER_HEALTH_CHECK_UI_INTERNAL }}

deploy_guardian-ui_hekla_production:
if: ${{ github.ref_name == 'main' && startsWith(github.ref, 'refs/tags/guardian-prover-health-check-ui-') }}
uses: ./.github/workflows/guardian-ui-deploy.yml
with:
environment: "production"
flags: "--prod"
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_PROVER_HEALTH_CHECK_UI_HEKLA }}
31 changes: 16 additions & 15 deletions .github/workflows/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
jobs:
build:
runs-on: [taiko-runner]
permissions:
# Give the necessary permissions for stefanzweifel/git-auto-commit-action.
contents: write
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
Expand All @@ -35,34 +38,32 @@ jobs:
working-directory: ./packages/protocol
run: forge fmt --check

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

- name: Generate Genesis
- name: Generate contract layout table
working-directory: ./packages/protocol
run: pnpm test:genesis
run: pnpm layout

- name: Commit contract layout table
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Add contract layout table"

# TODO: CompilerError: Stack too deep
# - name: Test Coverage
# working-directory: ./packages/protocol
# run: pnpm test:coverage
- name: Generate genesis
working-directory: ./packages/protocol
run: pnpm test:genesis

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

- name: Deploy L1 Contracts
- name: Deploy L1 contracts
working-directory: ./packages/protocol
run: |
anvil --hardfork cancun &
while ! nc -z localhost 8545; do
sleep 1
done
pnpm test:deploy
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# directory: ./packages/protocol/coverage
# flags: protocol
40 changes: 0 additions & 40 deletions .github/workflows/slither.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Here are some ways you can contribute:

Please comment on the issue that you're interested in working on. Also, check out the [coding standards](#coding-standards) and [documentation standards](#documentation-standards) before you start working on the pull request.

Once the pull request is merged to one of Taiko's GitHub repositories (you can see which repositories here: [2024 Taiko Contributor GitPOAP](https://www.gitpoap.io/gp/1092)), you will be automatically awarded a Taiko Contributor GitPOAP. Opening a good new issue (not a spam issue) is also eligible for a GitPOAP, just leave a comment and we will manually invoke a GitHub bot that will send the GitPOAP.
Once the pull request is merged to one of Taiko's GitHub repositories (you can see which repositories here: [2024 Taiko Contributor GitPOAP](https://www.gitpoap.io/gp/1092)), you should be automatically awarded a Taiko Contributor GitPOAP, unless the repo has not been configured with GitPOAP.

## Coding standards

Expand Down
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ARG PACKAGE=eventindexer

FROM golang:1.21.0 as builder

ARG PACKAGE=eventindexer
ARG PACKAGE

RUN apt install git curl

Expand All @@ -12,16 +14,17 @@ COPY . .

RUN go mod download

WORKDIR /taiko-mono/packages/$PACKAGE
WORKDIR /taiko-mono/packages/${PACKAGE}

RUN CGO_ENABLED=0 GOOS=linux go build -o /taiko-mono/packages/$PACKAGE/bin/${PACKAGE} /taiko-mono/packages/$PACKAGE/cmd/main.go
RUN CGO_ENABLED=0 GOOS=linux go build -o /taiko-mono/packages/${PACKAGE}/bin/${PACKAGE} /taiko-mono/packages/${PACKAGE}/cmd/main.go

FROM alpine:latest

ARG PACKAGE
ENV PACKAGE=${PACKAGE}

RUN apk add --no-cache ca-certificates

COPY --from=builder /taiko-mono/packages/$PACKAGE/bin/$PACKAGE /usr/local/bin/
COPY --from=builder /taiko-mono/packages/${PACKAGE}/bin/${PACKAGE} /usr/local/bin/

ENTRYPOINT ["$PACKAGE"]
ENTRYPOINT /usr/local/bin/${PACKAGE}
4 changes: 4 additions & 0 deletions packages/bridge-ui/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ export PUBLIC_SLOW_L1_BRIDGING_WARNING=false

# Fees
export PUBLIC_FEE_MULTIPLIER=

# APIs
export MORALIS_PROJECT_ID=""
export MORALIS_API_KEY=""
2 changes: 2 additions & 0 deletions packages/bridge-ui/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ package-lock.json
yarn.lock

src/generated/*

.vercel/**
1 change: 1 addition & 0 deletions packages/bridge-ui/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ CHANGELOG.md
pnpm-lock.yaml
package-lock.json
yarn.lock
.vercel/**
28 changes: 15 additions & 13 deletions packages/bridge-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
"devDependencies": {
"@playwright/test": "^1.43.1",
"@sveltejs/adapter-auto": "^3.2.0",
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/kit": "^1.30.4",
"@sveltejs/kit": "^2.5.7",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@types/debug": "^4.1.12",
"@types/object-hash": "^3.0.6",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.7.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@vitest/coverage-v8": "^1.4.0",
"@wagmi/cli": "^2.1.4",
"abitype": "^1.0.2",
"ajv": "^8.12.0",
"autoprefixer": "^10.4.18",
"daisyui": "^4.7.2",
"daisyui": "^4.10.3",
"dotenv": "^16.4.5",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -45,23 +45,24 @@
"lokijs": "^1.5.12",
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.2",
"svelte": "^4.2.12",
"svelte-check": "^3.6.9",
"prettier-plugin-svelte": "^3.2.3",
"svelte": "^4.2.15",
"svelte-check": "^3.7.1",
"tailwindcss": "^3.4.3",
"ts-morph": "^19.0.0",
"tslib": "^2.6.2",
"typescript": "^5.4.3",
"vite": "^4.5.3",
"vite": "^5.2.10",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^0.32.4",
"vitest": "^1.5.3",
"vitest-fetch-mock": "^0.2.2",
"vitest-mock-extended": "1.3.1"
},
"type": "module",
"dependencies": {
"@wagmi/connectors": "^4.1.18",
"@wagmi/core": "^2.8.0",
"@moralisweb3/common-evm-utils": "^2.26.1",
"@wagmi/connectors": "^4.3.1",
"@wagmi/core": "^2.8.1",
"@walletconnect/ethereum-provider": "^2.12.2",
"@walletconnect/modal": "^2.6.2",
"@web3modal/wagmi": "^4.1.11",
Expand All @@ -70,8 +71,9 @@
"buffer": "^6.0.3",
"debug": "^4.3.4",
"events": "^3.3.0",
"moralis": "^2.26.1",
"object-hash": "^3.0.0",
"svelte-i18n": "^3.7.4",
"svelte-i18n": "^4.0.0",
"viem": "^2.9.29"
}
}
7 changes: 7 additions & 0 deletions packages/bridge-ui/src/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ export const ipfsConfig = {
gatewayTimeout: 200,
overallTimeout: 5000,
};

export const moralisApiConfig = {
limit: 10,
format: 'decimal',
excludeSpam: true,
mediaItems: false,
};
Loading

0 comments on commit e6085cc

Please sign in to comment.