chore: Initial commit
Co-authored-by: Franklin Delehelle <franklin.delehelle@odena.eu> Co-authored-by: Alexandre Belling <alexandrebelling8@gmail.com> Co-authored-by: Pedro Novais <jpvnovais@gmail.com> Co-authored-by: Roman Vaseev <4833306+Filter94@users.noreply.github.com> Co-authored-by: Bradley Bown <bradbown@googlemail.com> Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com> Co-authored-by: Nikolai Golub <nikolai.golub@consensys.net> Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com> Co-authored-by: jonesho <81145364+jonesho@users.noreply.github.com> Co-authored-by: Gaurav Ahuja <gauravahuja9@gmail.com> Co-authored-by: Azam Soleimanian <49027816+Soleimani193@users.noreply.github.com> Co-authored-by: Andrei A <andrei.alexandru@consensys.net> Co-authored-by: Arijit Dutta <37040536+arijitdutta67@users.noreply.github.com> Co-authored-by: Gautam Botrel <gautam.botrel@gmail.com> Co-authored-by: Ivo Kubjas <ivo.kubjas@consensys.net> Co-authored-by: gusiri <dreamerty@postech.ac.kr> Co-authored-by: FlorianHuc <florian.huc@gmail.com> Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com> Co-authored-by: Julink <julien.fontanel@consensys.net> Co-authored-by: Bogdan Ursu <bogdanursuoffice@gmail.com> Co-authored-by: Jakub Trąd <jakubtrad@gmail.com> Co-authored-by: Alessandro Sforzin <alessandro.sforzin@consensys.net> Co-authored-by: Olivier Bégassat <olivier.begassat.cours@gmail.com> Co-authored-by: Steve Huang <97596526+stevehuangc7s@users.noreply.github.com> Co-authored-by: bkolad <blazejkolad@gmail.com> Co-authored-by: fadyabuhatoum1 <139905934+fadyabuhatoum1@users.noreply.github.com> Co-authored-by: Blas Rodriguez Irizar <rodrigblas@gmail.com> Co-authored-by: Eduardo Andrade <eduardofandrade@gmail.com> Co-authored-by: Ivo Kubjas <tsimmm@gmail.com> Co-authored-by: Ludcour <ludovic.courcelas@consensys.net> Co-authored-by: m4sterbunny <harrie.bickle@consensys.net> Co-authored-by: Alex Panayi <145478258+alexandrospanayi@users.noreply.github.com> Co-authored-by: Diana Borbe - ConsenSys <diana.borbe@consensys.net> Co-authored-by: ThomasPiellard <thomas.piellard@gmail.com>
25
.editorconfig
Normal file
@@ -0,0 +1,25 @@
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length=120
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.go]
|
||||
indent_style = tab
|
||||
indent_size = tab
|
||||
|
||||
# line bellow should be like "[*.{kt,kts}]" if your editor adds spaces, it will break...
|
||||
# https://github.com/pinterest/ktlint#intellij-idea-editorconfig-autoformat-issue
|
||||
# [*.{kt,kts}]
|
||||
# possible values: number (e.g. 2), "unset" (makes ktlint ignore indentation completely)
|
||||
# indent_size=2
|
||||
# insert_final_newline=true # true (recommended) / false
|
||||
# possible values: number (e.g. 120) (package name, imports & comments are ignored), "off"
|
||||
# it's automatically set to 100 on `ktlint --android ...` (per Android Kotlin Style Guide)
|
||||
# max_line_length=120
|
||||
16
.eslintrc.js
Normal file
@@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
browser: false,
|
||||
es2022: true,
|
||||
},
|
||||
ignorePatterns: ["dist", "coverage"],
|
||||
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: ["@typescript-eslint", "prettier"],
|
||||
parserOptions: {
|
||||
ecmaVersion: 12,
|
||||
sourceType: "module",
|
||||
},
|
||||
};
|
||||
24
.gitattributes
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text eol=lf
|
||||
|
||||
/gradlew -text
|
||||
*.md -text
|
||||
*.jar -text
|
||||
*.bat -text
|
||||
*.pcap binary
|
||||
*.blocks binary
|
||||
*.dll binary
|
||||
*.dylib binary
|
||||
*.so binary
|
||||
*.gz binary
|
||||
*.ssz binary
|
||||
*.ssz_snappy binary
|
||||
*.png binary
|
||||
|
||||
prover/prover-assets/**/**/**/*.bin binary
|
||||
prover/prover-assets/**/**/**/**/*.bin binary
|
||||
prover/prover-assets/kzgsrs/* binary
|
||||
|
||||
5
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# These owners will be the default owners for everything in
|
||||
# the repo. Unless a later match takes precedence,
|
||||
# @global-owner1 and @global-owner2 will be requested for
|
||||
# review when someone opens a pull request.
|
||||
/contracts/contracts/ @Consensys/linea-contract-team
|
||||
32
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: File a bug report
|
||||
title: 'Short and factual title summarizing the bug.'
|
||||
labels: Bug
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
_Remenber not to put too much unhelpful information or too little important information, be specific._
|
||||
|
||||
## Impact
|
||||
__environment [Testnet/Mainnet]__
|
||||
|
||||
__an user is impacted [Y/N], if yes type of user: [External/Internal]__
|
||||
|
||||
## Describe the bug
|
||||
### Steps to Reproduce
|
||||
_A bug that we can't reproduce is hard to resolve, to ensure the bug is fixed in a timely manner, it is crucial to indicate how to reproduce it. If the bug can't be reproduced, give specific details on how it happened._
|
||||
|
||||
Steps to reproduce the bug:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
### Actual result
|
||||
Evidence of the bug including log extracts, screen shot, wallet addresses, Tx hash, ...
|
||||
|
||||
### Expected result
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
_Remember that an issue without proper labels and without assignee is unlikely to get prioritized -> contact the team or the product owner to get it included in the plan._
|
||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
27
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: File a feature request
|
||||
title: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Description
|
||||
Write a clear and concise description of what you want to happen. Add any considered drawbacks.
|
||||
|
||||
## Motivation
|
||||
This section should indicate what value we are receiving from it.
|
||||
|
||||
## Tasks
|
||||
- [ ] Medium-level task that needs to be implemented for this feature request to be considered complete.
|
||||
|
||||
## Acceptance criteria
|
||||
- [ ] List tests that need to be implemented or checks to consider this task completed.
|
||||
|
||||
## Risks
|
||||
- [ ] These are risks that may prevent completion of the task as well as areas to pay special attention to
|
||||
|
||||
## Remember to
|
||||
- [ ] Add the `documentation` label in case there is an impact on the documentation
|
||||
- [ ] Add `priority` and `team` labels
|
||||
- [ ] Add Task for updating the Runbook or adding/updating existing metrics and alerts.
|
||||
39
.github/ISSUE_TEMPLATE/operational_task_template.md
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
name: Operational Task Template
|
||||
about: Use this template for creating new tasks in linea/zkevm
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Problem Statement
|
||||
- Contains some manner of action item.
|
||||
- Contains the service the action pertains to
|
||||
- Network scope: Select those that apply, or select All
|
||||
- [ ] All
|
||||
- [ ] Mainnet
|
||||
- [ ] Testnet - Goerli
|
||||
- [ ] Testnet - Sepolia
|
||||
- [ ] Devnet
|
||||
|
||||
## Background and Context
|
||||
- May not be relevant for all tickets?
|
||||
- Include diagrams/visual aids
|
||||
- Links to other tickets or tasks, Slack links/conversations
|
||||
- Helpful to avoid the X/Y problem , https://xyproblem.info/ - https://en.wikipedia.org/wiki/XY_problem
|
||||
|
||||
## Desired Solution
|
||||
- If a solution is not specified, then create a SPIKE ticket to find the solution first, before creating this ticket
|
||||
- Known solution or end goal provided here, steps to perform
|
||||
- Applying a Runbook if specified, link to Runbook provided here
|
||||
|
||||
## Acceptance Criteria
|
||||
- Must be clear goal, change X to Y. If scope needs to adjust, create a new ticket
|
||||
- Example: Change A to B, then scope changes to include another set of services to change C to D; this should be a different ticket and not added on to this one.
|
||||
- Inter-reference tickets using the Dependencies feature
|
||||
|
||||
## Ensure to labeled appropriately:
|
||||
|
||||
- [ ] 1 Team associated (Example Operations)
|
||||
- [ ] 1 Priority associated (Example P2: Medium)
|
||||
52
.github/actions/check-image-tags-exist/action.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: 'Check image tags exist'
|
||||
|
||||
description: 'Check if the image tags exist'
|
||||
inputs:
|
||||
last_commit_tag:
|
||||
description: 'The tag of the last commit image'
|
||||
required: true
|
||||
common_ancestor_tag:
|
||||
description: 'The tag of the common ancestor commit image'
|
||||
required: true
|
||||
image_name:
|
||||
description: 'The name of the image to check'
|
||||
required: true
|
||||
docker_username:
|
||||
description: 'The username to login to Docker Hub'
|
||||
required: true
|
||||
docker_password:
|
||||
description: 'The password to login to Docker Hub'
|
||||
required: true
|
||||
outputs:
|
||||
last_commit_tag_exists:
|
||||
description: 'Whether the last commit image tag exists'
|
||||
value: ${{ steps.last_commit_image_exists.outputs.last_commit_tag_exists }}
|
||||
common_ancestor_commit_tag_exists:
|
||||
description: 'Whether the common ancestor commit image tag exists'
|
||||
value: ${{ steps.ancestor_commit_image_exists.outputs.common_ancestor_commit_tag_exists }}
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ inputs.docker_username }}
|
||||
password: ${{ inputs.docker_password }}
|
||||
- name: Check last commit image tag exists
|
||||
id: last_commit_image_exists
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
run: |
|
||||
echo last_commit_tag_exists=$(docker pull ${{ inputs.image_name }}:${{ inputs.last_commit_tag }} > /dev/null ; echo $?) >> $GITHUB_OUTPUT
|
||||
- name: Check ancestor commit image tag exists
|
||||
shell: bash
|
||||
id: ancestor_commit_image_exists
|
||||
continue-on-error: true
|
||||
run: |
|
||||
echo common_ancestor_commit_tag_exists=$(docker pull ${{ inputs.image_name }}:${{ inputs.common_ancestor_tag }} > /dev/null ; echo $?) >> $GITHUB_OUTPUT
|
||||
- name: Show outputs
|
||||
shell: bash
|
||||
run: |
|
||||
echo "last_commit_tag_exists: ${{ steps.last_commit_image_exists.outputs.last_commit_tag_exists }}"
|
||||
echo "common_ancestor_commit_tag_exists: ${{ steps.ancestor_commit_image_exists.outputs.common_ancestor_commit_tag_exists }}"
|
||||
78
.github/actions/image-tag-and-push/action.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
name: Image tag and push
|
||||
description: Tag and push a Docker image
|
||||
|
||||
inputs:
|
||||
commit_tag:
|
||||
description: 'The tag of the commit image'
|
||||
required: true
|
||||
last_commit_tag:
|
||||
description: 'The tag of the last commit image'
|
||||
required: true
|
||||
common_ancestor_tag:
|
||||
description: 'The tag of the common ancestor commit image'
|
||||
required: true
|
||||
develop_tag:
|
||||
description: 'The tag of the develop image'
|
||||
required: true
|
||||
untested_tag_suffix:
|
||||
description: 'The suffix to add to untested images'
|
||||
required: true
|
||||
image_name:
|
||||
description: 'The name of the image to tag and push'
|
||||
required: true
|
||||
last_commit_tag_exists:
|
||||
description: 'Whether the last commit image tag exists'
|
||||
required: true
|
||||
common_ancestor_commit_tag_exists:
|
||||
description: 'Whether the common ancestor commit image tag exists'
|
||||
required: true
|
||||
docker_username:
|
||||
description: 'The username to login to Docker Hub'
|
||||
required: true
|
||||
docker_password:
|
||||
description: 'The password to login to Docker Hub'
|
||||
required: true
|
||||
|
||||
outputs:
|
||||
image_tagged:
|
||||
description: 'Whether the image was tagged'
|
||||
value: ${{ steps.set-output.outputs.image_tagged }}
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ inputs.docker_username }}
|
||||
password: ${{ inputs.docker_password }}
|
||||
- name: Initialize IMAGE_TAGGED value
|
||||
shell: bash
|
||||
run: |
|
||||
echo IMAGE_TAGGED=false >> $GITHUB_ENV
|
||||
- name: Tag Docker image with last commit tag with the commit hash plus w/o "untested" suffix
|
||||
shell: bash
|
||||
if: ${{ inputs.last_commit_tag != '0000000' && inputs.last_commit_tag_exists == '0' }}
|
||||
run: |
|
||||
docker buildx imagetools create --tag ${{ inputs.image_name }}:${{ inputs.commit_tag }} ${{ inputs.image_name }}:${{ inputs.last_commit_tag }}
|
||||
docker buildx imagetools create --tag ${{ inputs.image_name }}:${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }} ${{ inputs.image_name }}:${{ inputs.last_commit_tag }}
|
||||
echo IMAGE_TAGGED=true >> $GITHUB_ENV
|
||||
- name: Tag Docker image with common ancestor commit tag with the commit hash plus w/o "untested" suffix
|
||||
shell: bash
|
||||
if: ${{ inputs.last_commit_tag == '0000000' && inputs.common_ancestor_commit_tag_exists == '0' }}
|
||||
run: |
|
||||
docker buildx imagetools create --tag ${{ inputs.image_name }}:${{ inputs.commit_tag }} ${{ inputs.image_name }}:${{ inputs.common_ancestor_tag }}
|
||||
docker buildx imagetools create --tag ${{ inputs.image_name }}:${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }} ${{ inputs.image_name }}:${{ inputs.common_ancestor_tag }}
|
||||
echo IMAGE_TAGGED=true >> $GITHUB_ENV
|
||||
- name: Tag Docker image with develop if on main branch
|
||||
shell: bash
|
||||
if: ${{ github.ref == 'refs/heads/main' && inputs.last_commit_tag_exists == '0' }}
|
||||
run: |
|
||||
docker buildx imagetools create --tag ${{ inputs.image_name }}:${{ inputs.develop_tag }} ${{ inputs.image_name }}:${{ inputs.last_commit_tag }}
|
||||
echo IMAGE_TAGGED=true >> $GITHUB_ENV
|
||||
|
||||
- name: Set output from environment variable
|
||||
shell: bash
|
||||
id: set-output
|
||||
run: |
|
||||
echo "image_tagged=$IMAGE_TAGGED" >> $GITHUB_OUTPUT
|
||||
32
.github/actions/setup-nodejs/action.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: 'Setup nodes'
|
||||
description: 'Setup nodejs'
|
||||
|
||||
inputs:
|
||||
node-version:
|
||||
description: 'The version of node to use'
|
||||
required: true
|
||||
default: '18.15.0'
|
||||
pnpm-version:
|
||||
description: 'The version of pnpm to use'
|
||||
required: true
|
||||
default: '9.1.1'
|
||||
pnpm-install-options:
|
||||
description: 'The options to pass to pnpm install'
|
||||
required: true
|
||||
default: '--frozen-lockfile --prefer-offline --ignore-scripts'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: ${{ inputs.pnpm-version }}
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Npm install
|
||||
run: pnpm i ${{ inputs.pnpm-install-options }}
|
||||
shell: bash
|
||||
7
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
This PR implements issue(s) #
|
||||
|
||||
### Checklist
|
||||
|
||||
* [ ] I wrote new tests for my new core changes.
|
||||
* [ ] I have successfully ran tests, style checker and build against my new changes locally.
|
||||
* [ ] I have informed the team of any breaking changes if there are any.
|
||||
132
.github/workflows/all-tools.yml
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
name: All tools CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'operations/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'operations/**'
|
||||
|
||||
env:
|
||||
DOCKER_IMAGE_NAME: consensys/linea-alltools
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
name: Filter commit changes
|
||||
outputs:
|
||||
all-tools: ${{ steps.filter.outputs.all-tools }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Filter commit changes
|
||||
uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
base: ${{ github.ref }}
|
||||
list-files: "json"
|
||||
filters: |
|
||||
all-tools:
|
||||
- 'operations/**'
|
||||
- '.github/workflows/all-tools.yml'
|
||||
- '.github/workflows/reuse-*.yml'
|
||||
|
||||
store_image_name_and_tags:
|
||||
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml
|
||||
|
||||
check_image_tags_exist:
|
||||
runs-on: ubuntu-latest
|
||||
name: Check image tags exist
|
||||
needs: [ changes, store_image_name_and_tags ]
|
||||
if: ${{ needs.changes.outputs.all-tools == 'false' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Check image tags exist
|
||||
uses: ./.github/actions/check-image-tags-exist
|
||||
with:
|
||||
last_commit_tag: ${{ needs.store_image_name_and_tags.outputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ needs.store_image_name_and_tags.outputs.common_ancestor_tag }}
|
||||
image_name: ${{ env.DOCKER_IMAGE_NAME }}
|
||||
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
all-tools-tag-only:
|
||||
runs-on: ubuntu-latest
|
||||
name: All tools tag only
|
||||
needs: [ changes, store_image_name_and_tags, check_image_tags_exist ]
|
||||
if: ${{ github.event_name != 'pull_request' && needs.changes.outputs.all-tools == 'false' }}
|
||||
outputs:
|
||||
image_tagged: ${{ steps.image_tag_push.outputs.image_tagged }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Tag and push image
|
||||
id: image_tag_push
|
||||
uses: ./.github/actions/image-tag-and-push
|
||||
with:
|
||||
commit_tag: ${{ needs.store_image_name_and_tags.outputs.commit_tag }}
|
||||
last_commit_tag: ${{ needs.store_image_name_and_tags.outputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ needs.store_image_name_and_tags.outputs.common_ancestor_tag }}
|
||||
develop_tag: ${{ needs.store_image_name_and_tags.outputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ needs.store_image_name_and_tags.outputs.untested_tag_suffix }}
|
||||
image_name: ${{ env.DOCKER_IMAGE_NAME }}
|
||||
last_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.last_commit_tag_exists }}
|
||||
common_ancestor_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.common_ancestor_commit_tag_exists }}
|
||||
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
build-and-publish:
|
||||
needs: [ changes, store_image_name_and_tags, all-tools-tag-only ]
|
||||
if: ${{ always() && (needs.changes.outputs.all-tools == 'true' || needs.all-tools-tag-only.result != 'success' || needs.all-tools-tag-only.outputs.image_tagged != 'true') }}
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
COMMIT_TAG: ${{ needs.store_image_name_and_tags.outputs.commit_tag }}
|
||||
DEVELOP_TAG: ${{ needs.store_image_name_and_tags.outputs.develop_tag }}
|
||||
IMAGE_NAME: ${{ env.DOCKER_IMAGE_NAME }}
|
||||
name: All tools build and push
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ssh-key: ${{ secrets.SELF_GITHUB_SSH_KEY }}
|
||||
submodules: true
|
||||
persist-credentials: false
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
# Note: Building arm* images on QEMU emulator can get extremely slow
|
||||
# when downloading large packages with npm / yarn. Arm* based docker
|
||||
# images are not necessarily needed as we run amd64 machines for most
|
||||
# cases. We can later set up self-hosted arm64 github runners if we
|
||||
# want arm* based images back.
|
||||
# - name: Set up QEMU
|
||||
# uses: docker/setup-qemu-action@v3
|
||||
# with:
|
||||
# platforms: 'arm64,arm'
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Show the "version" build argument
|
||||
run: |
|
||||
echo "We inject the commit tag in the docker image ${{ env.COMMIT_TAG }}"
|
||||
echo COMMIT_TAG=${{ env.COMMIT_TAG }} >> $GITHUB_ENV
|
||||
- name: Build and push all tools image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./operations/Dockerfile
|
||||
platforms: linux/amd64
|
||||
# Note: Build amd64 image only
|
||||
# platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: |
|
||||
${{ env.IMAGE_NAME }}:${{ env.COMMIT_TAG }}
|
||||
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
|
||||
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
|
||||
68
.github/workflows/bridge-ui-e2e-tests.yml
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
name: Run Bridge UI E2E Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'bridge-ui/**'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'bridge-ui/**'
|
||||
|
||||
jobs:
|
||||
run-e2e-tests:
|
||||
runs-on: ubuntu-22.04-16core
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Setup nodejs environment
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
with:
|
||||
node-version: 18.17.0
|
||||
pnpm-install-options: '--frozen-lockfile --prefer-offline'
|
||||
|
||||
- name: Install Playwright
|
||||
run: pnpm dlx playwright@1.45.3 install --with-deps
|
||||
|
||||
- name: Build Bridge UI
|
||||
run: pnpm run -F bridge-ui build;
|
||||
env:
|
||||
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.PUBLIC_WALLET_CONNECT_ID }}
|
||||
NEXT_PUBLIC_INFURA_ID: ${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}
|
||||
|
||||
- name: Install linux dependencies
|
||||
run: |
|
||||
sudo apt-get install --no-install-recommends -y xvfb
|
||||
|
||||
- name: Build synpress cache
|
||||
run: xvfb-run pnpm run -F bridge-ui build:cache
|
||||
env:
|
||||
E2E_TEST_PRIVATE_KEY: ${{ secrets.BRIDGE_UI_E2E_TESTS_PRIVATE_KEY }}
|
||||
E2E_TEST_SEED_PHRASE: "test test test test test test test test test test test junk"
|
||||
E2E_TEST_WALLET_PASSWORD: "TestPassword!"
|
||||
NEXT_PUBLIC_INFURA_ID: ${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}
|
||||
|
||||
- name: Run tests
|
||||
run: xvfb-run pnpm run -F bridge-ui test:e2e:headful
|
||||
env:
|
||||
CI: "true"
|
||||
E2E_TEST_PRIVATE_KEY: ${{ secrets.BRIDGE_UI_E2E_TESTS_PRIVATE_KEY }}
|
||||
E2E_TEST_SEED_PHRASE: "test test test test test test test test test test test junk"
|
||||
E2E_TEST_WALLET_PASSWORD: "TestPassword!"
|
||||
NEXT_PUBLIC_INFURA_ID: ${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}
|
||||
|
||||
- name: Archive Playwright report
|
||||
uses: actions/upload-artifact@v3
|
||||
if: failure()
|
||||
with:
|
||||
name: playwright-report-headful
|
||||
path: |
|
||||
bridge-ui/playwright-report-headful/
|
||||
if-no-files-found: error
|
||||
61
.github/workflows/bridge-ui-publish.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
name: Bridge UI Build and Publish
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'bridge-ui/**'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'bridge-ui/**'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get version from package.json
|
||||
id: package-version
|
||||
uses: martinbeentjes/npm-get-version-action@master
|
||||
with:
|
||||
path: ./bridge-ui
|
||||
|
||||
- name: Set Docker Tag
|
||||
id: docker-tag
|
||||
run: echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-bridge-ui-${{ steps.package-version.outputs.current-version }}" | tee $GITHUB_ENV
|
||||
|
||||
- name: Login to Docker Repository
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- # Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Docker Image Build and Publish
|
||||
id: docker-build-publish
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./bridge-ui/Dockerfile
|
||||
push: true
|
||||
tags: consensys/linea-bridge-ui:${{ env.DOCKER_TAG }}
|
||||
# Env file dedicated for dev
|
||||
build-args: |
|
||||
ENV_FILE=./bridge-ui/.env.production
|
||||
NEXT_PUBLIC_WALLET_CONNECT_ID=${{ secrets.PUBLIC_WALLET_CONNECT_ID }}
|
||||
NEXT_PUBLIC_INFURA_ID=${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}
|
||||
cache-from: type=registry,ref=consensys/linea-bridge-ui:buildcache
|
||||
cache-to: type=registry,ref=consensys/linea-bridge-ui:buildcache,mode=max
|
||||
env:
|
||||
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.PUBLIC_WALLET_CONNECT_ID }}
|
||||
NEXT_PUBLIC_INFURA_ID: ${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}
|
||||
98
.github/workflows/build-and-publish.yml
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
name: Docker build and publish
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
last_commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
common_ancestor_tag:
|
||||
required: true
|
||||
type: string
|
||||
develop_tag:
|
||||
required: true
|
||||
type: string
|
||||
untested_tag_suffix:
|
||||
required: true
|
||||
type: string
|
||||
coordinator_changed:
|
||||
required: true
|
||||
type: string
|
||||
postman_changed:
|
||||
required: true
|
||||
type: string
|
||||
prover_changed:
|
||||
required: true
|
||||
type: string
|
||||
traces_api_facade_changed:
|
||||
required: true
|
||||
type: string
|
||||
coordinator_image_tagged:
|
||||
required: true
|
||||
type: string
|
||||
prover_image_tagged:
|
||||
required: true
|
||||
type: string
|
||||
postman_image_tagged:
|
||||
required: true
|
||||
type: string
|
||||
traces_api_facade_image_tagged:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
coordinator:
|
||||
uses: ./.github/workflows/coordinator-build-and-publish.yml
|
||||
if: ${{ always() && (inputs.coordinator_changed == 'true' || inputs.coordinator_image_tagged != 'true') }}
|
||||
with:
|
||||
commit_tag: ${{ inputs.commit_tag }}
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
develop_tag: ${{ inputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ inputs.untested_tag_suffix }}
|
||||
image_name: consensys/linea-coordinator
|
||||
secrets: inherit
|
||||
|
||||
prover:
|
||||
uses: ./.github/workflows/prover-build-and-publish.yml
|
||||
if: ${{ always() && (inputs.prover_changed == 'true' || inputs.prover_image_tagged != 'true') }}
|
||||
with:
|
||||
commit_tag: ${{ inputs.commit_tag }}
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
develop_tag: ${{ inputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ inputs.untested_tag_suffix }}
|
||||
image_name: consensys/linea-prover
|
||||
secrets: inherit
|
||||
|
||||
postman:
|
||||
uses: ./.github/workflows/postman-build-and-publish.yml
|
||||
if: ${{ always() && (inputs.postman_changed == 'true' || inputs.postman_image_tagged != 'true') }}
|
||||
with:
|
||||
commit_tag: ${{ inputs.commit_tag }}
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
develop_tag: ${{ inputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ inputs.untested_tag_suffix }}
|
||||
image_name: consensys/linea-postman
|
||||
secrets: inherit
|
||||
|
||||
traces-api-facade:
|
||||
uses: ./.github/workflows/traces-api-facade-build-and-publish.yml
|
||||
if: ${{ always() && (inputs.traces_api_facade_changed == 'true' || inputs.traces_api_facade_image_tagged != 'true') }}
|
||||
with:
|
||||
commit_tag: ${{ inputs.commit_tag }}
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
develop_tag: ${{ inputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ inputs.untested_tag_suffix }}
|
||||
image_name: consensys/linea-traces-api-facade
|
||||
secrets: inherit
|
||||
61
.github/workflows/cache-docker-images.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
name: Cache Docker Images CI
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
name: Filter commit changes
|
||||
outputs:
|
||||
cache-images: ${{ steps.filter.outputs.cache-images }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Filter commit changes
|
||||
uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
base: ${{ github.ref }}
|
||||
list-files: "json"
|
||||
filters: |
|
||||
cache-images:
|
||||
- 'docker/compose.yml'
|
||||
- 'docker/compose-local-dev.overrides.yml'
|
||||
- 'docker/compose-local-dev-traces-v2.overrides.yml'
|
||||
|
||||
pull-and-cache-images:
|
||||
needs: [ changes ]
|
||||
if: ${{ always() && needs.changes.outputs.cache-images == 'true' }}
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Pull docker images from compose
|
||||
continue-on-error: true
|
||||
run: |
|
||||
docker compose -f docker/compose.yml -f docker/compose-local-dev-traces-v2.overrides.yml --profile l1 --profile l2 pull
|
||||
- name: Save Docker images
|
||||
run: |
|
||||
mkdir -p ~/docker-images
|
||||
images=$(docker compose -f docker/compose.yml -f docker/compose-local-dev-traces-v2.overrides.yml --profile l1 --profile l2 config | grep "image:" | awk '{print $2}')
|
||||
for image in $images; do
|
||||
imageFileName=$(echo $image | sed -e 's|.*/||' -e 's|:|-|' -e 's/\./_/g')
|
||||
echo $image - ${imageFileName}
|
||||
docker save $image > ~/docker-images/${imageFileName}.tar
|
||||
done
|
||||
- name: Cache common docker images
|
||||
continue-on-error: true
|
||||
uses: actions/cache/save@v4.0.2
|
||||
with:
|
||||
path: ~/docker-images
|
||||
key: cached-images
|
||||
77
.github/workflows/codeql.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'go', 'java-kotlin', 'javascript-typescript' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Use only 'java' to analyze code written in Java, Kotlin or both
|
||||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||
|
||||
# - run: |
|
||||
# echo "Run, Build Application using script"
|
||||
# ./location_of_script_within_repo/buildscript.sh
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
79
.github/workflows/coordinator-build-and-publish.yml
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
name: coordinator-build
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
last_commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
common_ancestor_tag:
|
||||
required: true
|
||||
type: string
|
||||
develop_tag:
|
||||
required: true
|
||||
type: string
|
||||
untested_tag_suffix:
|
||||
required: true
|
||||
type: string
|
||||
image_name:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-22.04
|
||||
name: Coordinator build
|
||||
env:
|
||||
COMMIT_TAG: ${{ inputs.commit_tag }}
|
||||
DEVELOP_TAG: ${{ inputs.develop_tag }}
|
||||
UNTESTED_TAG_SUFFIX: ${{ inputs.untested_tag_suffix }}
|
||||
IMAGE_NAME: ${{ inputs.image_name }}
|
||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
- name: Build dist
|
||||
run: |
|
||||
./gradlew coordinator:app:shadowJar --no-daemon
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to Docker Hub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Docker meta
|
||||
id: coordinator
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: ${{ env.IMAGE_NAME }}
|
||||
- name: Build & push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
build-contexts: jar=./coordinator/app/build/libs/
|
||||
file: ./coordinator/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.IMAGE_NAME }}:${{ env.COMMIT_TAG }}-${{ env.UNTESTED_TAG_SUFFIX }}
|
||||
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
|
||||
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
|
||||
98
.github/workflows/coordinator-testing.yml
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
name: coordinator-testing
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
cache-docker-images:
|
||||
uses: ./.github/workflows/cache-docker-images.yml
|
||||
secrets: inherit
|
||||
run-tests:
|
||||
env:
|
||||
COMMIT_TAG: ${{ inputs.commit_tag }}
|
||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
|
||||
runs-on: ubuntu-22.04
|
||||
name: Coordinator tests
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
- name: Restore cached images
|
||||
id: restore-cached-images
|
||||
uses: actions/cache/restore@v4.0.2
|
||||
with:
|
||||
path: ~/docker-images
|
||||
key: cached-images
|
||||
restore-keys: |
|
||||
cached-images
|
||||
# Install pnpm to compile smart contracts
|
||||
- name: Setup nodejs environment
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
with:
|
||||
pnpm-install-options: '--frozen-lockfile --prefer-offline --filter contracts --ignore-scripts'
|
||||
- name: Build coordinator and Unit tests
|
||||
run: |
|
||||
./gradlew -V coordinator:app:buildNeeded
|
||||
- name: Run integration tests
|
||||
run: |
|
||||
./gradlew integrationTest
|
||||
- name: Run Jacoco
|
||||
run: |
|
||||
./gradlew jacocoRootReport
|
||||
- name: Upload Jacoco test coverage report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: jacocoRootReport-${{ env.COMMIT_TAG }}.xml
|
||||
if-no-files-found: error
|
||||
path: |
|
||||
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
|
||||
- name: Setup .NET Core # Required to execute ReportGenerator
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
dotnet-quality: 'ga'
|
||||
- name: ReportGenerator
|
||||
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.4
|
||||
with:
|
||||
reports: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/*.xml'
|
||||
targetdir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
|
||||
reporttypes: MarkdownSummary
|
||||
historydir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
|
||||
title: 'Kotlin Code Coverage'
|
||||
- name: DeltaReportGenerator
|
||||
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.4
|
||||
with:
|
||||
reports: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/*.xml'
|
||||
targetdir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageDeltaReports'
|
||||
reporttypes: MarkdownDeltaSummary
|
||||
historydir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
|
||||
title: 'Kotlin Code Coverage'
|
||||
- name: Upload coverage report artifact
|
||||
id: upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: CoverageReport
|
||||
path: |
|
||||
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports
|
||||
- name: Write code coverage delta to PR
|
||||
uses: mshick/add-pr-comment@v2
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
message-path: |
|
||||
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageDeltaReports/DeltaSummary.md
|
||||
|
||||
|
||||
69
.github/workflows/load-test.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: Load Test Manual Action
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
network:
|
||||
description: 'Load test network'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- devnet
|
||||
- sepolia
|
||||
default: 'devnet'
|
||||
file:
|
||||
description: 'Load test filename'
|
||||
required: true
|
||||
type: string
|
||||
default: 'money-transfer.json'
|
||||
private_key_overwrite:
|
||||
description: 'Optional private key overwrite'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
concurrency:
|
||||
group: load-test-${{ github.event.inputs.network }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
run-load-test:
|
||||
runs-on: ubuntu-latest
|
||||
name: Run Load Test
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Hide sensitive inputs
|
||||
uses: levibostian/action-hide-sensitive-inputs@1.0.0
|
||||
with:
|
||||
exclude_inputs: network, file
|
||||
|
||||
- name: Determine Private Key
|
||||
id: set_private_key
|
||||
run: |
|
||||
if [ -n "${{ github.event.inputs.private_key_overwrite }}" ]; then
|
||||
echo "Using provided private key."
|
||||
echo "PRIVATE_KEY=${{ github.event.inputs.private_key_overwrite }}" >> $GITHUB_ENV
|
||||
elif [ "${{ github.event.inputs.network }}" == "devnet" ]; then
|
||||
echo "Using devnet private key from secrets."
|
||||
echo "PRIVATE_KEY=${{ secrets.DEVNET_LOAD_TEST_PRIVATE_KEY }}" >> $GITHUB_ENV
|
||||
elif [ "${{ github.event.inputs.network }}" == "sepolia" ]; then
|
||||
echo "Using sepolia private key from secrets."
|
||||
echo "PRIVATE_KEY=${{ secrets.SEPOLIA_LOAD_TEST_PRIVATE_KEY }}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Load Test
|
||||
run: |
|
||||
echo "Network to execute load test on: ${{ github.event.inputs.network }}"
|
||||
./gradlew :testing-tools:app:run --args="-request ${{ github.event.inputs.network }}/${{ github.event.inputs.file }} -pk $PRIVATE_KEY"
|
||||
157
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
name: main
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
store-image-name-and-tags:
|
||||
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml
|
||||
|
||||
filter-commit-changes:
|
||||
runs-on: ubuntu-latest
|
||||
name: Filter commit changes
|
||||
outputs:
|
||||
coordinator: ${{ steps.filter.outputs.coordinator }}
|
||||
postman: ${{ steps.filter.outputs.postman }}
|
||||
prover: ${{ steps.filter.outputs.prover }}
|
||||
traces-api-facade: ${{ steps.filter.outputs.traces-api-facade }}
|
||||
no-changes: ${{ steps.filter.outputs.coordinator == 'false' && steps.filter.outputs.postman == 'false' && steps.filter.outputs.prover == 'false' && steps.filter.outputs.traces-api-facade == 'false' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Filter commit changes
|
||||
uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
with:
|
||||
base: ${{ github.ref }}
|
||||
list-files: "json"
|
||||
filters: |
|
||||
coordinator:
|
||||
- 'coordinator/**'
|
||||
- 'testdata/**'
|
||||
- 'buildSrc/**'
|
||||
- 'jvm-libs/**'
|
||||
- 'prover/lib/compressor/**'
|
||||
- 'gradle/**'
|
||||
- 'build.gradle'
|
||||
- 'gradle.properties'
|
||||
- 'settings.gradle'
|
||||
- '.github/workflows/coordinator-*.yml'
|
||||
- '.github/workflows/build-and-publish.yml'
|
||||
- '.github/workflows/main.yml'
|
||||
- '.github/workflows/reuse-*.yml'
|
||||
- 'config/common/traces-limits-v1.toml'
|
||||
- 'config/common/traces-limits-v2.toml'
|
||||
- 'config/coordinator/**'
|
||||
- 'e2e/**'
|
||||
- 'contracts/abi/**'
|
||||
- 'contracts/contracts/**'
|
||||
- 'docker/compose.yml'
|
||||
- 'docker/compose-local-dev.overrides.yml'
|
||||
- 'docker/compose-local-dev-traces-v2.overrides.yml'
|
||||
postman:
|
||||
- 'sdk/**'
|
||||
- '.github/workflows/postman-*.yml'
|
||||
- '.github/workflows/build-and-publish.yml'
|
||||
- '.github/workflows/main.yml'
|
||||
- '.github/workflows/reuse-*.yml'
|
||||
prover:
|
||||
- 'prover/**'
|
||||
- '.github/workflows/prover-*.yml'
|
||||
- '.github/workflows/build-and-publish.yml'
|
||||
- '.github/workflows/main.yml'
|
||||
- '.github/workflows/reuse-*.yml'
|
||||
- 'constraints'
|
||||
traces-api-facade:
|
||||
- 'traces-api-facade/**'
|
||||
- 'jvm-libs/**'
|
||||
- 'config/common/traces-limits-v1.toml'
|
||||
- '.github/workflows/traces-api-facade-*.yml'
|
||||
- '.github/workflows/build-and-publish.yml'
|
||||
- '.github/workflows/main.yml'
|
||||
- '.github/workflows/reuse-*.yml'
|
||||
- 'buildSrc/**'
|
||||
- 'gradle/**'
|
||||
- 'build.gradle'
|
||||
- 'gradle.properties'
|
||||
- 'settings.gradle'
|
||||
|
||||
check-and-tag-images:
|
||||
needs: [ store-image-name-and-tags, filter-commit-changes ]
|
||||
uses: ./.github/workflows/reuse-check-images-tags-and-push.yml
|
||||
with:
|
||||
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
||||
last_commit_tag: ${{ needs.store-image-name-and-tags.outputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ needs.store-image-name-and-tags.outputs.common_ancestor_tag }}
|
||||
develop_tag: ${{ needs.store-image-name-and-tags.outputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
|
||||
coordinator_changed: ${{ needs.filter-commit-changes.outputs.coordinator }}
|
||||
postman_changed: ${{ needs.filter-commit-changes.outputs.postman }}
|
||||
prover_changed: ${{ needs.filter-commit-changes.outputs.prover }}
|
||||
traces_api_facade_changed: ${{ needs.filter-commit-changes.outputs.traces-api-facade }}
|
||||
secrets: inherit
|
||||
|
||||
docker-build:
|
||||
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
|
||||
uses: ./.github/workflows/build-and-publish.yml
|
||||
with:
|
||||
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
||||
last_commit_tag: ${{ needs.store-image-name-and-tags.outputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ needs.store-image-name-and-tags.outputs.common_ancestor_tag }}
|
||||
develop_tag: ${{ needs.store-image-name-and-tags.outputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
|
||||
coordinator_changed: ${{ needs.filter-commit-changes.outputs.coordinator }}
|
||||
postman_changed: ${{ needs.filter-commit-changes.outputs.postman }}
|
||||
prover_changed: ${{ needs.filter-commit-changes.outputs.prover }}
|
||||
traces_api_facade_changed: ${{ needs.filter-commit-changes.outputs.traces-api-facade }}
|
||||
coordinator_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_coordinator }}
|
||||
postman_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_postman }}
|
||||
prover_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_prover }}
|
||||
traces_api_facade_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_traces_api_facade }}
|
||||
secrets: inherit
|
||||
|
||||
testing:
|
||||
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
|
||||
if: ${{ always() && needs.filter-commit-changes.outputs.no-changes == 'false' }}
|
||||
uses: ./.github/workflows/testing.yml
|
||||
with:
|
||||
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
||||
coordinator_changed: ${{ needs.filter-commit-changes.outputs.coordinator }}
|
||||
postman_changed: ${{ needs.filter-commit-changes.outputs.postman }}
|
||||
prover_changed: ${{ needs.filter-commit-changes.outputs.prover }}
|
||||
coordinator_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_coordinator }}
|
||||
postman_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_postman }}
|
||||
secrets: inherit
|
||||
|
||||
run-e2e-tests-geth-tracing:
|
||||
needs: [ store-image-name-and-tags, docker-build ]
|
||||
if: ${{ always() && needs.docker-build.result == 'success' }}
|
||||
uses: ./.github/workflows/reuse-run-e2e-tests.yml
|
||||
with:
|
||||
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
||||
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
|
||||
tracing-engine: 'geth'
|
||||
e2e-tests-logs-dump: true
|
||||
secrets: inherit
|
||||
|
||||
run-e2e-tests:
|
||||
needs: [ store-image-name-and-tags, docker-build ]
|
||||
if: ${{ always() && needs.docker-build.result == 'success' }}
|
||||
uses: ./.github/workflows/reuse-run-e2e-tests.yml
|
||||
with:
|
||||
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
||||
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
|
||||
tracing-engine: 'besu'
|
||||
e2e-tests-logs-dump: true
|
||||
secrets: inherit
|
||||
|
||||
tag-after-run-tests-success:
|
||||
needs: [ store-image-name-and-tags, testing, run-e2e-tests, run-e2e-tests-geth-tracing ]
|
||||
if: ${{ always() && needs.testing.result == 'success' && needs.run-e2e-tests.outputs.tests_outcome == 'success' && needs.run-e2e-tests-geth-tracing.outputs.tests_outcome == 'success' }}
|
||||
uses: ./.github/workflows/reuse-tag-without-untested-suffix.yml
|
||||
with:
|
||||
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
||||
develop_tag: ${{ needs.store-image-name-and-tags.outputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
|
||||
image_names: '["consensys/linea-coordinator", "consensys/linea-postman", "consensys/linea-prover", "consensys/linea-traces-api-facade"]'
|
||||
secrets: inherit
|
||||
80
.github/workflows/maven-release.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
name: Maven Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
libToRelease:
|
||||
required: true
|
||||
type: choice
|
||||
description: 'Library to release, e.g :jvm-libs:blob-compressor'
|
||||
options:
|
||||
- ':jvm-libs:blob-compressor'
|
||||
- ':jvm-libs:blob-shnarf-calculator'
|
||||
- ':jvm-libs:linea-contracts:l1-rollup'
|
||||
- ':jvm-libs:linea-contracts:l2-message-service'
|
||||
version:
|
||||
required: true
|
||||
type: string
|
||||
description: 'Release semantic version: e.g "1.0.0"'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
|
||||
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
|
||||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Clean
|
||||
# ./gradlew clean is necessary because the build is cached
|
||||
# and cause issues with JReleaser
|
||||
run: ./gradlew clean
|
||||
|
||||
- name: Build
|
||||
# ./gradlew clean is necessary because the build is cached
|
||||
# and cause issues with JReleaser
|
||||
run: ./gradlew ${{github.event.inputs.libToRelease}}:build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
|
||||
|
||||
- name: Deploy to Local File System
|
||||
run: ./gradlew ${{github.event.inputs.libToRelease}}:publish -Pversion=${{github.event.inputs.version}}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
|
||||
|
||||
|
||||
- name: Build and Release to Maven Central
|
||||
# ./gradlew clean is necessary because the build is cached
|
||||
# and cause issues with JReleaser
|
||||
run: ./gradlew --stacktrace ${{github.event.inputs.libToRelease}}:jreleaserRelease -Pversion=${{github.event.inputs.version}}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
|
||||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
JRELEASER_GITHUB_USERNAME: ${{ github.actor }}
|
||||
JRELEASER_GITHUB_EMAIL: ${{ github.actor }}@users.noreply.github.com
|
||||
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
|
||||
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
|
||||
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
|
||||
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
|
||||
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.JRELEASER_MAVENCENTRAL_PASSWORD }}
|
||||
|
||||
# Persist logs
|
||||
- name: JReleaser release output
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: jreleaser-release
|
||||
path: |
|
||||
build/jreleaser/trace.log
|
||||
build/jreleaser/output.properties
|
||||
74
.github/workflows/postman-build-and-publish.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
name: postman-build
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
last_commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
common_ancestor_tag:
|
||||
required: true
|
||||
type: string
|
||||
develop_tag:
|
||||
required: true
|
||||
type: string
|
||||
untested_tag_suffix:
|
||||
required: true
|
||||
type: string
|
||||
image_name:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-22.04
|
||||
name: Postman build
|
||||
env:
|
||||
COMMIT_TAG: ${{ inputs.commit_tag }}
|
||||
DEVELOP_TAG: ${{ inputs.develop_tag }}
|
||||
UNTESTED_TAG_SUFFIX: ${{ inputs.untested_tag_suffix }}
|
||||
IMAGE_NAME: ${{ inputs.image_name }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ssh-key: ${{ secrets.SELF_GITHUB_SSH_KEY }}
|
||||
submodules: true
|
||||
persist-credentials: false
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
with:
|
||||
platforms: 'arm64,arm'
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Show the "version" build argument
|
||||
run: |
|
||||
echo "We inject the commit tag in the docker image ${{ env.COMMIT_TAG }}"
|
||||
echo COMMIT_TAG=${{ env.COMMIT_TAG }} >> $GITHUB_ENV
|
||||
- name: Build and push postman image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./
|
||||
file: ./sdk/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.IMAGE_NAME }}:${{ env.COMMIT_TAG }}-${{ env.UNTESTED_TAG_SUFFIX }}
|
||||
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
|
||||
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
|
||||
build-args: |
|
||||
GITHUB_API_ACCESS_TOKEN=${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
|
||||
NATIVE_LIBS_RELEASE_TAG=blob-libs-v1.0.1
|
||||
32
.github/workflows/postman-testing.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: postman-and-SDK-testing
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
runs-on: ubuntu-22.04
|
||||
name: Postman & SDK tests
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Setup nodejs environment
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
|
||||
- name: Run tests and generate coverage report
|
||||
env:
|
||||
GITHUB_API_ACCESS_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
|
||||
NATIVE_LIBS_RELEASE_TAG: blob-libs-v1.0.1
|
||||
run: |
|
||||
pnpm run -F ./ts-libs/linea-native-libs build;
|
||||
pnpm run -F ./sdk build;
|
||||
pnpm run -F ./sdk test;
|
||||
76
.github/workflows/prover-build-and-publish.yml
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
name: Prover build and publish CI
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
last_commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
common_ancestor_tag:
|
||||
required: true
|
||||
type: string
|
||||
develop_tag:
|
||||
required: true
|
||||
type: string
|
||||
untested_tag_suffix:
|
||||
required: true
|
||||
type: string
|
||||
image_name:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
env:
|
||||
GOPROXY: "https://proxy.golang.org"
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
name: Prover build
|
||||
env:
|
||||
COMMIT_TAG: ${{ inputs.commit_tag }}
|
||||
DEVELOP_TAG: ${{ inputs.develop_tag }}
|
||||
UNTESTED_TAG_SUFFIX: ${{ inputs.untested_tag_suffix }}
|
||||
IMAGE_NAME: ${{ inputs.image_name }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ssh-key: ${{ secrets.SELF_GITHUB_SSH_KEY }}
|
||||
submodules: true
|
||||
persist-credentials: false
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Show the "version" build argument
|
||||
run: |
|
||||
echo "We inject the commit tag in the docker image ${{ env.COMMIT_TAG }}"
|
||||
echo COMMIT_TAG=${{ env.COMMIT_TAG }} >> $GITHUB_ENV
|
||||
- name: Build and push prover image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./prover/Dockerfile
|
||||
build-args: |
|
||||
RUSTFLAGS="-C target-cpu=x86-64-v3"
|
||||
build-contexts: |
|
||||
prover=prover/
|
||||
corset=corset/
|
||||
constraints=constraints/
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.IMAGE_NAME }}:${{ env.COMMIT_TAG }}-${{ env.UNTESTED_TAG_SUFFIX }}
|
||||
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
|
||||
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
|
||||
127
.github/workflows/prover-native-lib-blob-compressor-release.yml
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
name: Release Blob Compressor binaries
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version (e.g. v1.2.3)'
|
||||
required: true
|
||||
default: 'v0.0.0'
|
||||
draft-release:
|
||||
description: 'Draft Release'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
pre-release:
|
||||
description: 'Pre Release'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
|
||||
- name: Build the linux artefacts
|
||||
env:
|
||||
CGO_ENABLED: 1
|
||||
GOOS: "linux"
|
||||
VERSION: ${{ github.event.inputs.version }}
|
||||
SRC_SHNARF: "./lib/shnarf_calculator/shnarf_calculator.go"
|
||||
TARGET_SHNARF: "shnarf_calculator"
|
||||
SRC_COMPRESSOR: "./lib/compressor/libcompressor.go"
|
||||
TARGET_COMPRESSOR: "blob_compressor"
|
||||
run: |
|
||||
cd prover
|
||||
mkdir target
|
||||
GOARCH="amd64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_SHNARF}_${VERSION}_linux_x86_64.so ${SRC_SHNARF}
|
||||
GOARCH="amd64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_COMPRESSOR}_${VERSION}_linux_x86_64.so ${SRC_COMPRESSOR}
|
||||
|
||||
- name: Cache built binaries
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: linux-artefacts
|
||||
path: ./prover/target
|
||||
|
||||
build-mac-os:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
- name: Build the MacOS artefacts
|
||||
env:
|
||||
CGO_ENABLED: 1
|
||||
GOOS: "darwin"
|
||||
VERSION: ${{ github.event.inputs.version }}
|
||||
SRC_SHNARF: "./lib/shnarf_calculator/shnarf_calculator.go"
|
||||
TARGET_SHNARF: "shnarf_calculator"
|
||||
SRC_COMPRESSOR: "./lib/compressor/libcompressor.go"
|
||||
TARGET_COMPRESSOR: "blob_compressor"
|
||||
run: |
|
||||
cd prover
|
||||
mkdir target
|
||||
GOARCH="amd64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_SHNARF}_${VERSION}_darwin_x86_64.dylib ${SRC_SHNARF}
|
||||
GOARCH="arm64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_SHNARF}_${VERSION}_darwin_arm64.dylib ${SRC_SHNARF}
|
||||
GOARCH="amd64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_COMPRESSOR}_${VERSION}_darwin_x86_64.dylib ${SRC_COMPRESSOR}
|
||||
GOARCH="arm64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_COMPRESSOR}_${VERSION}_darwin_arm64.dylib ${SRC_COMPRESSOR}
|
||||
|
||||
- name: Cache built binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: darwin-artefacts
|
||||
path: ./prover/target
|
||||
|
||||
release_artefacts:
|
||||
name: Release artefacts
|
||||
needs: [ build-linux, build-mac-os]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Load cached binaries
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
merge-multiple: true
|
||||
- name: List artifacts
|
||||
run: |
|
||||
ls -la ./
|
||||
- name: Zip the release files
|
||||
run: |
|
||||
zip -r linea-blob-libs-${{ github.event.inputs.version }}.zip .
|
||||
- name: Get current date
|
||||
id: current_date
|
||||
run: echo "::set-output name=date::$(date --utc +'%Y-%m-%dT%H:%M:%SZ')"
|
||||
shell: bash
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: blob-libs-${{ github.event.inputs.version }}
|
||||
release_name: Blob libs ${{ github.event.inputs.version }}
|
||||
draft: ${{ github.event.inputs.draft-release }}
|
||||
prerelease: ${{ github.event.inputs.pre-release }}
|
||||
body: |
|
||||
Go lang blob binaries ${{ github.event.inputs.version }}
|
||||
commit: ${{ github.sha }}
|
||||
date: ${{ steps.current_date.outputs.date }}
|
||||
- name: Upload Release Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./linea-blob-libs-${{ github.event.inputs.version }}.zip
|
||||
asset_name: linea-blob-libs-${{ github.event.inputs.version }}.zip
|
||||
asset_content_type: application/zip
|
||||
138
.github/workflows/prover-testing.yml
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
name: Prover testing CI
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
SLACK_WEBHOOK_CI_PROVER_FAIL:
|
||||
required: true
|
||||
SLACK_WEBHOOK_CI_PROVER_SUCCESS:
|
||||
required: true
|
||||
|
||||
env:
|
||||
GOPROXY: "https://proxy.golang.org"
|
||||
|
||||
jobs:
|
||||
staticcheck:
|
||||
runs-on: ubuntu-latest
|
||||
name: Prover static check
|
||||
steps:
|
||||
- name: install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/go-build
|
||||
~/Library/Caches/go-build
|
||||
%LocalAppData%\go-build
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
- name: gofmt
|
||||
working-directory: prover
|
||||
run: if [[ -n $(gofmt -l .) ]]; then echo "please run gofmt"; exit 1; fi
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
working-directory: prover
|
||||
args: --timeout=5m
|
||||
- name: generated files should not be modified
|
||||
working-directory: prover
|
||||
run: |
|
||||
go generate ./...
|
||||
git update-index --assume-unchanged go.mod
|
||||
git update-index --assume-unchanged go.sum
|
||||
if [[ -n $(git status --porcelain) ]]; then echo "git repo is dirty after running go generate -- please don't modify generated files"; echo $(git diff);echo $(git status --porcelain); exit 1; fi
|
||||
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Prover testing
|
||||
needs:
|
||||
- staticcheck
|
||||
steps:
|
||||
- name: install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/go-build
|
||||
~/Library/Caches/go-build
|
||||
%LocalAppData%\go-build
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
- name: Test compressor
|
||||
working-directory: prover/lib/compressor/blob
|
||||
run: |
|
||||
go test -tags=nocorset ./...
|
||||
- name: Test
|
||||
working-directory: prover
|
||||
run: |
|
||||
go test -p=1 -tags=nocorset,fuzzlight -timeout=30m ./...
|
||||
- name: Test (32 bits & race)
|
||||
working-directory: prover
|
||||
if: (matrix.os == 'ubuntu-latest') && (matrix.go-version == '1.20.x')
|
||||
run: |
|
||||
go test -p=1 -tags=nocorset,fuzzlight -timeout=30m -short -race ./...
|
||||
|
||||
slack-workflow-status-failed:
|
||||
if: failure()
|
||||
name: Prover notify slack
|
||||
needs:
|
||||
- staticcheck
|
||||
- test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Notify slack -- workflow failed
|
||||
id: slack
|
||||
uses: slackapi/slack-github-action@v1.23.0
|
||||
with:
|
||||
payload: |
|
||||
{
|
||||
"actor": "${{ github.actor }}",
|
||||
"repo": "${{ github.repository }}",
|
||||
"status": "FAIL",
|
||||
"title": "${{ github.event.pull_request.title }}",
|
||||
"pr": "${{ github.event.pull_request.head.ref }}"
|
||||
}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_CI_PROVER_FAIL }}
|
||||
|
||||
slack-workflow-status-success:
|
||||
if: success()
|
||||
name: Prover notify slack
|
||||
needs:
|
||||
- staticcheck
|
||||
- test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Notify slack -- workflow succeeded
|
||||
id: slack
|
||||
uses: slackapi/slack-github-action@v1.23.0
|
||||
with:
|
||||
payload: |
|
||||
{
|
||||
"actor": "${{ github.actor }}",
|
||||
"repo": "${{ github.repository }}",
|
||||
"status": "SUCCESS",
|
||||
"title": "${{ github.event.pull_request.title }}",
|
||||
"pr": "${{ github.event.pull_request.head.ref }}"
|
||||
}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_CI_PROVER_SUCCESS }}
|
||||
|
||||
183
.github/workflows/reuse-check-images-tags-and-push.yml
vendored
Normal file
@@ -0,0 +1,183 @@
|
||||
name: Reusable check images tags and push
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
last_commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
common_ancestor_tag:
|
||||
required: true
|
||||
type: string
|
||||
develop_tag:
|
||||
required: true
|
||||
type: string
|
||||
untested_tag_suffix:
|
||||
required: true
|
||||
type: string
|
||||
coordinator_changed:
|
||||
required: true
|
||||
type: string
|
||||
postman_changed:
|
||||
required: true
|
||||
type: string
|
||||
prover_changed:
|
||||
required: true
|
||||
type: string
|
||||
traces_api_facade_changed:
|
||||
required: true
|
||||
type: string
|
||||
outputs:
|
||||
image_tagged_coordinator:
|
||||
value: ${{ jobs.image_tag_push.outputs.image_tagged_coordinator }}
|
||||
image_tagged_prover:
|
||||
value: ${{ jobs.image_tag_push.outputs.image_tagged_prover }}
|
||||
image_tagged_postman:
|
||||
value: ${{ jobs.image_tag_push.outputs.image_tagged_postman }}
|
||||
image_tagged_traces_api_facade:
|
||||
value: ${{ jobs.image_tag_push.outputs.image_tagged_traces_api_facade }}
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
check_image_tags_exist:
|
||||
runs-on: ubuntu-latest
|
||||
name: Check image tags exist
|
||||
outputs:
|
||||
last_commit_tag_exists_coordinator: ${{ steps.check_image_tags_exist_coordinator.outputs.last_commit_tag_exists }}
|
||||
common_ancestor_commit_tag_exists_coordinator: ${{ steps.check_image_tags_exist_coordinator.outputs.common_ancestor_commit_tag_exists }}
|
||||
last_commit_tag_exists_postman: ${{ steps.check_image_tags_exist_postman.outputs.last_commit_tag_exists }}
|
||||
common_ancestor_commit_tag_exists_postman: ${{ steps.check_image_tags_exist_postman.outputs.common_ancestor_commit_tag_exists }}
|
||||
last_commit_tag_exists_prover: ${{ steps.check_image_tags_exist_prover.outputs.last_commit_tag_exists }}
|
||||
common_ancestor_commit_tag_exists_prover: ${{ steps.check_image_tags_exist_prover.outputs.common_ancestor_commit_tag_exists }}
|
||||
last_commit_tag_exists_traces_api_facade: ${{ steps.check_image_tags_exist_traces_api_facade.outputs.last_commit_tag_exists }}
|
||||
common_ancestor_commit_tag_exists_traces_api_facade: ${{ steps.check_image_tags_exist_traces_api_facade.outputs.common_ancestor_commit_tag_exists }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check image tags exist for coordinator
|
||||
uses: ./.github/actions/check-image-tags-exist
|
||||
if: ${{ inputs.coordinator_changed == 'false' }}
|
||||
id: check_image_tags_exist_coordinator
|
||||
with:
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
image_name: consensys/linea-coordinator
|
||||
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Check image tags exist for postman
|
||||
uses: ./.github/actions/check-image-tags-exist
|
||||
if: ${{ inputs.postman_changed == 'false' }}
|
||||
id: check_image_tags_exist_postman
|
||||
with:
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
image_name: consensys/linea-postman
|
||||
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Check image tags exist for prover
|
||||
uses: ./.github/actions/check-image-tags-exist
|
||||
if: ${{ inputs.prover_changed == 'false' }}
|
||||
id: check_image_tags_exist_prover
|
||||
with:
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
image_name: consensys/linea-prover
|
||||
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Check image tags exist for traces-api-facade
|
||||
uses: ./.github/actions/check-image-tags-exist
|
||||
if: ${{ inputs.traces_api_facade_changed == 'false' }}
|
||||
id: check_image_tags_exist_traces_api_facade
|
||||
with:
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
image_name: consensys/linea-traces-api-facade
|
||||
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
image_tag_push:
|
||||
runs-on: ubuntu-latest
|
||||
name: Tag and push images
|
||||
needs: [ check_image_tags_exist ]
|
||||
outputs:
|
||||
image_tagged_coordinator: ${{ steps.image_tag_push_coordinator.outputs.image_tagged }}
|
||||
image_tagged_prover: ${{ steps.image_tag_push_prover.outputs.image_tagged }}
|
||||
image_tagged_postman: ${{ steps.image_tag_push_postman.outputs.image_tagged }}
|
||||
image_tagged_traces_api_facade: ${{ steps.image_tag_push_traces_api_facade.outputs.image_tagged }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Tag and push coordinator image
|
||||
id: image_tag_push_coordinator
|
||||
uses: ./.github/actions/image-tag-and-push
|
||||
if: ${{ inputs.coordinator_changed == 'false' }}
|
||||
with:
|
||||
commit_tag: ${{ inputs.commit_tag }}
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
develop_tag: ${{ inputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ inputs.untested_tag_suffix }}
|
||||
image_name: consensys/linea-coordinator
|
||||
last_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.last_commit_tag_exists_coordinator }}
|
||||
common_ancestor_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.common_ancestor_commit_tag_exists_coordinator }}
|
||||
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Tag and push postman image
|
||||
id: image_tag_push_postman
|
||||
uses: ./.github/actions/image-tag-and-push
|
||||
if: ${{ inputs.postman_changed == 'false' }}
|
||||
with:
|
||||
commit_tag: ${{ inputs.commit_tag }}
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
develop_tag: ${{ inputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ inputs.untested_tag_suffix }}
|
||||
image_name: consensys/linea-postman
|
||||
last_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.last_commit_tag_exists_postman }}
|
||||
common_ancestor_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.common_ancestor_commit_tag_exists_postman }}
|
||||
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Tag and push prover image
|
||||
id: image_tag_push_prover
|
||||
uses: ./.github/actions/image-tag-and-push
|
||||
if: ${{ inputs.prover_changed == 'false' }}
|
||||
with:
|
||||
commit_tag: ${{ inputs.commit_tag }}
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
develop_tag: ${{ inputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ inputs.untested_tag_suffix }}
|
||||
image_name: consensys/linea-prover
|
||||
last_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.last_commit_tag_exists_prover }}
|
||||
common_ancestor_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.common_ancestor_commit_tag_exists_prover }}
|
||||
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Tag and push traces api facade image
|
||||
id: image_tag_push_traces_api_facade
|
||||
uses: ./.github/actions/image-tag-and-push
|
||||
if: ${{ inputs.traces_api_facade_changed == 'false' }}
|
||||
with:
|
||||
commit_tag: ${{ inputs.commit_tag }}
|
||||
last_commit_tag: ${{ inputs.last_commit_tag }}
|
||||
common_ancestor_tag: ${{ inputs.common_ancestor_tag }}
|
||||
develop_tag: ${{ inputs.develop_tag }}
|
||||
untested_tag_suffix: ${{ inputs.untested_tag_suffix }}
|
||||
image_name: consensys/linea-traces-api-facade
|
||||
last_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.last_commit_tag_exists_traces_api_facade }}
|
||||
common_ancestor_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.common_ancestor_commit_tag_exists_traces_api_facade }}
|
||||
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
175
.github/workflows/reuse-run-e2e-tests.yml
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
name: Reusable run e2e tests
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
commit_tag:
|
||||
description: 'The commit tag to use'
|
||||
required: true
|
||||
type: string
|
||||
untested_tag_suffix:
|
||||
description: 'The untested tag suffix to use'
|
||||
required: true
|
||||
type: string
|
||||
tracing-engine:
|
||||
description: Variable option for running tests against [besu] or [geth] stack
|
||||
required: true
|
||||
type: string
|
||||
e2e-tests-with-ssh:
|
||||
description: Run end to end tests with ability to ssh into environment
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
e2e-tests-logs-dump:
|
||||
description: Dump logs after running end to end tests
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
e2e-tests-containers-list:
|
||||
description: List containers before starting end to end tests
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
workflow_call:
|
||||
inputs:
|
||||
commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
untested_tag_suffix:
|
||||
required: true
|
||||
type: string
|
||||
tracing-engine:
|
||||
description: Variable option for running tests against [besu] or [geth] stack
|
||||
required: true
|
||||
type: string
|
||||
e2e-tests-with-ssh:
|
||||
description: Run end to end tests with ability to ssh into environment
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
e2e-tests-logs-dump:
|
||||
description: Dump logs after running end to end tests
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
e2e-tests-containers-list:
|
||||
description: List containers before starting end to end tests
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
outputs:
|
||||
tests_outcome:
|
||||
value: ${{ jobs.run-e2e-tests.outputs.tests_outcome }}
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
run-e2e-tests:
|
||||
env:
|
||||
COORDINATOR_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
|
||||
POSTMAN_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
|
||||
PROVER_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
|
||||
TRACES_API_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
|
||||
outputs:
|
||||
tests_outcome: ${{ steps.run_e2e_tests.outcome }}
|
||||
runs-on: ubuntu-22.04-16core
|
||||
steps:
|
||||
- name: Setup upterm session
|
||||
if: ${{ inputs.e2e-tests-with-ssh }}
|
||||
uses: lhotari/action-upterm@v1
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup nodejs environment
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
with:
|
||||
pnpm-install-options: '--frozen-lockfile --prefer-offline'
|
||||
- name: Login to Docker Hub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Setup Shomei directories
|
||||
run: |
|
||||
mkdir -p ../tmp/zkbesu-shomei/plugins/
|
||||
mkdir -p ../tmp/local/shomei/
|
||||
mkdir -p ../tmp/local/shomei-frontend/
|
||||
- name: Restore cached images
|
||||
id: restore-cached-images
|
||||
uses: actions/cache/restore@v4.0.2
|
||||
with:
|
||||
path: ~/docker-images
|
||||
key: cached-images
|
||||
restore-keys: |
|
||||
cached-
|
||||
- name: Pull all images with retry
|
||||
uses: nick-fields/retry@v2
|
||||
with:
|
||||
max_attempts: 10
|
||||
retry_on: error
|
||||
retry_wait_seconds: 30
|
||||
timeout_minutes: 10
|
||||
command: |
|
||||
make pull-all-images
|
||||
- name: Spin up fresh environment with geth tracing with retry
|
||||
if: ${{ inputs.tracing-engine == 'geth' }}
|
||||
uses: nick-fields/retry@v2
|
||||
with:
|
||||
max_attempts: 10
|
||||
retry_on: error
|
||||
retry_wait_seconds: 30
|
||||
timeout_minutes: 10
|
||||
command: |
|
||||
make start-all
|
||||
on_retry_command: |
|
||||
make clean-environment
|
||||
- name: Spin up fresh environment with besu tracing with retry
|
||||
if: ${{ inputs.tracing-engine == 'besu' }}
|
||||
uses: nick-fields/retry@v2
|
||||
with:
|
||||
max_attempts: 10
|
||||
retry_on: error
|
||||
retry_wait_seconds: 30
|
||||
timeout_minutes: 10
|
||||
command: |
|
||||
make start-all-traces-v2
|
||||
on_retry_command: |
|
||||
make clean-environment
|
||||
- name: List docker containers/images
|
||||
if: ${{ always() && inputs.e2e-tests-containers-list }}
|
||||
continue-on-error: true
|
||||
run: |
|
||||
docker ps -la && docker images
|
||||
docker container ls -a
|
||||
- name: Run e2e tests
|
||||
id: run_e2e_tests
|
||||
run: |
|
||||
pnpm run -F e2e test:e2e:local
|
||||
- name: Show e2e tests result
|
||||
if: always()
|
||||
run: |
|
||||
echo "E2E_TESTS_RESULT: ${{ steps.run_e2e_tests.outcome }}"
|
||||
- name: Dump logs
|
||||
if: ${{ failure() && inputs.e2e-tests-logs-dump }}
|
||||
run: |
|
||||
mkdir -p docker_logs
|
||||
docker ps -a >> docker_logs/docker_ps.txt
|
||||
docker logs prover --since 1h &>> docker_logs/prover.txt
|
||||
docker logs prover-v3 --since 1h &>> docker_logs/prover-v3.txt
|
||||
docker logs coordinator --since 1h &>> docker_logs/coordinator.txt
|
||||
docker logs shomei --since 1h &>> docker_logs/shomei.txt
|
||||
docker logs zkbesu-shomei --since 1h &>> docker_logs/zkbesu-shomei.txt
|
||||
docker logs shomei-frontend --since 1h &>> docker_logs/shomei-frontend.txt
|
||||
docker logs postman --since 1h &>> docker_logs/postman.txt
|
||||
docker logs traces-node --since 1h &>> docker_logs/traces-node.txt
|
||||
docker logs traces-node-v2 --since 1h &>> docker_logs/traces-node-v2.txt
|
||||
- name: Archive debug logs
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ failure() && inputs.e2e-tests-logs-dump }}
|
||||
with:
|
||||
name: end-2-end-debug-logs
|
||||
if-no-files-found: error
|
||||
path: |
|
||||
docker_logs/**/*
|
||||
53
.github/workflows/reuse-store-image-name-and-tags.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Reusable store image name and tags
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
commit_tag:
|
||||
value: ${{ jobs.store_image_name_and_tags.outputs.commit_tag }}
|
||||
last_commit_tag:
|
||||
value: ${{ jobs.store_image_name_and_tags.outputs.last_commit_tag }}
|
||||
develop_tag:
|
||||
value: ${{ jobs.store_image_name_and_tags.outputs.develop_tag }}
|
||||
common_ancestor_tag:
|
||||
value: ${{ jobs.store_image_name_and_tags.outputs.common_ancestor_tag }}
|
||||
untested_tag_suffix:
|
||||
value: ${{ jobs.store_image_name_and_tags.outputs.untested_tag_suffix }}
|
||||
|
||||
jobs:
|
||||
store_image_name_and_tags:
|
||||
runs-on: ubuntu-latest
|
||||
name: Compute version tags
|
||||
env:
|
||||
# REF_NAME: ${{ github.ref_name }}
|
||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
EVENT_BEFORE: ${{ github.event.before }}
|
||||
outputs:
|
||||
commit_tag: ${{ steps.step2.outputs.COMMIT_TAG }}
|
||||
last_commit_tag: ${{ steps.step2.outputs.LAST_COMMIT_TAG }}
|
||||
common_ancestor_tag: ${{ steps.step2.outputs.COMMON_ANCESTOR_TAG }}
|
||||
develop_tag: ${{ steps.step2.outputs.DEVELOP_TAG }}
|
||||
untested_tag_suffix: ${{ steps.step2.outputs.UNTESTED_TAG_SUFFIX }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Get common ancestor commit
|
||||
id: step1
|
||||
run: |
|
||||
git fetch --no-tags --depth=100 origin main ${{ env.BRANCH_NAME }}
|
||||
echo COMMON_ANCESTOR=$(git merge-base refs/remotes/origin/main refs/remotes/origin/${{ env.BRANCH_NAME }}) >> $GITHUB_ENV
|
||||
- name: Compute version tags
|
||||
id: step2
|
||||
run: |
|
||||
echo COMMIT_TAG=$(git rev-parse --short "$GITHUB_SHA") >> $GITHUB_OUTPUT
|
||||
echo LAST_COMMIT_TAG=$(git rev-parse --short "${{ env.EVENT_BEFORE }}") >> $GITHUB_OUTPUT
|
||||
echo DEVELOP_TAG=develop >> $GITHUB_OUTPUT
|
||||
echo COMMON_ANCESTOR_TAG=$(git rev-parse --short "${{ env.COMMON_ANCESTOR }}") >> $GITHUB_OUTPUT
|
||||
echo UNTESTED_TAG_SUFFIX=untested >> $GITHUB_OUTPUT
|
||||
- name: Show version tags
|
||||
id: step3
|
||||
run: |
|
||||
echo "COMMIT_TAG: ${{ steps.step2.outputs.COMMIT_TAG }}"
|
||||
echo "LAST_COMMIT_TAG: ${{ steps.step2.outputs.LAST_COMMIT_TAG }}"
|
||||
echo "DEVELOP_TAG: ${{ steps.step2.outputs.DEVELOP_TAG }}"
|
||||
echo "COMMON_ANCESTOR_TAG: ${{ steps.step2.outputs.COMMON_ANCESTOR_TAG }}"
|
||||
echo "UNTESTED_TAG_SUFFIX: ${{ steps.step2.outputs.UNTESTED_TAG_SUFFIX }}"
|
||||
43
.github/workflows/reuse-tag-without-untested-suffix.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Reusable tag without untested suffix
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
develop_tag:
|
||||
required: true
|
||||
type: string
|
||||
untested_tag_suffix:
|
||||
required: true
|
||||
type: string
|
||||
image_names:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
tag-without-untested-suffix:
|
||||
runs-on: ubuntu-latest
|
||||
name: tag without untested suffix
|
||||
strategy:
|
||||
matrix:
|
||||
image_name: ${{ fromJSON(inputs.image_names) }}
|
||||
steps:
|
||||
- name: Login to Docker Hub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Tag Docker image with develop if on main branch
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: |
|
||||
docker buildx imagetools create --tag ${{ matrix.image_name }}:${{ inputs.develop_tag }} ${{ matrix.image_name }}:${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
|
||||
- name: Tag Docker image with the commit hash (without the "untested" suffix)
|
||||
run: |
|
||||
docker buildx imagetools create --tag ${{ matrix.image_name }}:${{ inputs.commit_tag }} ${{ matrix.image_name }}:${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
|
||||
45
.github/workflows/run-smc-tests.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Smart contracts test
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'contracts/**'
|
||||
- 'testdata/**'
|
||||
- 'prover/**'
|
||||
|
||||
jobs:
|
||||
run-contract-tests:
|
||||
runs-on: ubuntu-latest
|
||||
name: Run smart contracts tests
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Setup nodejs environment
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
|
||||
- name: Check JS formatting
|
||||
run: pnpm -F contracts run lint:ts
|
||||
|
||||
- name: Compile kzg.node
|
||||
run: npx node-gyp --directory=contracts/node_modules/c-kzg rebuild # explicitly running rebuild to get the .node file
|
||||
|
||||
- name: Run smart contracts tests and generate coverage report
|
||||
run: pnpm -F contracts run coverage
|
||||
|
||||
solidity-format-check:
|
||||
runs-on: ubuntu-latest
|
||||
name: Solidity format check
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Setup nodejs environment
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
|
||||
- name: Check Solidity formatting
|
||||
run: pnpm -F contracts run lint:sol
|
||||
14
.github/workflows/security-report-to-csv.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: Export Security Report to CSV
|
||||
on: workflow_dispatch
|
||||
jobs:
|
||||
data_gathering:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: CSV export
|
||||
uses: advanced-security/ghas-to-csv@v2
|
||||
- name: Upload CSV
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ghas-data
|
||||
path: ${{ github.workspace }}/*.csv
|
||||
if-no-files-found: error
|
||||
27
.github/workflows/stale.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
permissions:
|
||||
# contents: write # only for delete-branch option
|
||||
issues: write
|
||||
pull-requests: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
# Issues
|
||||
days-before-issue-stale: -1 # Deactivate stale issues
|
||||
days-before-issue-close: -1 # Deactivate stale issues
|
||||
|
||||
# PR
|
||||
days-before-pr-stale: 30
|
||||
days-before-pr-close: 7
|
||||
stale-pr-message: 'PR has had no activity for 30 days. What is blocking it? Is there anything you can do to help move it forward? Without action it will be closed in 7 days.'
|
||||
close-pr-message: 'Closing stale PR as no activity for 7 days'
|
||||
delete-branch: true
|
||||
46
.github/workflows/testing.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Testing CI
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
coordinator_changed:
|
||||
required: true
|
||||
type: string
|
||||
postman_changed:
|
||||
required: true
|
||||
type: string
|
||||
prover_changed:
|
||||
required: true
|
||||
type: string
|
||||
coordinator_image_tagged:
|
||||
required: true
|
||||
type: string
|
||||
postman_image_tagged:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
coordinator:
|
||||
uses: ./.github/workflows/coordinator-testing.yml
|
||||
if: ${{ always() && (inputs.coordinator_changed == 'true' || inputs.coordinator_image_tagged != 'true') }}
|
||||
with:
|
||||
commit_tag: ${{ inputs.commit_tag }}
|
||||
secrets: inherit
|
||||
|
||||
prover:
|
||||
uses: ./.github/workflows/prover-testing.yml
|
||||
if: ${{ inputs.prover_changed == 'true' }}
|
||||
secrets: inherit
|
||||
|
||||
postman:
|
||||
uses: ./.github/workflows/postman-testing.yml
|
||||
if: ${{ always() && (inputs.postman_changed == 'true' || inputs.postman_image_tagged != 'true') }}
|
||||
secrets: inherit
|
||||
107
.github/workflows/traces-api-facade-build-and-publish.yml
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
name: Traces-api-facade build and publish CI
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
last_commit_tag:
|
||||
required: true
|
||||
type: string
|
||||
common_ancestor_tag:
|
||||
required: true
|
||||
type: string
|
||||
develop_tag:
|
||||
required: true
|
||||
type: string
|
||||
untested_tag_suffix:
|
||||
required: true
|
||||
type: string
|
||||
image_name:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
coverage:
|
||||
description: To generate test report
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
name: Traces api build
|
||||
env:
|
||||
COMMIT_TAG: ${{ inputs.commit_tag }}
|
||||
DEVELOP_TAG: ${{ inputs.develop_tag }}
|
||||
UNTESTED_TAG_SUFFIX: ${{ inputs.untested_tag_suffix }}
|
||||
IMAGE_NAME: ${{ inputs.image_name }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.head_ref }}
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
- name: Run tests with coverage
|
||||
uses: nick-fields/retry@v2
|
||||
if: ${{ inputs.coverage }}
|
||||
with:
|
||||
max_attempts: 2
|
||||
retry_on: error
|
||||
timeout_minutes: 20
|
||||
command: |
|
||||
./gradlew traces-api-facade:app:buildNeeded jacocoRootReport
|
||||
- name: Run tests without coverage
|
||||
uses: nick-fields/retry@v2
|
||||
if: ${{ !inputs.coverage }}
|
||||
with:
|
||||
max_attempts: 2
|
||||
retry_on: error
|
||||
timeout_minutes: 20
|
||||
command: |
|
||||
./gradlew traces-api-facade:app:buildNeeded
|
||||
- name: Build dist
|
||||
run: |
|
||||
./gradlew traces-api-facade:app:shadowJar
|
||||
echo ${{ github.workspace }}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to Docker Hub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Docker meta
|
||||
id: traces-api-facade
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: consensys/linea-traces-api-facade
|
||||
- name: Build & push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
build-contexts: jar=./traces-api-facade/app/build/libs/
|
||||
file: ./traces-api-facade/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.IMAGE_NAME }}:${{ env.COMMIT_TAG }}-${{ env.UNTESTED_TAG_SUFFIX }}
|
||||
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
|
||||
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
|
||||
26
.github/workflows/valid-audit-pr-has-tags.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Check For Audit Tags On PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'audit/**'
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check audit tag
|
||||
run: |
|
||||
TAG_NAME=$(git tag --points-at ${{ github.event.pull_request.head.sha }})
|
||||
if [[ ! $TAG_NAME =~ ^contract-audit-.*-.*$ ]]; then
|
||||
echo "Error: The latest commit must be tagged with a tag that matches the format 'contract-audit-${firm}-${date}'"
|
||||
exit 1
|
||||
fi
|
||||
55
.gitignore
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
*.bak
|
||||
*.swp
|
||||
*.tmp
|
||||
*~.nib
|
||||
*.iml
|
||||
*.launch
|
||||
*.swp
|
||||
*.log
|
||||
*.jar
|
||||
.classpath
|
||||
.DS_Store
|
||||
.externalToolBuilders/
|
||||
.gradle/
|
||||
.idea/
|
||||
.vscode
|
||||
.loadpath
|
||||
.metadata
|
||||
.prefs
|
||||
.project
|
||||
.recommenders/
|
||||
.settings
|
||||
.springBeans
|
||||
.vertx
|
||||
.run/**.run.xml
|
||||
.envrc
|
||||
bin/
|
||||
!operations/src/synctx/bin/
|
||||
target/
|
||||
tmp/
|
||||
build/
|
||||
out/
|
||||
node_modules/
|
||||
**/src/*/generated
|
||||
/prover/.direnv/
|
||||
/prover/.envrc
|
||||
/prover/testdata/
|
||||
/prover/zkevm/zkevm.bin
|
||||
**/.direnv
|
||||
typechain
|
||||
.env
|
||||
/sdk/.nyc_output/
|
||||
/sdk/scripts/contractAddresses.json
|
||||
/sdk/src/lib/**/*.js
|
||||
/sdk/scripts/*.js
|
||||
/sdk/postman.db
|
||||
!/sdk/src/lib/compressor/bin
|
||||
dist
|
||||
contracts/.env~
|
||||
/prover/cmd/contract-gen/contract-gen
|
||||
/prover/cmd/contract-gen/docker/**
|
||||
/contracts/deployments/zkevm_dev
|
||||
coverage
|
||||
tsconfig.build.tsbuildinfo
|
||||
ts-libs/**/lib/**/*.so
|
||||
ts-libs/**/lib/**/*.dylib
|
||||
6
.gitmodules
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
[submodule "constraints"]
|
||||
path = constraints
|
||||
url = git@github.com:ConsenSys/zkevm-constraints.git
|
||||
[submodule "corset"]
|
||||
path = corset
|
||||
url = git@github.com:consensys/corset.git
|
||||
2
.npmrc
Normal file
@@ -0,0 +1,2 @@
|
||||
auto-install-peers = true
|
||||
enable-pre-post-scripts = true
|
||||
9
.prettierrc.js
Normal file
@@ -0,0 +1,9 @@
|
||||
/** @type {import("prettier").Config} */
|
||||
module.exports = {
|
||||
trailingComma: "all",
|
||||
tabWidth: 2,
|
||||
semi: true,
|
||||
singleQuote: false,
|
||||
printWidth: 120,
|
||||
bracketSpacing: true,
|
||||
};
|
||||
23
.run/Coordinator.run.xml.template
Normal file
@@ -0,0 +1,23 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Coordinator" type="Application" factoryName="Application">
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="21" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
|
||||
<option name="MAIN_CLASS_NAME" value="net.consensys.zkevm.coordinator.app.CoordinatorAppMain" />
|
||||
<module name="zkevm.coordinator.app.main" />
|
||||
<option name="PROGRAM_PARAMETERS" value="--traces-limits-v2=config/common/traces-limits-v2.toml --smart-contract-errors=config/common/smart-contract-errors.toml --gas-price-cap-time-of-day-multipliers=config/common/gas-price-cap-time-of-day-multipliers.toml config/coordinator/coordinator-docker.config.toml config/coordinator/coordinator-docker-traces-v2-override.config.toml config/coordinator/coordinator-local-dev.config.overrides.toml config/coordinator/coordinator-local-dev.config-traces-v2.overrides.toml" />
|
||||
<option name="VM_PARAMETERS" value="-Dvertx.configurationFile=config/coordinator/vertx-options.json -Dlog4j2.configurationFile=config/coordinator/log4j2-dev.xml" />
|
||||
<extension name="net.ashald.envfile">
|
||||
<option name="IS_ENABLED" value="false" />
|
||||
<option name="IS_SUBST" value="false" />
|
||||
<option name="IS_PATH_MACRO_SUPPORTED" value="false" />
|
||||
<option name="IS_IGNORE_MISSING_FILES" value="false" />
|
||||
<option name="IS_ENABLE_EXPERIMENTAL_INTEGRATIONS" value="false" />
|
||||
<ENTRIES>
|
||||
<ENTRY IS_ENABLED="true" PARSER="runconfig" IS_EXECUTABLE="false" />
|
||||
</ENTRIES>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
23
.run/TracesApi.run.xml.template
Normal file
@@ -0,0 +1,23 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="TracesApi" type="Application" factoryName="Application">
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="21" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
|
||||
<option name="MAIN_CLASS_NAME" value="net.consensys.linea.traces.app.TracesAppMain" />
|
||||
<module name="zkevm.traces-api-facade.app.main" />
|
||||
<option name="PROGRAM_PARAMETERS" value="config/traces-api/traces-app-docker.config.toml config/traces-api/traces-app-local-dev.config.overrides.toml" />
|
||||
<option name="VM_PARAMETERS" value="-Dvertx.configurationFile=config/traces-api/vertx-options.json -Dlog4j2.configurationFile=config/traces-api/log4j2-dev.xml" />
|
||||
<extension name="net.ashald.envfile">
|
||||
<option name="IS_ENABLED" value="false" />
|
||||
<option name="IS_SUBST" value="false" />
|
||||
<option name="IS_PATH_MACRO_SUPPORTED" value="false" />
|
||||
<option name="IS_IGNORE_MISSING_FILES" value="false" />
|
||||
<option name="IS_ENABLE_EXPERIMENTAL_INTEGRATIONS" value="false" />
|
||||
<ENTRIES>
|
||||
<ENTRY IS_ENABLED="true" PARSER="runconfig" IS_EXECUTABLE="false" />
|
||||
</ENTRIES>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
15
LICENSE
Normal file
@@ -0,0 +1,15 @@
|
||||
# License
|
||||
|
||||
Copyright 2024 Consensys Software Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
211
Makefile
Normal file
@@ -0,0 +1,211 @@
|
||||
define get_future_time
|
||||
$(shell \
|
||||
OS=$$(uname); \
|
||||
if [ "$$OS" = "Linux" ]; then \
|
||||
date -d '+3 seconds' +%s; \
|
||||
elif [ "$$OS" = "Darwin" ]; then \
|
||||
date -v +3S +%s; \
|
||||
fi \
|
||||
)
|
||||
endef
|
||||
|
||||
npm-install:
|
||||
pnpm install
|
||||
|
||||
docker-pull-develop:
|
||||
docker compose -f docker/compose.yml --profile l2 pull
|
||||
|
||||
clean-smc-folders:
|
||||
rm -f contracts/.openzeppelin/unknown-31648428.json
|
||||
rm -f contracts/.openzeppelin/unknown-1337.json
|
||||
|
||||
clean-local-folders:
|
||||
make clean-smc-folders
|
||||
rm -rf tmp/local/*
|
||||
|
||||
clean-testnet-folders:
|
||||
make clean-smc-folders
|
||||
rm -rf tmp/testnet/*
|
||||
|
||||
clean-environment:
|
||||
docker compose -f docker/compose.yml -f docker/compose-local-dev-traces-v2.overrides.yml --profile l1 --profile l2 --profile debug down || true
|
||||
make clean-local-folders
|
||||
docker network prune -f
|
||||
docker volume rm linea-local-dev linea-logs || true # ignore failure if volumes do not exist already
|
||||
# Commented out because it's quite time consuming to download the plugin, but it's useful to remember about it
|
||||
#rm -rf tmp/linea-besu-sequencer/plugins/
|
||||
|
||||
start-l1:
|
||||
L1_GENESIS_TIME=$(get_future_time) docker compose -f docker/compose.yml -f docker/compose-local-dev.overrides.yml --profile l1 up -d
|
||||
|
||||
start-l2:
|
||||
docker compose -f docker/compose.yml -f docker/compose-local-dev.overrides.yml --profile l2 up -d
|
||||
|
||||
start-l2-blockchain-only:
|
||||
docker compose -f docker/compose.yml -f docker/compose-local-dev.overrides.yml --profile l2-bc up -d
|
||||
|
||||
start-whole-environment:
|
||||
# docker compose -f docker/compose.yml -f docker/compose-local-dev.overrides.yml build prover
|
||||
docker compose -f docker/compose.yml -f docker/compose-local-dev.overrides.yml --profile l1 --profile l2 up -d
|
||||
|
||||
start-whole-environment-traces-v2:
|
||||
mkdir -p tmp/local/traces/v2/conflated
|
||||
docker compose -f docker/compose.yml -f docker/compose-local-dev-traces-v2.overrides.yml --profile l1 --profile l2 up -d
|
||||
|
||||
pull-all-images:
|
||||
docker compose -f docker/compose.yml -f docker/compose-local-dev-traces-v2.overrides.yml --profile l1 --profile l2 pull
|
||||
|
||||
compile-contracts:
|
||||
cd contracts; \
|
||||
make compile
|
||||
|
||||
compile-contracts-no-cache:
|
||||
cd contracts/; \
|
||||
make force-compile
|
||||
|
||||
deploy-linea-rollup:
|
||||
# WARNING: FOR LOCAL DEV ONLY - DO NOT REUSE THESE KEYS ELSEWHERE
|
||||
cd contracts/; \
|
||||
PRIVATE_KEY=$${DEPLOYMENT_PRIVATE_KEY:-0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80} \
|
||||
BLOCKCHAIN_NODE=http:\\localhost:8445/ \
|
||||
PLONKVERIFIER_NAME=IntegrationTestTrueVerifier \
|
||||
LINEA_ROLLUP_INITIAL_STATE_ROOT_HASH=0x072ead6777750dc20232d1cee8dc9a395c2d350df4bbaa5096c6f59b214dcecd \
|
||||
LINEA_ROLLUP_INITIAL_L2_BLOCK_NUMBER=0 \
|
||||
LINEA_ROLLUP_SECURITY_COUNCIL=0x90F79bf6EB2c4f870365E785982E1f101E93b906 \
|
||||
LINEA_ROLLUP_OPERATORS=$${LINEA_ROLLUP_OPERATORS:-0x70997970C51812dc3A010C7d01b50e0d17dc79C8,0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC} \
|
||||
LINEA_ROLLUP_RATE_LIMIT_PERIOD=86400 \
|
||||
LINEA_ROLLUP_RATE_LIMIT_AMOUNT=1000000000000000000000 \
|
||||
LINEA_ROLLUP_GENESIS_TIMESTAMP=1683325137 \
|
||||
npx hardhat deploy --no-compile --network zkevm_dev --tags PlonkVerifier,LineaRollup
|
||||
|
||||
deploy-l2messageservice:
|
||||
# WARNING: FOR LOCAL DEV ONLY - DO NOT REUSE THESE KEYS ELSEWHERE
|
||||
cd contracts/; \
|
||||
PRIVATE_KEY=$${DEPLOYMENT_PRIVATE_KEY:-0x1dd171cec7e2995408b5513004e8207fe88d6820aeff0d82463b3e41df251aae} \
|
||||
BLOCKCHAIN_NODE=http:\\localhost:8545/ \
|
||||
L2MSGSERVICE_SECURITY_COUNCIL=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 \
|
||||
L2MSGSERVICE_L1L2_MESSAGE_SETTER=$${L2MSGSERVICE_L1L2_MESSAGE_SETTER:-0xd42e308fc964b71e18126df469c21b0d7bcb86cc} \
|
||||
L2MSGSERVICE_RATE_LIMIT_PERIOD=86400 \
|
||||
L2MSGSERVICE_RATE_LIMIT_AMOUNT=1000000000000000000000 \
|
||||
npx hardhat deploy --no-compile --network zkevm_dev --tags L2MessageService
|
||||
|
||||
upgrade-linea-rollup-on-uat:
|
||||
cd contracts/; \
|
||||
rm -f .openzeppelin/goerli.json; \
|
||||
sed "s/BLOCKCHAIN_NODE=.*/BLOCKCHAIN_NODE=https:\/\/goerli.infura.io\/v3\/${INFURA_KEY}/" .env.template.uat > .env; \
|
||||
sed -i~ "s/PRIVATE_KEY=.*/PRIVATE_KEY=${PRIVATE_KEY}/" .env; \
|
||||
npx hardhat run ./scripts/upgrades/upgradeZkEVM.ts --network zkevm_dev
|
||||
|
||||
fresh-start-l2-blockchain-only:
|
||||
make clean-environment
|
||||
make start-l2-blockchain-only
|
||||
|
||||
restart-shomei:
|
||||
docker compose -f docker/compose.yml -f docker/compose-local-dev.overrides.yml rm zkbesu-shomei shomei
|
||||
rm -rf tmp/local/shomei/*
|
||||
docker compose -f docker/compose.yml -f docker/compose-local-dev.overrides.yml up zkbesu-shomei shomei -d
|
||||
|
||||
fresh-start-all-smc-v4:
|
||||
make clean-environment
|
||||
make start-all-smc-v4
|
||||
|
||||
fresh-start-all:
|
||||
make clean-environment
|
||||
make start-all
|
||||
|
||||
fresh-start-all-traces-v2:
|
||||
make clean-environment
|
||||
make start-all-traces-v2
|
||||
|
||||
start-all-smc-v4:
|
||||
L1_GENESIS_TIME=$(get_future_time) make start-whole-environment
|
||||
make deploy-contracts-v4
|
||||
|
||||
start-all:
|
||||
L1_GENESIS_TIME=$(get_future_time) make start-whole-environment
|
||||
make deploy-contracts
|
||||
|
||||
start-all-traces-v2:
|
||||
L1_GENESIS_TIME=$(get_future_time) make start-whole-environment-traces-v2
|
||||
make deploy-contracts
|
||||
|
||||
deploy-contracts-v4:
|
||||
make compile-contracts
|
||||
$(MAKE) -j2 deploy-linea-rollup-v4 deploy-l2messageservice
|
||||
|
||||
deploy-contracts:
|
||||
make compile-contracts
|
||||
$(MAKE) -j2 deploy-linea-rollup deploy-l2messageservice
|
||||
|
||||
testnet-start-l2:
|
||||
docker compose -f docker/compose.yml -f docker/compose-testnet-sync.overrides.yml --profile l2 up -d
|
||||
|
||||
testnet-start-l2-traces-node-only:
|
||||
docker compose -f docker/compose.yml -f docker/compose-testnet-sync.overries.yml up traces-node -d
|
||||
|
||||
testnet-start: start-l1 deploy-linea-rollup testnet-start-l2
|
||||
testnet-restart-l2-keep-state:
|
||||
docker compose -f docker/compose.yml -f docker/compose-testnet-sync.overrides.yml rm -f -s -v sequencer traces-node coordinator
|
||||
make testnet-start-l2
|
||||
|
||||
testnet-restart-l2-clean-state:
|
||||
docker compose -f docker/compose.yml -f docker/compose-testnet-sync.overrides.yml rm -f -s -v sequencer traces-node coordinator
|
||||
docker volume rm testnet-data
|
||||
make clean-testnet-folders
|
||||
make testnet-start-l2
|
||||
|
||||
testnet-down:
|
||||
docker compose -f docker/compose.yml -f docker/compose-testnet-sync.overrides.yml --profile l1 --profile l2 down -v
|
||||
make clean-testnet-folders
|
||||
|
||||
stop_pid:
|
||||
if [ -f $(PID_FILE) ]; then \
|
||||
kill `cat $(PID_FILE)`; \
|
||||
echo "Stopped process with PID `cat $(PID_FILE)`"; \
|
||||
rm $(PID_FILE); \
|
||||
else \
|
||||
echo "$(PID_FILE) does not exist. No process to stop."; \
|
||||
fi
|
||||
|
||||
restart-l2-minimal-stack-local:
|
||||
make stop-coordinator
|
||||
make stop-traces-api
|
||||
make stop_pid PID_FILE=tmp/local/traces-app.pid
|
||||
make clean-environment
|
||||
make start-l2
|
||||
make deploy-l2messageservice-to-local
|
||||
make start-traces-api
|
||||
make start-coordinator
|
||||
# TODO: use locally built prover for faster feedback loop
|
||||
|
||||
stop-l2-minimal-stack-local:
|
||||
make stop-coordinator
|
||||
make stop-traces-api
|
||||
make clean-environment
|
||||
|
||||
start-coordinator:
|
||||
mkdir -p tmp/local/logs
|
||||
./gradlew coordinator:app:run \
|
||||
-Dconfig.override.testL1Disabled=true \
|
||||
-Dconfig.override.traces.counters.endpoints="http://127.0.0.1:8081" \
|
||||
-Dconfig.override.traces.conflation.endpoints="http://127.0.0.1:8081" \
|
||||
-Dconfig.override.dynamic-gas-price-service.miner-gas-price-update-recipients="http://127.0.0.1:8545/,http://127.0.0.1:8645/" > tmp/local/logs/coordinator.log & echo "$$!" > tmp/local/coordinator.pid
|
||||
|
||||
stop-coordinator:
|
||||
make stop_pid PID_FILE=tmp/local/coordinator.pid
|
||||
|
||||
restart-coordinator:
|
||||
make stop-coordinator
|
||||
make start-coordinator
|
||||
|
||||
start-traces-api:
|
||||
mkdir -p tmp/local/logs
|
||||
mkdir -p tmp/local/traces/raw
|
||||
./gradlew traces-api:app:run > tmp/local/logs/traces-app.log & echo "$$!" > tmp/local/traces-app.pid
|
||||
|
||||
stop-traces-api:
|
||||
make stop_pid PID_FILE=tmp/local/traces-app.pid
|
||||
|
||||
restart-traces-api:
|
||||
make stop-traces-api
|
||||
make start-traces-api
|
||||
59
README.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# Linea zkEVM
|
||||
|
||||
This is the principal Linea repository. It mainly includes the smart contracts covering Linea's core functions, the prover in charge of generating ZK proofs, the coordinator responsible for multiple orchestrations, and the Postman to execute bridge messages.
|
||||
|
||||
It serves developers by making the Linea tech stack open source under the [Apache 2.0 license](LICENSE).
|
||||
|
||||
## What is Linea?
|
||||
|
||||
[Linea](https://linea.build) is a developer-ready layer 2 network scaling Ethereum. It's secured with a zero-knowledge rollup, built on lattice-based cryptography, and powered by [Consensys](https://consensys.io).
|
||||
|
||||
|
||||
## Get started
|
||||
|
||||
If you already have an understanding of the tech stack, use our [Get Started](docs/get-started.md) guide.
|
||||
|
||||
## Looking for the Linea code?
|
||||
|
||||
Linea's stack is made up of multiple repositories, these include:
|
||||
|
||||
- This repo, [linea-monorepo](https://github.com/Consensys/linea-monorepo): The main repository for the Linea stack & network
|
||||
- [linea-besu](https://github.com/Consensys/linea-besu): Fork of Besu to implement the Linea-Besu client
|
||||
- [linea-sequencer](https://github.com/Consensys/linea-sequencer): A set of Linea-Besu plugins for the sequencer and RPC nodes
|
||||
- [linea-tracer](https://github.com/Consensys/linea-tracer): Linea-Besu plugin which produces the traces that the constraint system applies and that serve as inputs to the prover
|
||||
- [linea-constraints](https://github.com/Consensys/linea-constraints): Implementation of the constraint system from the specification
|
||||
- [linea-specification](https://github.com/Consensys/linea-specification): Specification of the constraint system defining Linea's zk-EVM
|
||||
|
||||
Linea abstracts away the complexity of this technical architecture to allow developers to:
|
||||
|
||||
- [Bridge tokens](https://docs.linea.build/developers/guides/bridge)
|
||||
- [Deploy a contract](https://docs.linea.build/developers/quickstart/deploy-smart-contract)
|
||||
- [Run a node](https://docs.linea.build/developers/guides/run-a-node)
|
||||
|
||||
... and more.
|
||||
|
||||
## How to contribute
|
||||
|
||||
Contributions of any kind are welcome!
|
||||
|
||||
1. [Create an issue](https://github.com/Consensys/linea-monorepo/issues)
|
||||
> If the proposed update is non-trivial, also tag us for discussion.
|
||||
2. Submit the update as a pull request from your [fork of this repo](https://github.com/Consensys/linea-monorepo/fork), and tag us for review.
|
||||
> Include the issue number in the pull request description and (optionally) in the branch name.
|
||||
|
||||
Consider starting with a ["good first issue"](https://github.com/ConsenSys/linea-monorepo/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
|
||||
|
||||
Before contributing, ensure you're familiar with:
|
||||
|
||||
- Our [contribution guide](docs/contribute.md)
|
||||
- Our [code of conduct](docs/code-of-conduct.md)
|
||||
- The [Besu contribution guide](https://wiki.hyperledger.org/display/BESU/Coding+Conventions), for Besu:Linea related contributions
|
||||
- Our [Security policy](docs/security.md)
|
||||
|
||||
### Useful links
|
||||
|
||||
- [Linea docs](https://docs.linea.build)
|
||||
- [Linea blog](https://linea.mirror.xyz)
|
||||
- [Support](https://support.linea.build)
|
||||
- [Discord](https://discord.gg/linea)
|
||||
- [Twitter](https://twitter.com/LineaBuild)
|
||||
13
bridge-ui/.dockerignore
Normal file
@@ -0,0 +1,13 @@
|
||||
*
|
||||
!src
|
||||
!package.json
|
||||
!package-lock.json
|
||||
!node_modules
|
||||
!public
|
||||
!next.config.js
|
||||
!tsconfig.json
|
||||
!postcss.config.js
|
||||
!tailwind.config.js
|
||||
!.next
|
||||
!.env.production
|
||||
!.env
|
||||
29
bridge-ui/.env.production
Normal file
@@ -0,0 +1,29 @@
|
||||
NEXT_PUBLIC_MAINNET_L1_TOKEN_BRIDGE=0x051F1D88f0aF5763fB888eC4378b4D8B29ea3319
|
||||
NEXT_PUBLIC_MAINNET_LINEA_TOKEN_BRIDGE=0x353012dc4a9A6cF55c941bADC267f82004A8ceB9
|
||||
NEXT_PUBLIC_MAINNET_L1_MESSAGE_SERVICE=0xd19d4B5d358258f05D7B411E21A1460D11B0876F
|
||||
NEXT_PUBLIC_MAINNET_LINEA_MESSAGE_SERVICE=0x508Ca82Df566dCD1B0DE8296e70a96332cD644ec
|
||||
NEXT_PUBLIC_MAINNET_L1_USDC_BRIDGE=0x504A330327A089d8364C4ab3811Ee26976d388ce
|
||||
NEXT_PUBLIC_MAINNET_LINEA_USDC_BRIDGE=0xA2Ee6Fce4ACB62D95448729cDb781e3BEb62504A
|
||||
NEXT_PUBLIC_MAINNET_GAS_ESTIMATED=100000
|
||||
NEXT_PUBLIC_MAINNET_DEFAULT_GAS_LIMIT_SURPLUS=6000
|
||||
NEXT_PUBLIC_MAINNET_PROFIT_MARGIN=2
|
||||
NEXT_PUBLIC_MAINNET_TOKEN_LIST=https://raw.githubusercontent.com/Consensys/linea-token-list/main/json/linea-mainnet-token-shortlist.json
|
||||
|
||||
NEXT_PUBLIC_SEPOLIA_L1_TOKEN_BRIDGE=0x5A0a48389BB0f12E5e017116c1105da97E129142
|
||||
NEXT_PUBLIC_SEPOLIA_LINEA_TOKEN_BRIDGE=0x93DcAdf238932e6e6a85852caC89cBd71798F463
|
||||
NEXT_PUBLIC_SEPOLIA_L1_MESSAGE_SERVICE=0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5
|
||||
NEXT_PUBLIC_SEPOLIA_LINEA_MESSAGE_SERVICE=0x971e727e956690b9957be6d51Ec16E73AcAC83A7
|
||||
NEXT_PUBLIC_SEPOLIA_L1_USDC_BRIDGE=0x72ee80A931AF3b62401c3F097cE9d345D8477ea7
|
||||
NEXT_PUBLIC_SEPOLIA_LINEA_USDC_BRIDGE=0xE96C33751C697D15F194632D7190042Ae7fd2a70
|
||||
NEXT_PUBLIC_SEPOLIA_GAS_ESTIMATED=100000
|
||||
NEXT_PUBLIC_SEPOLIA_DEFAULT_GAS_LIMIT_SURPLUS=6000
|
||||
NEXT_PUBLIC_SEPOLIA_PROFIT_MARGIN=2
|
||||
NEXT_PUBLIC_SEPOLIA_TOKEN_LIST=https://raw.githubusercontent.com/Consensys/linea-token-list/main/json/linea-sepolia-token-shortlist.json
|
||||
|
||||
NEXT_PUBLIC_WALLET_CONNECT_ID=<GITHUB_SECRET>
|
||||
|
||||
NEXT_PUBLIC_INFURA_ID=<GITHUB_SECRET>
|
||||
|
||||
E2E_TEST_PRIVATE_KEY=<GITHUB_SECRET>
|
||||
|
||||
NEXT_PUBLIC_STORAGE_MIN_VERSION="0.6.5"
|
||||
32
bridge-ui/.env.template
Normal file
@@ -0,0 +1,32 @@
|
||||
NEXT_PUBLIC_MAINNET_L1_TOKEN_BRIDGE=0x051F1D88f0aF5763fB888eC4378b4D8B29ea3319
|
||||
NEXT_PUBLIC_MAINNET_LINEA_TOKEN_BRIDGE=0x353012dc4a9A6cF55c941bADC267f82004A8ceB9
|
||||
NEXT_PUBLIC_MAINNET_L1_MESSAGE_SERVICE=0xd19d4B5d358258f05D7B411E21A1460D11B0876F
|
||||
NEXT_PUBLIC_MAINNET_LINEA_MESSAGE_SERVICE=0x508Ca82Df566dCD1B0DE8296e70a96332cD644ec
|
||||
NEXT_PUBLIC_MAINNET_L1_USDC_BRIDGE=0x504A330327A089d8364C4ab3811Ee26976d388ce
|
||||
NEXT_PUBLIC_MAINNET_LINEA_USDC_BRIDGE=0xA2Ee6Fce4ACB62D95448729cDb781e3BEb62504A
|
||||
NEXT_PUBLIC_MAINNET_GAS_ESTIMATED=100000
|
||||
NEXT_PUBLIC_MAINNET_DEFAULT_GAS_LIMIT_SURPLUS=6000
|
||||
NEXT_PUBLIC_MAINNET_PROFIT_MARGIN=2
|
||||
NEXT_PUBLIC_MAINNET_TOKEN_LIST=https://raw.githubusercontent.com/Consensys/linea-token-list/main/json/linea-mainnet-token-shortlist.json
|
||||
|
||||
NEXT_PUBLIC_SEPOLIA_L1_TOKEN_BRIDGE=0x5A0a48389BB0f12E5e017116c1105da97E129142
|
||||
NEXT_PUBLIC_SEPOLIA_LINEA_TOKEN_BRIDGE=0x93DcAdf238932e6e6a85852caC89cBd71798F463
|
||||
NEXT_PUBLIC_SEPOLIA_L1_MESSAGE_SERVICE=0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5
|
||||
NEXT_PUBLIC_SEPOLIA_LINEA_MESSAGE_SERVICE=0x971e727e956690b9957be6d51Ec16E73AcAC83A7
|
||||
NEXT_PUBLIC_SEPOLIA_L1_USDC_BRIDGE=0x72ee80A931AF3b62401c3F097cE9d345D8477ea7
|
||||
NEXT_PUBLIC_SEPOLIA_LINEA_USDC_BRIDGE=0xE96C33751C697D15F194632D7190042Ae7fd2a70
|
||||
NEXT_PUBLIC_SEPOLIA_GAS_ESTIMATED=100000
|
||||
NEXT_PUBLIC_SEPOLIA_DEFAULT_GAS_LIMIT_SURPLUS=6000
|
||||
NEXT_PUBLIC_SEPOLIA_PROFIT_MARGIN=2
|
||||
NEXT_PUBLIC_SEPOLIA_TOKEN_LIST=https://raw.githubusercontent.com/Consensys/linea-token-list/main/json/linea-sepolia-token-shortlist.json
|
||||
|
||||
NEXT_PUBLIC_WALLET_CONNECT_ID=<YOUR__WALLET_CONNECT_ID>
|
||||
|
||||
NEXT_PUBLIC_INFURA_ID=<YOUR_INFURA_ID>
|
||||
|
||||
E2E_TEST_PRIVATE_KEY=<YOUR_PRIVATE_KEY>
|
||||
|
||||
NEXT_PUBLIC_STORAGE_MIN_VERSION="0.6.5"
|
||||
|
||||
E2E_TEST_SEED_PHRASE="test test test test test test test test test test test junk"
|
||||
E2E_TEST_WALLET_PASSWORD="TestPassword!"
|
||||
19
bridge-ui/.eslintrc.cjs
Normal file
@@ -0,0 +1,19 @@
|
||||
/* eslint-env node */
|
||||
module.exports = {
|
||||
plugins: ["react", "@typescript-eslint"],
|
||||
extends: [
|
||||
"../.eslintrc.js",
|
||||
"next",
|
||||
"next/core-web-vitals",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:tailwindcss/recommended",
|
||||
],
|
||||
rules: {
|
||||
"@typescript-eslint/no-unused-vars": "warn",
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"@typescript-eslint/no-duplicate-imports": "off",
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"tailwindcss/no-custom-classname": "off",
|
||||
},
|
||||
};
|
||||
41
bridge-ui/.gitignore
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
/cache
|
||||
/tests/dist
|
||||
.cache-synpress
|
||||
playwright-report
|
||||
test-results
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
.env
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
44
bridge-ui/Dockerfile
Normal file
@@ -0,0 +1,44 @@
|
||||
FROM node:lts-alpine AS base
|
||||
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
|
||||
FROM base AS builder
|
||||
|
||||
ARG NEXT_PUBLIC_WALLET_CONNECT_ID
|
||||
ARG NEXT_PUBLIC_INFURA_ID
|
||||
ENV NEXT_PUBLIC_WALLET_CONNECT_ID=$NEXT_PUBLIC_WALLET_CONNECT_ID
|
||||
ENV NEXT_PUBLIC_INFURA_ID=$NEXT_PUBLIC_INFURA_ID
|
||||
ARG ENV_FILE
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir -p bridge-ui
|
||||
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.json .eslintrc.js .prettierrc.js ./
|
||||
|
||||
COPY ./bridge-ui ./bridge-ui
|
||||
COPY $ENV_FILE ./bridge-ui/.env.production
|
||||
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store apk add --virtual build-dependencies --no-cache python3 make g++ \
|
||||
&& pnpm install --frozen-lockfile \
|
||||
&& pnpm run -F bridge-ui build \
|
||||
&& apk del build-dependencies
|
||||
|
||||
FROM node:lts-alpine AS runner
|
||||
|
||||
ARG X_TAG
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
||||
USER node
|
||||
|
||||
COPY --from=builder --chown=node:node /app/bridge-ui/.next/standalone ./
|
||||
COPY --from=builder --chown=node:node /app/bridge-ui/public ./bridge-ui/public
|
||||
COPY --from=builder --chown=node:node /app/bridge-ui/.next/static ./bridge-ui/.next/static
|
||||
|
||||
CMD ["node", "./bridge-ui/server.js"]
|
||||
9
bridge-ui/Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
SERVICE := LINEA BRIDGE UI
|
||||
bold := $(shell tput bold)
|
||||
sgr0 := $(shell tput sgr0)
|
||||
|
||||
# Dev
|
||||
|
||||
.PHONY: dev
|
||||
dev:
|
||||
npm run dev
|
||||
175
bridge-ui/README.md
Normal file
@@ -0,0 +1,175 @@
|
||||
# Linea Bridge UI
|
||||
|
||||
## Deployment
|
||||
|
||||
### Config
|
||||
|
||||
The config file `.env.production` is used for public configuration variables.
|
||||
|
||||
Private configuration variables are store on GitHub Secrets.
|
||||
|
||||
### Get a Frontend Tag
|
||||
|
||||
- Retrieve an existing tag.
|
||||
- Get a Tag from [GitHub Actions](https://github.com/Consensys/zkevm-monorepo/actions) on `Bridge UI Build and Publish` job, `Set Docker Tag` action.
|
||||
- Or create a new tag.
|
||||
- Create a PR and merge the last version to develop branch, and get a Tag from [GitHub Actions](https://github.com/Consensys/zkevm-monorepo/actions) on `Bridge UI Build and Publish` job, `Set Docker Tag` action.
|
||||
|
||||
Example:
|
||||
|
||||
In `Set Docker Tag`
|
||||
|
||||
```
|
||||
Run echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-bridge-ui-${{ steps.package-version.outputs.current-version }}" | tee $GITHUB_ENV
|
||||
DOCKER_TAG=f3afe33-1705598198-bridge-ui-0.5.3
|
||||
```
|
||||
|
||||
The Tag is `f3afe33-1705598198-bridge-ui-0.5.3`
|
||||
|
||||
### Deployment on Dev
|
||||
|
||||
To publish updates to [https://bridge.dev.linea.build/](https://bridge.dev.linea.build/):
|
||||
|
||||
#### Update a Frontend Tag on Linea cluster
|
||||
|
||||
1. Get a Frontend Tag
|
||||
2. Go to [zk-apps-dev](https://github.com/Consensys/zk-apps-dev) project, create a branch from `main` branch.
|
||||
3. Modify [values.yaml](https://github.com/ConsenSys/zk-apps-dev/blob/main/argocd/bridge-ui/values.yaml) by replacing it with the specified tag.
|
||||
|
||||
```
|
||||
---
|
||||
image:
|
||||
bridge_ui:
|
||||
repository: consensys/bridge-ui
|
||||
tag: f3afe33-1705598198-bridge-ui-0.5.3
|
||||
[...]
|
||||
```
|
||||
|
||||
- Push the branch and create a merge request
|
||||
|
||||
The update should appear on [https://bridge.dev.linea.build/](https://bridge.dev.linea.build/).
|
||||
|
||||
#### Check ArgoCD deployment
|
||||
|
||||
To check the deployment, go to: [argocd.dev.zkevm.consensys.net](https://argocd.dev.zkevm.consensys.net/applications/argocd/bridge-ui?resource=)
|
||||
|
||||
Access are in [1password](https://consensys.1password.com/vaults/blu7ljyqd5zgkj5vbjlmooayya/allitems/ccljvnh2hgs6jh5zc4s5apww4i)
|
||||
|
||||
### Deployment on Production
|
||||
|
||||
To publish updates to [https://bridge.linea.build/](https://bridge.linea.build/):
|
||||
|
||||
#### Update a Frontend Tag on Linea cluster
|
||||
|
||||
1. Get a Frontend Tag
|
||||
2. Go to [zk-apps-prod](https://github.com/Consensys/zk-apps-prod) project, create a branch from `main` branch.
|
||||
3. Modify [values.yaml](https://github.com/Consensys/zk-apps-prod/blob/main/argocd/bridge-ui/values.yaml) by replacing it with the specified tag.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
---
|
||||
image:
|
||||
bridge_ui:
|
||||
repository: consensys/bridge-ui
|
||||
tag: f3afe33-1705598198-bridge-ui-0.5.3
|
||||
[...]
|
||||
```
|
||||
|
||||
3. Push the branch and create a merge request
|
||||
|
||||
The update should appear on [https://bridge.linea.build/](https://bridge.linea.build/).
|
||||
|
||||
## Development
|
||||
|
||||
### Run development server
|
||||
|
||||
To start Linea Bridge UI for development:
|
||||
|
||||
1. Create a `.env` file by copying `.env.template` and add your private API keys.
|
||||
|
||||
```shell
|
||||
cp .env.template .env
|
||||
```
|
||||
|
||||
2. Install packages:
|
||||
|
||||
```shell
|
||||
npm i
|
||||
```
|
||||
|
||||
3. Start the development server, execute:
|
||||
|
||||
```shell
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Frontend should be available at: http://localhost:3000
|
||||
|
||||
### Build and test Docker image
|
||||
|
||||
Commands to test locally the Docker image used in production.
|
||||
|
||||
Build the image:
|
||||
|
||||
```shell
|
||||
# build local image
|
||||
docker build --build-arg ENV_FILE=.env.production -t linea/bridge-ui .
|
||||
```
|
||||
|
||||
Replace with `ENV_FILE=.env.production` to test dev env.
|
||||
|
||||
Run the image:
|
||||
|
||||
```shell
|
||||
# run local image
|
||||
docker run -p 3000:3000 linea/bridge-ui
|
||||
```
|
||||
|
||||
Frontend should be available at: http://localhost:3000
|
||||
|
||||
### End to end tests
|
||||
|
||||
E2E tests are run in the CI but can also be run locally.
|
||||
Make sure `E2E_TEST_PRIVATE_KEY` .env (The private key used needs to have some sepolia ETH, USDC and WETH to run the tests)
|
||||
|
||||
1. Add `NEXT_PUBLIC_WALLET_CONNECT_ID` and `NEXT_PUBLIC_INFURA_ID` to your command line env
|
||||
2. Build the Bridge UI in local in a terminal: `npm run build`
|
||||
3. Run the command: `npm test` in another terminal
|
||||
|
||||
## Config
|
||||
|
||||
The config variables are:
|
||||
|
||||
| Var | Description | Values |
|
||||
| --------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| NEXT_PUBLIC_MAINNET_L1_TOKEN_BRIDGE | Linea Token Bridge on Ethereum mainnet | 0x051F1D88f0aF5763fB888eC4378b4D8B29ea3319 |
|
||||
| NEXT_PUBLIC_MAINNET_LINEA_TOKEN_BRIDGE | Linea Token Bridge on Linea mainnet | 0x353012dc4a9A6cF55c941bADC267f82004A8ceB9 |
|
||||
| NEXT_PUBLIC_MAINNET_L1_MESSAGE_SERVICE | Linea Message Service on Ethereum mainnet | 0xd19d4B5d358258f05D7B411E21A1460D11B0876F |
|
||||
| NEXT_PUBLIC_MAINNET_LINEA_MESSAGE_SERVICE | Linea Message Service on Linea mainnet | 0x508Ca82Df566dCD1B0DE8296e70a96332cD644ec |
|
||||
| NEXT_PUBLIC_MAINNET_L1_USDC_BRIDGE | Linea USDC Bridge on Ethereum mainnet | 0x504A330327A089d8364C4ab3811Ee26976d388ce |
|
||||
| NEXT_PUBLIC_MAINNET_LINEA_USDC_BRIDGE | Linea USDC Bridge on Linea mainnet | 0xA2Ee6Fce4ACB62D95448729cDb781e3BEb62504A |
|
||||
| NEXT_PUBLIC_MAINNET_GAS_ESTIMATED | Linea gas estimated on mainnet | 100000 |
|
||||
| NEXT_PUBLIC_MAINNET_DEFAULT_GAS_LIMIT_SURPLUS | Linea gas limit surplus on mainnet | 6000 |
|
||||
| NEXT_PUBLIC_MAINNET_PROFIT_MARGIN | Linea profit margin on mainnet | 2 |
|
||||
| NEXT_PUBLIC_MAINNET_TOKEN_LIST | Linea Token list on mainnet | https://raw.githubusercontent.com/Consensys/linea-token-list/main/json/linea-mainnet-token-shortlist.json |
|
||||
| | | |
|
||||
| NEXT_PUBLIC_SEPOLIA_L1_TOKEN_BRIDGE | Linea Token Bridge on Ethereum Sepolia | 0x5A0a48389BB0f12E5e017116c1105da97E129142 |
|
||||
| NEXT_PUBLIC_SEPOLIA_LINEA_TOKEN_BRIDGE | Linea Token Bridge on Linea Sepolia | 0x93DcAdf238932e6e6a85852caC89cBd71798F463 |
|
||||
| NEXT_PUBLIC_SEPOLIA_L1_MESSAGE_SERVICE | Linea Message Service on Ethereum Sepolia | 0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5 |
|
||||
| NEXT_PUBLIC_SEPOLIA_LINEA_MESSAGE_SERVICE | Linea Message Service on Linea Sepolia | 0x971e727e956690b9957be6d51Ec16E73AcAC83A7 |
|
||||
| NEXT_PUBLIC_SEPOLIA_L1_USDC_BRIDGE | Linea USDC Bridge on Ethereum Sepolia | 0x32D123756d32d3eD6580935f8edF416e57b940f4 |
|
||||
| NEXT_PUBLIC_SEPOLIA_LINEA_USDC_BRIDGE | Linea USDC Bridge on Linea Sepolia | 0xDFa112375c9be9D124932b1d104b73f888655329 |
|
||||
| NEXT_PUBLIC_SEPOLIA_GAS_ESTIMATED | Linea gas estimated on Sepolia | 6100000000 |
|
||||
| NEXT_PUBLIC_SEPOLIA_DEFAULT_GAS_LIMIT_SURPLUS | Linea gas limit surplus on Sepolia | 6000 |
|
||||
| NEXT_PUBLIC_SEPOLIA_PROFIT_MARGIN | Linea profit margin on Sepolia | 2 |
|
||||
| NEXT_PUBLIC_SEPOLIA_TOKEN_LIST | Linea Token list on Sepolia | https://raw.githubusercontent.com/Consensys/linea-token-list/main/json/linea-sepolia-token-shortlist.json |
|
||||
| | | |
|
||||
| NEXT_PUBLIC_WALLET_CONNECT_ID | Wallet Connect Api Key | |
|
||||
| NEXT_PUBLIC_INFURA_ID | Infura API Key | |
|
||||
| E2E_TEST_PRIVATE_KEY | Private key to execute e2e on Sepolia | |
|
||||
| NEXT_PUBLIC_STORAGE_MIN_VERSION | Local storage version for reseting the storage | 0.4.14 |
|
||||
|
||||
## About
|
||||
|
||||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||
598
bridge-ui/RELEASE-NOTES.md
Normal file
@@ -0,0 +1,598 @@
|
||||
<a name="v0.6.5"></a>
|
||||
|
||||
# [v0.6.5] - 30 May 2024
|
||||
|
||||
# Fix: ETH and USDC history fetching issue
|
||||
|
||||
Description:
|
||||
- Fix ETH and USDC history fetching issue
|
||||
|
||||
Technical implementation:
|
||||
- [PR](https://github.com/Consensys/zkevm-monorepo/pull/3328)
|
||||
|
||||
[Changes][v0.6.5]
|
||||
|
||||
<a name="v0.6.4"></a>
|
||||
|
||||
# [v0.6.4] - 24 May 2024
|
||||
|
||||
# Feat: Add claim message as a recipient feature
|
||||
|
||||
Description:
|
||||
- Add claim message as a recipient feature
|
||||
|
||||
Technical implementation:
|
||||
- [PR](https://github.com/Consensys/zkevm-monorepo/pull/3132)
|
||||
|
||||
[Changes][v0.6.4]
|
||||
|
||||
<a name="v0.6.3"></a>
|
||||
|
||||
# [v0.6.3] - 15 May 2024
|
||||
|
||||
# Fix: Update shortcuts doc url and description
|
||||
|
||||
Description:
|
||||
- Update shortcuts doc url
|
||||
- Update shortcuts description
|
||||
|
||||
Technical implementation:
|
||||
- [PR](https://github.com/Consensys/zkevm-monorepo/pull/3220)
|
||||
|
||||
[Changes][v0.6.3]
|
||||
|
||||
<a name="v0.6.2"></a>
|
||||
|
||||
# [v0.6.2] - 14 May 2024
|
||||
|
||||
# Fix: Enable shortcuts for easy bridging and update third party bridges link
|
||||
|
||||
Description:
|
||||
- Update link for third party bridges on the landing page to https://linea.build/apps?types=bridge
|
||||
- Enable shortcuts for easy bridging from L1 -> Linea
|
||||
|
||||
Technical implementation:
|
||||
- [PR for third party bridges](https://github.com/Consensys/zkevm-monorepo/pull/3116)
|
||||
- [PR to enable shortcuts](https://github.com/Consensys/zkevm-monorepo/pull/2883)
|
||||
|
||||
[Changes][v0.6.2]
|
||||
|
||||
<a name="v0.6.1"></a>
|
||||
|
||||
# [v0.6.1] - 9 Apr 2024
|
||||
|
||||
# Fix: ERC20 abi approve function return types to support USDT
|
||||
|
||||
Description:
|
||||
- Fix ERC20 abi approve function return types to support USDT
|
||||
|
||||
Technical implementation:
|
||||
[PR](https://github.com/Consensys/zkevm-monorepo/pull/2932)
|
||||
|
||||
[Changes][v0.6.1]
|
||||
|
||||
<a name="v0.6.0"></a>
|
||||
|
||||
# [v0.6.0] - 21 Mar 2024
|
||||
|
||||
# Feat: Switch to Linea Sepolia testnet
|
||||
|
||||
Description:
|
||||
- Add support for Linea Sepolia testnet
|
||||
- Remove support for Linea Goerli testnet
|
||||
|
||||
Technical implementation:
|
||||
[PR](https://github.com/Consensys/zkevm-monorepo/pull/2735)
|
||||
|
||||
[Changes][v0.6.0]
|
||||
|
||||
<a name="v0.5.4"></a>
|
||||
|
||||
# [v0.5.4] - 14 Feb 2024
|
||||
|
||||
# Feat: Update Linea SDK to v0.2.1
|
||||
|
||||
Description:
|
||||
To support the new claiming method, the Linea SDK has been updated to v0.2.1
|
||||
|
||||
[Changes][v0.5.4]
|
||||
|
||||
<a name="v0.5.3"></a>
|
||||
|
||||
# [v0.5.3] - 12 Jan 2024
|
||||
|
||||
# Feat: Switch from WalletConnect Modal to Web3Modal
|
||||
|
||||
Description:
|
||||
Use Web3Modal as the connector's wrapper to connect to a wallet instead of WalletConnect Modal
|
||||
|
||||
# Chore: Use latest message service sdk
|
||||
|
||||
Description:
|
||||
The message service sdk has been updated to take into consideration the changes regarding the way the messages are anchored from L2 to L1.
|
||||
|
||||
[Changes][v0.5.3]
|
||||
|
||||
<a name="v0.5.2"></a>
|
||||
|
||||
# [v0.5.2] - 15 Dec 2023
|
||||
|
||||
# Fix: MMM redirection infinite loop
|
||||
|
||||
Description:
|
||||
Metamask connect for in the mobile app redirects the user indefinitely to the MM app
|
||||
|
||||
[Changes][v0.5.2]
|
||||
|
||||
<a name="v0.5.1"></a>
|
||||
|
||||
# [v0.5.1] - 08 Dec 2023
|
||||
|
||||
# Feat: Add GetFeeback button
|
||||
|
||||
Description:
|
||||
Add the "Get feedback" button to the home page
|
||||
|
||||
# Fix: Referrer
|
||||
|
||||
Description:
|
||||
Allow referrer when opening Metamask Portfolio
|
||||
|
||||
[Changes][v0.5.1]
|
||||
|
||||
<a name="v0.5.0"></a>
|
||||
|
||||
# [v0.5.0] - 01 Dec 2023
|
||||
|
||||
# Fix: Redirect user to Metamask mobile when on mobile
|
||||
|
||||
Description:
|
||||
When browsing bridge UI on a mobile's browser, the user could not connect to Metamask.
|
||||
|
||||
# Fix: Transactions mix-up
|
||||
|
||||
Description:
|
||||
Fix transactions being merged in storage for 2 different accounts when switching accounts.
|
||||
|
||||
# Fix: Wrong error message when switching network
|
||||
|
||||
Description:
|
||||
An error message was being displayed after a transaction was successful if the user switched network while the transaction was loading.
|
||||
|
||||
# Improvement: Remove Default token list from user's storage
|
||||
|
||||
Description:
|
||||
The user's custom tokens and default token list were merged in the user's local storage, there are now merged in the user's state and only the user's custom tokens are kept in storage. The default token list will be refresh every time the user refreshes.
|
||||
|
||||
<a name="v0.4.14"></a>
|
||||
|
||||
# [v0.4.14] - 23 Nov 2023
|
||||
|
||||
# Feature: Implement Linea's Official Token List
|
||||
|
||||
Description:
|
||||
This feature replaces the default token configuration by incorporating the official token list from https://github.com/Consensys/linea-token-list.
|
||||
|
||||
Technical Implementation:
|
||||
The Goerli and Mainnet JSON token lists are fetched from the GitHub repository and added to the user's storage, alongside any custom tokens added by the user.
|
||||
|
||||
# Feature: Introduce Landing Page for Bridge Selection
|
||||
|
||||
Description:
|
||||
This update enhances the Linea Bridge user interface by directing users to the MM Bridge in their Portfolio.
|
||||
|
||||
Technical Implementation:
|
||||
The marketing team has implemented this feature, adding a user interface context where the bridge options are displayed.
|
||||
|
||||
# Fix: Enable Addition of Tokens with Identical Addresses on Both Layers
|
||||
|
||||
Description:
|
||||
Previously, users encountered an issue when attempting to add a token that shared the same address on both layers, making it impossible to add the token.
|
||||
|
||||
Technical Implementation:
|
||||
Now, when searching for a custom token input by the user, the system will prioritize the current layer to which the user is connected.
|
||||
|
||||
# Fix: Address Issue of Null Balance Display for Certain Tokens
|
||||
|
||||
Description:
|
||||
There was an issue where tokens, automatically added by fetching the user's transactions, sometimes lacked the token's address for one of the layers, resulting in a null balance display for that layer.
|
||||
|
||||
Technical Implementation:
|
||||
Now, when fetching a custom token, the user interface will always search for the token's address on both layers if it is unknown.
|
||||
|
||||
# Fix: Correct Execution Fee Error Message
|
||||
|
||||
Description:
|
||||
Previously, when a user connected to layer A (with 0 ETH) attempted to initiate a bridge transaction from layer B (where they had some ETH), they received an error message stating insufficient funds for execution fees, even though they had sufficient funds.
|
||||
|
||||
Technical Implementation:
|
||||
The system now fetches the user's balance from the chain where the user intends to initiate the bridge, rather than the one connected to in their wallet.
|
||||
|
||||
<a name="v0.4.6"></a>
|
||||
|
||||
# [v0.4.6] - 14 Sep 2023
|
||||
|
||||
- remove Max button for ETH
|
||||
|
||||
<a name="v0.4.5"></a>
|
||||
|
||||
# [v0.4.5] - 14 Sep 2023
|
||||
|
||||
- add unit tests
|
||||
- fix Max bug
|
||||
|
||||
<a name="v0.4.1"></a>
|
||||
|
||||
# [v0.4.1] - 21 Aug 2023
|
||||
|
||||
- Add tutorial video in the first popup
|
||||
- Add Tutorial link in the footer
|
||||
|
||||
<a name="v0.4.0"></a>
|
||||
|
||||
# [v0.4.0] - 16 Aug 2023
|
||||
|
||||
# Feat: Display error message when exceeding daily withdrawal limit
|
||||
|
||||
Description:
|
||||
There is a 1000 ETH daily withdrawal limit from Linea to L1 that triggers an error that needed to be displayed to the user.
|
||||
|
||||
Fix:
|
||||
Display a toast error message.
|
||||
|
||||
Technical implementation:
|
||||
Added an error handler for errors coming from viem when simulating or executing contract calls.
|
||||
|
||||
# Feat: Display error message when trying to bridge a reserved token
|
||||
|
||||
Description:
|
||||
Some tokens are reserved and not bridgable, an error message needed to be added.
|
||||
|
||||
Fix:
|
||||
Display a toast error message.
|
||||
|
||||
# Fix: Typo in automatic claiming tooltip
|
||||
|
||||
Description:
|
||||
Changed text to :
|
||||
"Automatic bridging: this fee is used to reimburse gas fees paid by the postman to execute for you the transaction on your behalf on the other chain. If gas fees are lower than the execution fees, the remaining amount will be reimbursed to the recipient address on the other chain."
|
||||
# Feat: Change wording of clear history button
|
||||
|
||||
Description:
|
||||
Changed "clear history" button to "Reload history"
|
||||
|
||||
# Fix: Max button issue
|
||||
|
||||
Description:
|
||||
When clicking "max" and then clicking "start bridging," the page does not respond at all.
|
||||
|
||||
Fix:
|
||||
Disable bridge button when amount + fees > user balance
|
||||
|
||||
Technical implementation:
|
||||
Added fees in the form state to be retrieved in the amount checks.
|
||||
|
||||
# Fix: Claim button stays active while a claiming transaction is ongoing
|
||||
|
||||
Description:
|
||||
Issue occurs when the ‘Claim Funds’ button is clicked and while the tx is processing, the user clicks again and another popup is displayed showing pending transaction incomplete.
|
||||
|
||||
Fix:
|
||||
Disable claim button when a claim transaction is already ongoing for the same message hash
|
||||
|
||||
# Fix: Token list balances not updated properly
|
||||
|
||||
Description:
|
||||
When claiming funds, the token list balance doesn't update but the balance on the homepage updates.
|
||||
|
||||
Technical implementation:
|
||||
Used the same useBalance hook from wagmi being used in the form page for the token list balances.
|
||||
|
||||
# Feat: Add wstETH token
|
||||
|
||||
Description:
|
||||
Add a new token to the default token list: wstETH
|
||||
|
||||
<a name="v0.3.14"></a>
|
||||
|
||||
# [v0.3.14] - 09 Aug 2023
|
||||
|
||||
### Show new tokens in the config
|
||||
|
||||
### Technical Implementation
|
||||
|
||||
- Modified token list in config
|
||||
- Fix storing new token added to the config list
|
||||
|
||||
<a name="v0.3.13"></a>
|
||||
|
||||
# [v0.3.13] - 05 Aug 2023
|
||||
|
||||
### Support non standard ERC20 tokens
|
||||
|
||||
- Add support for non standard erc20 approve method (ex: USDT)
|
||||
|
||||
### Technical Implementation
|
||||
|
||||
- Updated abi used to call the method approve
|
||||
|
||||
<a name="v0.3.12"></a>
|
||||
|
||||
# [v0.3.12] - 04 Aug 2023
|
||||
|
||||
Prod release version
|
||||
|
||||
## Technical implementation
|
||||
|
||||
Just a bump version on `package.json`
|
||||
|
||||
<a name="v0.3.11"></a>
|
||||
|
||||
# [v0.3.11] - 04 Aug 2023
|
||||
|
||||
# Bug: Token with address 0x000000
|
||||
|
||||
Description:
|
||||
Some Tokens on the other layer have a zero address, so it links to the explorer with zero address.
|
||||
|
||||
Fix:
|
||||
No link when token has zero address.
|
||||
|
||||
Technical implementation:
|
||||
compare to const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000";
|
||||
didn't found the equivalent to AddressZero (ethers) with wagmi/viem
|
||||
|
||||
# Feat: Simplify message
|
||||
|
||||
Description:
|
||||
While waiting for bridging, the message was: `Waiting for the transaction to reach Linea Goerli Testnet`
|
||||
Now it is: `Please wait, your funds are being bridged`
|
||||
|
||||
# Feat: History item UI changes
|
||||
|
||||
Description:
|
||||
|
||||
- display amount, from token, to token, to address on the same line
|
||||
- add from layer transaction address + explorer link
|
||||
- add an explorer link to destination address
|
||||
|
||||
# Bug: wrong selected token when switch network
|
||||
|
||||
Description:
|
||||
Does not keep the right selected token when switching network
|
||||
|
||||
Fix:
|
||||
Token is reseting when switching network
|
||||
|
||||
Technical implementation:
|
||||
The reset was done on the switch network in the form, but not the header. New method `resetToken` in the chain context, called in both place.
|
||||
|
||||
<a name="v0.3.9"></a>
|
||||
|
||||
# [v0.3.9] - 03 Aug 2023
|
||||
|
||||
# Bug: wbtc decimals
|
||||
|
||||
## Description:
|
||||
|
||||
WBTC decimals were 18, but is it 8
|
||||
|
||||
## Fix:
|
||||
|
||||
Change decimals to 8
|
||||
|
||||
<a name="v0.3.8"></a>
|
||||
|
||||
# [v0.3.8] - 03 Aug 2023
|
||||
|
||||
# Bug: Explorer
|
||||
|
||||
## Description
|
||||
|
||||
For mainnet explorer was blockscout instead of Etherscan
|
||||
|
||||
## Fix
|
||||
|
||||
Replace the link with Etherscan
|
||||
|
||||
## Technical implementation
|
||||
|
||||
in bridge-ui/src/customChains/index.ts, change blockExplorers with "https://lineascan.build/"
|
||||
|
||||
# Feat: USDC
|
||||
|
||||
## Description
|
||||
|
||||
Add USDC smart contracts for Mainnet
|
||||
|
||||
## Technical implementation
|
||||
|
||||
{
|
||||
"mainnet": {
|
||||
"L1MessageService": "0xd19d4B5d358258f05D7B411E21A1460D11B0876F",
|
||||
"FiatTokenV2_1": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
||||
"L1USDCBridge": "0x504A330327A089d8364C4ab3811Ee26976d388ce"
|
||||
},
|
||||
"linea": {
|
||||
"L2MessageService": "0x508Ca82Df566dCD1B0DE8296e70a96332cD644ec",
|
||||
"FiatTokenV2_1": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
|
||||
"L2USDCBridge": "0xA2Ee6Fce4ACB62D95448729cDb781e3BEb62504A"
|
||||
}
|
||||
}
|
||||
|
||||
# Feat: update packages
|
||||
|
||||
## Description
|
||||
|
||||
Update the project packages dependencies.
|
||||
|
||||
## Technical implementation
|
||||
|
||||
run npm outdated and update accordingly
|
||||
|
||||
<a name="v0.3.7"></a>
|
||||
|
||||
# [v0.3.7] - 03 Aug 2023
|
||||
|
||||
# Feature
|
||||
|
||||
## Description
|
||||
|
||||
Add the Mainnet token bridge addresses in config
|
||||
L1: 0x051F1D88f0aF5763fB888eC4378b4D8B29ea3319
|
||||
L2: 0x353012dc4a9A6cF55c941bADC267f82004A8ceB9
|
||||
|
||||
<a name="v0.3.6"></a>
|
||||
|
||||
# [v0.3.6] - 03 Aug 2023
|
||||
|
||||
# Feature:
|
||||
|
||||
## Description:
|
||||
|
||||
The history is refreshing once every 2 blocks. So:
|
||||
|
||||
when a bridge transaction is successful, it can take from 1 to 24 seconds to appear in the history.
|
||||
when clearing the history, it can take from 1 to 24 seconds to start reconstructing
|
||||
This feature is refreshing the history just after a successful transaction or clearing history, so the delay is minimized.
|
||||
|
||||
## Technical implementation:
|
||||
|
||||
fetchNext() is called after clearing and when a transaction is onSuccess()
|
||||
|
||||
# Feature:
|
||||
|
||||
## Description:
|
||||
|
||||
Readme technical documentation for deployment. Explains how to deploy the Bruidge ui on prod.
|
||||
|
||||
# Feature:
|
||||
|
||||
## Description:
|
||||
|
||||
When a user send a manual transaction, the transaction is loading, until displaying the loading button.
|
||||
Not displaying a Claim button directly can lead to confusion for users.
|
||||
The goal of the feature is to add a disabled Claim button for manual transaction while it is processing, to display to the user the action will be available soon.
|
||||
|
||||
## Technical implementation:
|
||||
|
||||
We check the message. if (message.fee === "0") { means it is manual so we display a Disabled button while the transaction is processing.
|
||||
|
||||
<a name="v0.3.5"></a>
|
||||
|
||||
# [v0.3.5] - 02 Aug 2023
|
||||
|
||||
**Bug:**
|
||||
Little regression on 0.3.4, when adding a new token address, it was not possible to store it.
|
||||
|
||||
**Fix:**
|
||||
A condition has been modified, it is possible to add new token on your list.
|
||||
|
||||
**Technical implementation:**
|
||||
There was a wrong condition, we replaced `||` with `&&`
|
||||
|
||||
<a name="v0.3.4"></a>
|
||||
|
||||
# [v0.3.4] - 02 Aug 2023
|
||||
|
||||
# Feature
|
||||
|
||||
Display transactions even though the token involved is not in the user's token list
|
||||
Fetches the tokens that are not in the user's token list from the transaction history and add them in the list automatically
|
||||
Triggers a transaction history's reload when clicking on "Clear history"
|
||||
Example of token:
|
||||
UNI on goerli: 0x41E5E6045f91B61AACC99edca0967D518fB44CFB
|
||||
|
||||
# Bug
|
||||
|
||||
Bug: when you have a transaction pending, button is loading. If you change account the button is still loading waiting for the success of the other account transaction. It should reset the button state for the new account.
|
||||
|
||||
Fix: when you have an approval transaction or bridge transaction loading, and you switch account, the button goes back to not loading.
|
||||
|
||||
Technical implementation:
|
||||
adding a useEffect on address, so everytime the address is changing, it reset the hash used by useWaitForTransaction, and it stops loading.
|
||||
|
||||
<a name="v0.3.3.1"></a>
|
||||
|
||||
# [v0.3.3] - 01 Aug 2023
|
||||
|
||||
<a name="v0.3.3"></a>
|
||||
|
||||
# [v0.3.3] - 01 Aug 2023
|
||||
|
||||
# High Level Description:
|
||||
|
||||
## Wait one minute before displaying claim button on L1 -> L2 bridge transactions
|
||||
|
||||
**Bug:** for a few seconds it shows the Claim button for automatic bridge.
|
||||
|
||||
When a bridge transaction has just been anchored on the other layer, there is a more or less one minute state where the transaction is CLAIMABLE even for automatic.
|
||||
|
||||
The goal of this feature, is to wait 5 blocks before showing the claim button. It will prevent user that used automatic claim, to temporary see the claim button appearing.
|
||||
|
||||
## Testing
|
||||
|
||||
Hard to be tested for non developers. Users should not complain anymore about seeing the claim button on Automatic Transactions.
|
||||
|
||||
# Technical Description:
|
||||
|
||||
When the transactions are retrieved, and the messages from SDK have been set.
|
||||
|
||||
Get the last 5 blocks of LINEA, and get L1L2MessageHashesAddedToInbox events. It returns the messageHash that have just been anchored.
|
||||
If these messageHashes are also in the user transaction list, there transactions should not be claimable yet.
|
||||
|
||||
## Testing
|
||||
|
||||
Only dev can test easily, in useFetchAnchoringEvents
|
||||
Replace BLOCK_LIMIT with
|
||||
const BLOCK_LIMIT = BigInt(5000);
|
||||
and L1 L2 Transactions should go back to loading
|
||||
|
||||
<a name="v0.3.2.1"></a>
|
||||
|
||||
# [v0.3.2] - 01 Aug 2023
|
||||
|
||||
<a name="v0.3.2"></a>
|
||||
|
||||
# [v0.3.2] - 01 Aug 2023
|
||||
|
||||
- New history system for ETH, ERC20 and USDC
|
||||
- Retrieve the bridged token address
|
||||
|
||||
<a name="v0.1.17"></a>
|
||||
|
||||
# [v0.1.17] - 12 Jul 2023
|
||||
|
||||
Fix:
|
||||
|
||||
- Form resets when switching network
|
||||
- Popup message "Token Bridging failed"
|
||||
- Blue picto for testnet
|
||||
|
||||
<a name="v0.1.14"></a>
|
||||
|
||||
# [v0.1.14] - 12 Jul 2023
|
||||
|
||||
- Linea Mainnet alpha release
|
||||
|
||||
<a name="v0.1.13"></a>
|
||||
|
||||
# [v0.1.13] - 12 Jul 2023
|
||||
|
||||
- Mainnet alpha release
|
||||
|
||||
<a name="v0.1.12"></a>
|
||||
|
||||
# [v0.1.12] - 11 Jul 2023
|
||||
|
||||
<a name="v0.1.11"></a>
|
||||
|
||||
# [v0.1.11] - 11 Jul 2023
|
||||
|
||||
<a name="v0.0.2"></a>
|
||||
|
||||
# [v0.0.2] - 27 Jun 2023
|
||||
|
||||
<a name="v0.0.1"></a>
|
||||
|
||||
# [v0.0.1] - 27 Jun 2023
|
||||
12
bridge-ui/environment.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
declare global {
|
||||
namespace NodeJS {
|
||||
interface ProcessEnv {
|
||||
E2E_TEST_SEED_PHRASE: string;
|
||||
E2E_TEST_PRIVATE_KEY: string;
|
||||
E2E_TEST_WALLET_PASSWORD: string;
|
||||
NEXT_PUBLIC_INFURA_ID: string;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
42
bridge-ui/next.config.mjs
Normal file
@@ -0,0 +1,42 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: "standalone",
|
||||
reactStrictMode: true,
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "s2.coinmarketcap.com",
|
||||
pathname: "/static/img/coins/64x64/**",
|
||||
},
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "assets.coingecko.com",
|
||||
pathname: "/coins/images/**",
|
||||
},
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "coin-images.coingecko.com",
|
||||
pathname: "/coins/images/**",
|
||||
},
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "storage.googleapis.com",
|
||||
pathname: "/public.withstable.com/logos/**",
|
||||
},
|
||||
],
|
||||
},
|
||||
webpack: (config) => {
|
||||
const warning = [...(config.ignoreWarnings || []), { module: /typeorm/ }];
|
||||
|
||||
config.ignoreWarnings = warning;
|
||||
|
||||
config.resolve.fallback = {
|
||||
fs: false,
|
||||
};
|
||||
config.externals.push("pino-pretty", "lokijs", "encoding");
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
66
bridge-ui/package.json
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"name": "bridge-ui",
|
||||
"version": "0.6.5",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"lint:fix": "next lint --fix",
|
||||
"clean": "rimraf node_modules .next .next-env.d.ts",
|
||||
"install:playwright": "playwright install --with-deps",
|
||||
"build:cache": "synpress",
|
||||
"build:cache:force": "synpress --force",
|
||||
"build:cache:headless": "synpress --headless",
|
||||
"test:e2e:headful": "playwright test",
|
||||
"test:e2e:headless": "HEADLESS=true playwright test",
|
||||
"test:e2e:headless:ui": "HEADLESS=true playwright test --ui"
|
||||
},
|
||||
"dependencies": {
|
||||
"@consensys/linea-sdk": "0.3.0",
|
||||
"@headlessui/react": "2.1.2",
|
||||
"@tanstack/react-query": "5.51.11",
|
||||
"@wagmi/connectors": "5.1.0",
|
||||
"@wagmi/core": "2.13.0",
|
||||
"@web3modal/wagmi": "5.0.8",
|
||||
"axios": "1.7.2",
|
||||
"classnames": "2.5.1",
|
||||
"compare-versions": "6.1.1",
|
||||
"date-fns": "3.6.0",
|
||||
"framer-motion": "11.3.17",
|
||||
"gray-matter": "4.0.3",
|
||||
"joi": "17.13.3",
|
||||
"loglevel": "1.9.1",
|
||||
"next": "14.2.5",
|
||||
"next-seo": "6.5.0",
|
||||
"pino-pretty": "11.2.1",
|
||||
"react": "18.3.1",
|
||||
"react-device-detect": "2.2.3",
|
||||
"react-dom": "18.3.1",
|
||||
"react-hook-form": "7.52.1",
|
||||
"react-icons": "5.2.1",
|
||||
"react-toastify": "10.0.5",
|
||||
"sharp": "0.33.4",
|
||||
"swiper": "11.1.7",
|
||||
"viem": "2.18.0",
|
||||
"wagmi": "2.12.0",
|
||||
"zustand": "4.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "1.45.3",
|
||||
"@synthetixio/synpress": "4.0.0-alpha.7",
|
||||
"@types/fs-extra": "11.0.4",
|
||||
"@types/react": "18.3.3",
|
||||
"@types/react-dom": "18.3.0",
|
||||
"autoprefixer": "10.4.19",
|
||||
"daisyui": "4.12.10",
|
||||
"dotenv": "16.4.5",
|
||||
"eslint-config-next": "14.2.5",
|
||||
"eslint-plugin-tailwindcss": "3.17.4",
|
||||
"postcss": "8.4.40",
|
||||
"tailwind-scrollbar": "3.1.0",
|
||||
"tailwindcss": "3.4.7"
|
||||
}
|
||||
}
|
||||
27
bridge-ui/playwright.config.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { defineConfig, devices } from "@playwright/test";
|
||||
|
||||
export default defineConfig({
|
||||
testDir: "./test/e2e",
|
||||
timeout: 60_000,
|
||||
fullyParallel: true,
|
||||
maxFailures: process.env.CI ? 1 : 0,
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
reporter: process.env.CI
|
||||
? [['html', { open: 'never', outputFolder: `playwright-report-${process.env.HEADLESS ? 'headless' : 'headful'}` }]]
|
||||
: 'html',
|
||||
use: {
|
||||
baseURL: "http://localhost:3000",
|
||||
trace: process.env.CI ? 'on' : 'retain-on-failure'
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: "chromium",
|
||||
use: { ...devices["Desktop Chrome"] },
|
||||
},
|
||||
],
|
||||
webServer: {
|
||||
command: "pnpm run start",
|
||||
url: "http://localhost:3000",
|
||||
reuseExistingServer: true,
|
||||
},
|
||||
});
|
||||
9
bridge-ui/postcss.config.mjs
Normal file
@@ -0,0 +1,9 @@
|
||||
/** @type {import('postcss-load-config').Config} */
|
||||
const config = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
BIN
bridge-ui/public/bridge_bg.png
Normal file
15
bridge-ui/public/images/logo/across.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_221_68)">
|
||||
<path
|
||||
d="M16.4547 8.33203C16.4547 3.91375 12.873 0.332031 8.45471 0.332031C4.03643 0.332031 0.454712 3.91375 0.454712 8.33203C0.454712 12.7503 4.03643 16.332 8.45471 16.332C12.873 16.332 16.4547 12.7503 16.4547 8.33203Z"
|
||||
fill="#6CF9D8" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M3.92987 4.54185L4.70952 3.76221L7.82517 6.87786C7.63608 6.95843 7.45894 7.07584 7.30469 7.23009C7.18523 7.34955 7.08787 7.48273 7.0126 7.62457L3.92987 4.54185ZM6.95389 9.05187L3.88379 12.1219L4.66343 12.9016L7.70229 9.86275C7.55929 9.78726 7.42503 9.68934 7.30469 9.56901C7.15135 9.41567 7.03442 9.23971 6.95389 9.05187ZM9.24913 9.86111L12.246 12.858L13.0257 12.0784L9.99585 9.04854C9.91528 9.23763 9.79787 9.41476 9.64362 9.56901C9.52416 9.68847 9.39097 9.78584 9.24913 9.86111ZM9.93736 7.62768L12.9796 4.58544L12.2 3.8058L9.12648 6.87928C9.31432 6.95981 9.49028 7.07675 9.64362 7.23009C9.76395 7.35042 9.86187 7.48468 9.93736 7.62768Z"
|
||||
fill="#2D2E33" />
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_221_68">
|
||||
<rect width="16" height="16" fill="white" transform="translate(0.454712 0.332031)" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
21
bridge-ui/public/images/logo/ethereum.svg
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Creator: CorelDRAW 2019 (64-Bit) -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="100%" height="100%" version="1.1" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd"
|
||||
viewBox="0 0 784.37 1277.39"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xodm="http://www.corel.com/coreldraw/odm/2003">
|
||||
<g id="Layer_x0020_1">
|
||||
<metadata id="CorelCorpID_0Corel-Layer"/>
|
||||
<g id="_1421394342400">
|
||||
<g>
|
||||
<polygon fill="#343434" fill-rule="nonzero" points="392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 "/>
|
||||
<polygon fill="#8C8C8C" fill-rule="nonzero" points="392.07,0 -0,650.54 392.07,882.29 392.07,472.33 "/>
|
||||
<polygon fill="#3C3C3B" fill-rule="nonzero" points="392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 "/>
|
||||
<polygon fill="#8C8C8C" fill-rule="nonzero" points="392.07,1277.38 392.07,956.52 -0,724.89 "/>
|
||||
<polygon fill="#141414" fill-rule="nonzero" points="392.07,882.29 784.13,650.54 392.07,472.33 "/>
|
||||
<polygon fill="#393939" fill-rule="nonzero" points="0,650.54 392.07,882.29 392.07,472.33 "/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
8
bridge-ui/public/images/logo/lido.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg width="89" height="20" viewBox="0 0 89 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M27.1699 4.09375H29.4199V13.75H34.9512V15.9062H27.1699V4.09375Z" fill="white"></path>
|
||||
<path d="M44.7867 4.09375H47.0367V15.9062H44.7867V4.09375Z" fill="white"></path>
|
||||
<path d="M57.8075 4.09375H61.5575C62.3325 4.09375 63.07 4.25625 63.77 4.58125C64.47 4.89375 65.0888 5.31875 65.6263 5.85625C66.1638 6.39375 66.5888 7.01875 66.9013 7.73125C67.2138 8.44375 67.37 9.2 67.37 10C67.37 10.8 67.2138 11.5562 66.9013 12.2688C66.5888 12.9812 66.1638 13.6063 65.6263 14.1438C65.0888 14.6813 64.47 15.1125 63.77 15.4375C63.07 15.75 62.3325 15.9062 61.5575 15.9062H57.8075V4.09375ZM61.5575 13.75C62.02 13.75 62.4638 13.65 62.8888 13.45C63.3263 13.25 63.7075 12.9812 64.0325 12.6438C64.37 12.3062 64.6325 11.9125 64.82 11.4625C65.02 11 65.12 10.5125 65.12 10C65.12 9.4875 65.02 9.00625 64.82 8.55625C64.6325 8.09375 64.37 7.69375 64.0325 7.35625C63.7075 7.01875 63.3263 6.75 62.8888 6.55C62.4638 6.35 62.02 6.25 61.5575 6.25H60.0575V13.75H61.5575Z" fill="white"></path>
|
||||
<path d="M82.5559 16C81.7809 16 81.0434 15.85 80.3434 15.55C79.6559 15.2375 79.0496 14.8125 78.5246 14.275C78.0121 13.725 77.5997 13.0875 77.2872 12.3625C76.9872 11.6375 76.8372 10.85 76.8372 10C76.8372 9.1625 76.9872 8.38125 77.2872 7.65625C77.5997 6.91875 78.0121 6.28125 78.5246 5.74375C79.0496 5.19375 79.6559 4.76875 80.3434 4.46875C81.0434 4.15625 81.7809 4 82.5559 4C83.3309 4 84.0622 4.15625 84.7497 4.46875C85.4497 4.76875 86.0559 5.19375 86.5684 5.74375C87.0934 6.28125 87.5059 6.91875 87.8059 7.65625C88.1184 8.38125 88.2746 9.1625 88.2746 10C88.2746 10.85 88.1184 11.6375 87.8059 12.3625C87.5059 13.0875 87.0934 13.725 86.5684 14.275C86.0559 14.8125 85.4497 15.2375 84.7497 15.55C84.0622 15.85 83.3309 16 82.5559 16ZM82.5559 13.8438C83.0184 13.8438 83.4622 13.75 83.8871 13.5625C84.3121 13.375 84.6809 13.1125 84.9934 12.775C85.3059 12.425 85.5559 12.0188 85.7434 11.5563C85.9309 11.0812 86.0247 10.5625 86.0247 10C86.0247 9.4375 85.9309 8.925 85.7434 8.4625C85.5559 7.9875 85.3059 7.58125 84.9934 7.24375C84.6809 6.89375 84.3121 6.625 83.8871 6.4375C83.4622 6.25 83.0184 6.15625 82.5559 6.15625C82.0809 6.15625 81.6309 6.25 81.2059 6.4375C80.7934 6.625 80.4309 6.89375 80.1184 7.24375C79.8059 7.58125 79.5559 7.9875 79.3684 8.4625C79.1809 8.925 79.0872 9.4375 79.0872 10C79.0872 10.5625 79.1809 11.0812 79.3684 11.5563C79.5559 12.0188 79.8059 12.425 80.1184 12.775C80.4309 13.1125 80.7934 13.375 81.2059 13.5625C81.6309 13.75 82.0809 13.8438 82.5559 13.8438Z" fill="white"></path>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.00529 0L11.954 7.74771L7.00502 10.6324L2.05668 7.74763L7.00529 0ZM3.57156 7.38126L7.00529 2.00535L10.439 7.38128L7.00506 9.3829L3.57156 7.38126Z" fill="white"></path>
|
||||
<path d="M6.99796 12.3353L1.25737 8.98872L1.1006 9.23415C-0.667488 12.0023 -0.272613 15.6276 2.04997 17.9502C4.78308 20.6833 9.21433 20.6833 11.9474 17.9502C14.27 15.6276 14.6649 12.0023 12.8968 9.23415L12.74 8.98865L6.9982 12.3355L6.99796 12.3353Z" fill="white"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
8
bridge-ui/public/images/logo/linea-logo.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg width="111" height="32" viewBox="0 0 111 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M29.203 31.3185H24.6514V9.1693H29.203V31.3185Z" fill="white"/>
|
||||
<path d="M45.6496 8.7345C48.1623 8.7345 50.2149 9.61552 51.8054 11.3776C53.3935 13.1396 54.1899 15.38 54.1899 18.0963V31.3162H49.6383V18.7896C49.6383 17.0848 49.0891 15.6752 47.9906 14.563C46.8922 13.4509 45.5352 12.8948 43.9173 12.8948C42.0958 12.8948 40.6083 13.4509 39.4527 14.563C38.2971 15.6752 37.7181 17.0848 37.7181 18.7896V31.3162H33.1665V9.16929H37.7181V14.8902C38.3245 12.984 39.3291 11.4806 40.7319 10.3821C42.1324 9.28371 43.7732 8.7345 45.6519 8.7345H45.6496Z" fill="white"/>
|
||||
<path d="M68.3801 8.7345C71.934 8.7345 74.8242 10.0068 77.0485 12.5492C79.2728 15.0939 80.1836 18.1695 79.7786 21.7828H61.444C61.7621 23.5747 62.5859 25.0278 63.9155 26.1399C65.245 27.2521 66.8469 27.8082 68.7257 27.8082C70.1696 27.8082 71.4626 27.4535 72.6045 26.7463C73.7464 26.0392 74.6343 25.0781 75.2704 23.863L79.0852 25.5541C78.1035 27.4329 76.7007 28.934 74.8814 30.0622C73.0622 31.1904 70.966 31.7533 68.5952 31.7533C65.2725 31.7533 62.483 30.6549 60.2289 28.4603C57.9749 26.2658 56.8467 23.5335 56.8467 20.2679C56.8467 17.0024 57.952 14.2655 60.1625 12.0527C62.3731 9.84207 65.11 8.73679 68.3778 8.73679L68.3801 8.7345ZM68.3801 12.6797C66.7027 12.6797 65.2519 13.1923 64.023 14.2197C62.7942 15.2449 61.9772 16.5814 61.5745 18.229H75.1858C74.8105 16.5814 74.0073 15.2449 72.7807 14.2197C71.5518 13.1946 70.085 12.6797 68.3801 12.6797Z" fill="white"/>
|
||||
<path d="M92.3625 8.7345C95.0216 8.7345 97.1887 9.42788 98.8637 10.8146C100.539 12.2014 101.379 14.1969 101.379 16.7965V31.3185H96.8271V25.4237C95.4678 29.6434 92.7378 31.7533 88.6347 31.7533C86.7262 31.7533 85.138 31.1835 83.8657 30.0416C82.5934 28.8997 81.9595 27.4054 81.9595 25.5564C81.9595 23.3893 82.7238 21.7623 84.257 20.6798C85.7879 19.5974 87.7399 18.9247 90.1084 18.6638L94.3991 18.229C96.017 18.0848 96.8271 17.3617 96.8271 16.0619C96.8271 14.9932 96.4152 14.1397 95.5914 13.5058C94.7675 12.8696 93.692 12.5515 92.3625 12.5515C91.0329 12.5515 89.8544 12.8994 88.9162 13.5927C87.9779 14.2861 87.3784 15.2976 87.1175 16.6271L82.6094 15.5424C83.0144 13.4623 84.0968 11.8078 85.8612 10.5789C87.6232 9.35236 89.7903 8.73679 92.3625 8.73679V8.7345ZM90.1084 28.0667C91.9872 28.0667 93.5753 27.4374 94.8751 26.1811C96.1749 24.9248 96.8248 23.4579 96.8248 21.7806V20.5677C96.4793 21.1467 95.6394 21.506 94.3099 21.6501L90.1061 22.1696C89.0077 22.316 88.1335 22.6387 87.4836 23.1444C86.8337 23.6502 86.5088 24.3367 86.5088 25.204C86.5088 26.0713 86.8337 26.7647 87.4836 27.2841C88.1335 27.8036 89.0077 28.0645 90.1061 28.0645L90.1084 28.0667Z" fill="white"/>
|
||||
<path d="M21.5165 31.3185H0.493164V9.1693H5.30334V27.0278H21.5165V31.3185Z" fill="white"/>
|
||||
<path d="M105.67 8.7345C108.039 8.7345 109.96 6.81348 109.96 4.44378C109.96 2.07409 108.039 0.153069 105.67 0.153069C103.3 0.153069 101.379 2.07409 101.379 4.44378C101.379 6.81348 103.3 8.7345 105.67 8.7345Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
12
bridge-ui/public/images/logo/linea-mainnet.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<svg width="200" height="208" viewBox="0 0 200 208" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="199.4" height="207.623" fill="#121212"/>
|
||||
<g clip-path="url(#clip0_2303_643)">
|
||||
<path d="M132.369 155.99H49.7001V68.8854H68.6148V139.109H132.369V155.981V155.99Z" fill="white"/>
|
||||
<path d="M132.369 85.7575C141.687 85.7575 149.241 78.2036 149.241 68.8855C149.241 59.5673 141.687 52.0134 132.369 52.0134C123.05 52.0134 115.497 59.5673 115.497 68.8855C115.497 78.2036 123.05 85.7575 132.369 85.7575Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_2303_643">
|
||||
<rect width="99.5407" height="103.977" fill="white" transform="translate(49.7001 52.0134)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 684 B |
12
bridge-ui/public/images/logo/linea-sepolia.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<svg width="200" height="208" viewBox="0 0 200 208" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="199.4" height="207.623" fill="#61DFFF"/>
|
||||
<g clip-path="url(#clip0_2318_291)">
|
||||
<path d="M132.369 155.99H49.7001V68.8854H68.6148V139.109H132.369V155.981V155.99Z" fill="#121212"/>
|
||||
<path d="M132.369 85.7575C141.687 85.7575 149.241 78.2037 149.241 68.8855C149.241 59.5673 141.687 52.0134 132.369 52.0134C123.05 52.0134 115.497 59.5673 115.497 68.8855C115.497 78.2037 123.05 85.7575 132.369 85.7575Z" fill="#121212"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_2318_291">
|
||||
<rect width="99.5407" height="103.977" fill="white" transform="translate(49.7001 52.0134)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 688 B |
9
bridge-ui/public/images/logo/linea.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<svg width="215" height="45" viewBox="0 0 215 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M28.7521 31.3524H24.1938V9.17065H28.7521V31.3524Z" fill="white"/>
|
||||
<path d="M45.2229 8.73523C47.7392 8.73523 49.7949 9.61755 51.3877 11.3822C52.9781 13.1468 53.7757 15.3904 53.7757 18.1107V31.3501H49.2174V18.8051C49.2174 17.0978 48.6674 15.6861 47.5673 14.5723C46.4673 13.4585 45.1083 12.9016 43.488 12.9016C41.6638 12.9016 40.1742 13.4585 39.0168 14.5723C37.8595 15.6861 37.2797 17.0978 37.2797 18.8051V31.3501H32.7214V9.17066H37.2797V14.9C37.887 12.991 38.8931 11.4853 40.2979 10.3853C41.7005 9.28525 43.3437 8.73523 45.2252 8.73523H45.2229Z" fill="white"/>
|
||||
<path d="M67.9867 8.73523C71.5457 8.73523 74.4402 10.0094 76.6678 12.5556C78.8953 15.104 79.8074 18.1841 79.4018 21.8027H61.0404C61.3589 23.5972 62.184 25.0524 63.5155 26.1662C64.847 27.28 66.4512 27.8369 68.3327 27.8369C69.7788 27.8369 71.0736 27.4817 72.2172 26.7735C73.3608 26.0654 74.25 25.1028 74.8871 23.8859L78.7074 25.5795C77.7243 27.461 76.3194 28.9644 74.4975 30.0942C72.6756 31.2241 70.5763 31.7878 68.2021 31.7878C64.8745 31.7878 62.0808 30.6878 59.8235 28.49C57.5661 26.2922 56.4363 23.5559 56.4363 20.2856C56.4363 17.0153 57.5432 14.2744 59.757 12.0583C61.9708 9.84443 64.7118 8.73752 67.9844 8.73752L67.9867 8.73523ZM67.9867 12.6862C66.3068 12.6862 64.8538 13.1995 63.6232 14.2285C62.3925 15.2552 61.5744 16.5936 61.171 18.2437H74.8023C74.4264 16.5936 73.622 15.2552 72.3937 14.2285C71.163 13.2018 69.694 12.6862 67.9867 12.6862Z" fill="white"/>
|
||||
<path d="M92.0042 8.73523C94.6672 8.73523 96.8375 9.42963 98.515 10.8184C100.193 12.2072 101.034 14.2056 101.034 16.809V31.3524H96.4754V25.4489C95.1141 29.6749 92.38 31.7878 88.2709 31.7878C86.3596 31.7878 84.7692 31.2172 83.495 30.0736C82.2207 28.93 81.5859 27.4335 81.5859 25.5818C81.5859 23.4115 82.3514 21.7821 83.8868 20.6981C85.42 19.6141 87.3749 18.9403 89.7468 18.6791L94.0438 18.2437C95.6641 18.0993 96.4754 17.3751 96.4754 16.0734C96.4754 15.0031 96.0629 14.1483 95.2378 13.5135C94.4128 12.8764 93.3357 12.5579 92.0042 12.5579C90.6727 12.5579 89.4924 12.9062 88.5528 13.6006C87.6132 14.295 87.0128 15.3079 86.7515 16.6394L82.2368 15.5532C82.6424 13.47 83.7264 11.813 85.4934 10.5824C87.258 9.354 89.4283 8.73752 92.0042 8.73752V8.73523ZM89.7468 28.0959C91.6283 28.0959 93.2188 27.4656 94.5205 26.2075C95.8222 24.9493 96.4731 23.4803 96.4731 21.8004V20.5858C96.127 21.1656 95.286 21.5254 93.9545 21.6698L89.7445 22.19C88.6445 22.3367 87.7691 22.6598 87.1182 23.1663C86.4673 23.6728 86.1419 24.3603 86.1419 25.2289C86.1419 26.0975 86.4673 26.7918 87.1182 27.3121C87.7691 27.8323 88.6445 28.0936 89.7445 28.0936L89.7468 28.0959Z" fill="white"/>
|
||||
<path d="M21.0542 31.3524H0V9.17065H4.81724V27.0554H21.0542V31.3524Z" fill="white"/>
|
||||
<path d="M105.331 8.73514C107.704 8.73514 109.628 6.8113 109.628 4.43813C109.628 2.06495 107.704 0.141113 105.331 0.141113C102.958 0.141113 101.034 2.06495 101.034 4.43813C101.034 6.8113 102.958 8.73514 105.331 8.73514Z" fill="white"/>
|
||||
<path d="M132.418 19.8254C134.107 19.9731 135.457 20.5324 136.47 21.5032C137.505 22.4528 138.022 23.6769 138.022 25.1753C138.022 26.8214 137.42 28.2037 136.217 29.3222C135.035 30.4407 133.516 31 131.659 31H121.845V8.84069H130.709C132.566 8.84069 134.086 9.39995 135.268 10.5185C136.47 11.637 137.072 13.0193 137.072 14.6654C137.072 16.0161 136.65 17.1452 135.806 18.0526C134.983 18.9601 133.854 19.551 132.418 19.8254ZM130.551 11.025H124.283V18.844H130.551C131.775 18.844 132.777 18.4747 133.558 17.7361C134.339 16.9763 134.729 16.0372 134.729 14.9187C134.729 13.8213 134.339 12.9032 133.558 12.1646C132.777 11.4048 131.775 11.025 130.551 11.025ZM124.283 28.8157H131.374C132.577 28.8157 133.569 28.4359 134.35 27.6761C135.13 26.9164 135.521 25.9878 135.521 24.8904C135.521 23.7718 135.13 22.8433 134.35 22.1046C133.569 21.366 132.577 20.9967 131.374 20.9967H124.283V28.8157ZM143.279 14.982V19.2872C143.827 17.4512 144.672 16.1744 145.811 15.4568C146.972 14.7393 148.302 14.5177 149.8 14.7921V17.103C148.006 16.702 146.465 16.9763 145.178 17.926C143.912 18.8546 143.279 20.163 143.279 21.8514V31H140.905V14.982H143.279ZM151.485 10.2336C151.485 9.79038 151.633 9.42106 151.928 9.1256C152.224 8.83014 152.593 8.68241 153.036 8.68241C153.458 8.68241 153.817 8.83014 154.113 9.1256C154.429 9.42106 154.587 9.79038 154.587 10.2336C154.587 10.6556 154.429 11.0144 154.113 11.3099C153.817 11.6053 153.458 11.7531 153.036 11.7531C152.593 11.7531 152.224 11.6053 151.928 11.3099C151.633 11.0144 151.485 10.6556 151.485 10.2336ZM154.208 31H151.833V14.982H154.208V31ZM171.401 19.6354V7.57445H173.775V31H171.401V26.3465C170.852 27.866 169.976 29.0795 168.773 29.987C167.57 30.8734 166.178 31.3166 164.595 31.3166C162.421 31.3166 160.606 30.5252 159.15 28.9424C157.715 27.3595 156.997 25.3758 156.997 22.991C156.997 20.6273 157.715 18.6541 159.15 17.0713C160.606 15.4674 162.421 14.6654 164.595 14.6654C166.178 14.6654 167.57 15.1192 168.773 16.0266C169.976 16.913 170.852 18.1159 171.401 19.6354ZM165.26 29.1006C167.032 29.1006 168.499 28.5203 169.66 27.3595C170.82 26.1988 171.401 24.7426 171.401 22.991C171.401 21.2394 170.82 19.7832 169.66 18.6224C168.499 17.4617 167.032 16.8814 165.26 16.8814C163.634 16.8814 162.252 17.4723 161.113 18.6541C159.994 19.8148 159.435 21.2605 159.435 22.991C159.435 24.7215 159.994 26.1777 161.113 27.3595C162.252 28.5203 163.634 29.1006 165.26 29.1006ZM190.955 19.5721V14.982H193.329V29.3222C193.329 31.6859 192.516 33.6591 190.891 35.2419C189.287 36.8458 187.293 37.6478 184.908 37.6478C183.199 37.6478 181.679 37.2152 180.35 36.3499C179.02 35.5057 178.018 34.3767 177.343 32.9627L179.495 31.9497C180.002 33.026 180.73 33.8807 181.679 34.5138C182.629 35.147 183.705 35.4635 184.908 35.4635C186.618 35.4635 188.053 34.8726 189.214 33.6908C190.374 32.53 190.955 31.0739 190.955 29.3222V26.2199C190.406 27.7183 189.53 28.9107 188.327 29.7971C187.124 30.6834 185.731 31.1266 184.149 31.1266C181.975 31.1266 180.16 30.3458 178.704 28.7841C177.269 27.2013 176.551 25.2386 176.551 22.896C176.551 20.5535 177.269 18.6013 178.704 17.0396C180.16 15.4568 181.975 14.6654 184.149 14.6654C185.731 14.6654 187.124 15.1086 188.327 15.995C189.53 16.8814 190.406 18.0737 190.955 19.5721ZM184.845 28.9424C186.618 28.9424 188.074 28.3725 189.214 27.2329C190.374 26.0722 190.955 24.6266 190.955 22.896C190.955 21.1866 190.374 19.7621 189.214 18.6224C188.074 17.4617 186.618 16.8814 184.845 16.8814C183.199 16.8814 181.806 17.4617 180.666 18.6224C179.548 19.7621 178.989 21.1866 178.989 22.896C178.989 24.6055 179.548 26.0405 180.666 27.2013C181.806 28.362 183.199 28.9424 184.845 28.9424ZM204.367 14.6654C206.836 14.6654 208.862 15.5412 210.445 17.2929C212.049 19.0234 212.756 21.1655 212.566 23.7191H198.479C198.648 25.323 199.292 26.642 200.41 27.6761C201.55 28.6891 202.932 29.1956 204.557 29.1956C205.802 29.1956 206.91 28.8896 207.881 28.2776C208.852 27.6656 209.59 26.8319 210.097 25.7767L212.123 26.6315C211.448 28.0454 210.445 29.185 209.116 30.0503C207.786 30.8945 206.256 31.3166 204.526 31.3166C202.141 31.3166 200.136 30.5252 198.511 28.9424C196.907 27.3384 196.105 25.3547 196.105 22.991C196.105 20.6273 196.896 18.6541 198.479 17.0713C200.062 15.4674 202.025 14.6654 204.367 14.6654ZM204.367 16.7864C202.911 16.7864 201.645 17.2507 200.568 18.1793C199.492 19.1078 198.817 20.3002 198.542 21.7564H210.16C209.928 20.3213 209.274 19.1395 208.198 18.2109C207.142 17.2612 205.866 16.7864 204.367 16.7864Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.3 KiB |
1
bridge-ui/public/images/logo/metamask.svg
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
1
bridge-ui/public/images/logo/noTokenLogo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line></svg>
|
||||
|
After Width: | Height: | Size: 282 B |
8
bridge-ui/public/images/logo/onthis.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg width="24" height="19" viewBox="0 0 24 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M9.7443 18.3712C14.7365 18.3712 18.7835 14.3243 18.7835 9.332C18.7835 4.33979 14.7365 0.292786 9.7443 0.292786C4.75208 0.292786 0.705078 4.33979 0.705078 9.332C0.705078 14.3243 4.75208 18.3712 9.7443 18.3712Z"
|
||||
fill="#00D1FF" />
|
||||
<path
|
||||
d="M23.4186 5.6277C23.4112 5.56423 23.4028 5.49975 23.3932 5.43628C23.3647 5.24382 23.3255 5.05244 23.2759 4.86419C23.2103 4.61147 23.1257 4.36191 23.0252 4.12292C22.8592 3.72742 22.6488 3.3552 22.4003 3.01575C22.174 2.70485 21.9138 2.41722 21.6262 2.16026C21.3513 1.91387 21.0509 1.69497 20.7337 1.50991L20.6681 1.4729C20.3699 1.30265 20.0537 1.16095 19.7291 1.05097C19.3717 0.927251 18.9942 0.83948 18.6061 0.792954C18.182 0.74325 17.7538 0.74325 17.3329 0.792954C17.0759 0.822562 16.8179 0.870146 16.5662 0.936768C16.3145 1.00233 16.0661 1.08693 15.8292 1.18633C15.7626 1.21382 15.697 1.24343 15.6325 1.27304C14.6596 1.72458 13.8486 2.44471 13.2775 3.36683C13.2775 3.36683 13.2775 3.36683 13.2775 3.36789L13.2172 3.47152L13.1485 3.5889L13.1464 3.59312C12.588 4.60301 12.3617 5.74086 12.495 6.88183C12.5235 7.13776 12.5722 7.39473 12.6377 7.64746C12.7033 7.89914 12.7879 8.14762 12.8873 8.38556C13.0501 8.77577 13.2595 9.14907 13.5112 9.49484C13.7375 9.80575 13.9977 10.0934 14.2853 10.3482C14.5401 10.5777 14.8182 10.7828 15.1122 10.9605L15.1788 11.0007C15.4961 11.1857 15.8334 11.3412 16.1824 11.4607C16.5472 11.5854 16.9247 11.6711 17.3065 11.7166C17.5201 11.742 17.7358 11.7547 17.9526 11.7547C18.1693 11.7547 18.3702 11.743 18.5786 11.7187C18.8355 11.6891 19.0936 11.6405 19.3474 11.5749C19.5991 11.5093 19.8465 11.4258 20.0834 11.3253C20.15 11.2978 20.2155 11.2682 20.2801 11.2386C21.2529 10.7871 22.064 10.068 22.6329 9.14694V9.14482C22.6329 9.14482 22.635 9.14482 22.635 9.14378L22.7662 8.91958C23.3245 7.90972 23.5508 6.77188 23.4175 5.63086L23.4186 5.6277ZM22.0354 3.1363L17.2335 11.3359C16.9903 11.301 16.7492 11.2492 16.5134 11.1805L21.5469 2.5843C21.7224 2.75561 21.8853 2.94067 22.0354 3.1363ZM20.7052 1.9181C20.9029 2.04394 21.0932 2.18246 21.273 2.33474L16.1623 11.062C15.9423 10.9795 15.7277 10.8822 15.5215 10.7712L20.7052 1.9181ZM18.2846 1.12817L13.6476 9.04541C13.4985 8.81488 13.3695 8.57273 13.2606 8.32317L17.464 1.14403C17.7358 1.11654 18.0107 1.11125 18.2846 1.12817ZM12.8217 6.24948C12.8217 5.38447 13.0385 4.53638 13.4636 3.76866L13.5905 3.55294C14.0526 2.80743 14.685 2.20573 15.4379 1.7838L12.8228 6.24948H12.8217ZM12.8651 6.89561L16.0248 1.49934C16.23 1.4158 16.4425 1.34389 16.6593 1.28679C16.7735 1.25718 16.8888 1.2318 17.0051 1.2096L13.0914 7.89277C13.0533 7.78069 13.0195 7.66754 12.9899 7.55334C12.9328 7.33655 12.8926 7.11556 12.8651 6.89561ZM13.8781 9.37114L18.6812 1.17047C18.9265 1.20642 19.1665 1.25824 19.4002 1.32698L14.3667 9.92311C14.1901 9.75181 14.0272 9.56676 13.8781 9.37218V9.37114ZM14.6416 10.1706L19.7513 1.44541C19.9713 1.52684 20.1859 1.62412 20.3921 1.73621L15.2084 10.5883C15.0107 10.4635 14.8214 10.3239 14.6416 10.1716V10.1706ZM17.6311 11.3772L22.267 3.45988C22.4151 3.6883 22.5441 3.93046 22.6551 4.18215L18.4506 11.3623C18.1767 11.3888 17.9029 11.3951 17.6311 11.3772ZM19.2564 11.2196C19.1412 11.2492 19.0248 11.2756 18.9085 11.2978L22.8233 4.61251C22.8613 4.72567 22.8951 4.83883 22.9258 4.95407C22.9819 5.16981 23.0231 5.38976 23.0506 5.60971L19.8898 11.006C19.6847 11.0895 19.4722 11.1614 19.2564 11.2185V11.2196ZM22.4521 8.73666L22.3252 8.95344C22.2892 9.01159 22.249 9.06764 22.2099 9.12474C22.1729 9.17868 22.1391 9.2347 22.0999 9.28759C22.0555 9.34786 22.0069 9.40496 21.9604 9.46418C21.9244 9.50966 21.8895 9.55723 21.8525 9.60059C21.8007 9.66089 21.7457 9.71691 21.6918 9.77401C21.6548 9.81316 21.6209 9.85439 21.5828 9.89141C21.5247 9.94956 21.4633 10.0035 21.402 10.0585C21.365 10.0923 21.3301 10.1272 21.292 10.16C21.2318 10.2118 21.1673 10.2594 21.1049 10.308C21.0636 10.3398 21.0245 10.3747 20.9822 10.4053C20.9209 10.4497 20.8574 10.4899 20.795 10.5312C20.7474 10.5629 20.702 10.5957 20.6534 10.6253C20.5962 10.6602 20.5359 10.6908 20.4767 10.7247L23.0919 6.25901C23.0929 7.12402 22.8751 7.97211 22.451 8.73875L22.4521 8.73666Z"
|
||||
fill="white" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
22
bridge-ui/public/images/logo/renzo.svg
Normal file
@@ -0,0 +1,22 @@
|
||||
<svg width="90" height="23" viewBox="0 0 90 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M13.8782 11.6197C14.5811 10.5653 14.9326 9.37433 14.9326 8.08574C14.9326 6.91426 14.6397 5.84044 14.0735 4.8447C13.4877 3.84895 12.7068 3.06798 11.711 2.48224C10.7153 1.91604 9.62191 1.62317 8.46997 1.62317H0.152588V4.35658H8.46997C9.50475 4.35658 10.3833 4.72755 11.1253 5.44995C11.8477 6.17235 12.2187 7.05096 12.2187 8.10528C12.2187 9.15959 11.8477 10.0187 11.1253 10.7606C10.4029 11.483 9.52428 11.8539 8.46997 11.8539H0.152588V21.4014H2.886V14.5873H8.46997C8.48951 14.5873 8.52852 14.5873 8.5676 14.5873C8.60667 14.5873 8.64569 14.5873 8.66523 14.5873L12.2187 21.4209H14.9521L11.1058 14.0212C12.2382 13.4745 13.1558 12.6935 13.8782 11.6197Z"
|
||||
fill="#C4FF61" />
|
||||
<path
|
||||
d="M17.8416 10.1554V12.8888H31.7626V10.1554H17.8416ZM17.8416 18.7461L16.4164 21.4209H31.782V18.7461H17.8416ZM16.4164 1.62317L17.8416 4.35658H31.7626V1.62317H16.4164Z"
|
||||
fill="#C4FF61" />
|
||||
<path d="M48.4754 1.62312V15.8955L33.8322 0.803101V21.4404H36.5656V7.36327L51.2089 22.3385V1.62312H48.4754Z"
|
||||
fill="#C4FF61" />
|
||||
<path
|
||||
d="M58.7843 14.1188L63.6459 11.2487C64.8957 10.5068 65.8912 9.51103 66.6138 8.24192C67.3364 6.97287 67.6875 5.60615 67.6875 4.14182V1.62317H53.4738V4.35658H64.9738V4.39563C64.9738 5.33281 64.7394 6.2114 64.2711 7.03143C63.8022 7.85147 63.1577 8.49573 62.3576 8.96434L57.5544 11.7954C56.2853 12.5373 55.3091 13.533 54.5671 14.8021C53.8447 16.0712 53.4738 17.4379 53.4738 18.9022V21.4014H67.6875V18.668H56.1877C56.1877 17.7308 56.422 16.8522 56.8906 16.0517C57.3396 15.2317 57.9839 14.5873 58.7843 14.1188Z"
|
||||
fill="#C4FF61" />
|
||||
<path
|
||||
d="M89.6526 12.381C89.6526 12.4005 89.6526 12.4201 89.6526 12.4396C89.2228 17.2035 85.4354 20.9327 80.8077 21.4013C80.7686 21.4013 80.7494 21.4013 80.7103 21.4013L89.6526 12.381Z"
|
||||
fill="#C4FF61" />
|
||||
<path
|
||||
d="M84.0876 2.52124C83.8339 2.4041 83.5802 2.28696 83.3265 2.18934C82.8185 1.99409 82.2919 1.83789 81.7449 1.72075C81.0812 1.58407 80.4175 1.50598 79.7142 1.50598C79.3823 1.50598 79.0505 1.5255 78.7186 1.54503C76.415 1.77932 74.365 2.77507 72.7834 4.29797C72.6854 4.39559 72.5688 4.51274 72.4708 4.61036C70.9673 6.19184 69.991 8.28093 69.7764 10.5653C69.7571 10.8582 69.7373 11.1511 69.7373 11.4634C69.7373 12.2054 69.8155 12.9277 69.9718 13.6306C70.089 14.1578 70.2453 14.6654 70.4401 15.1731C70.5573 15.4464 70.6745 15.7197 70.7917 15.9736C71.0262 16.4226 71.2799 16.8522 71.5726 17.2621L73.2126 15.6026L83.7558 4.94227L85.3963 3.2827C85.0056 3.00936 84.5565 2.75554 84.0876 2.52124ZM72.2562 13.3573C72.2363 13.2987 72.2171 13.2206 72.2171 13.1621C72.0999 12.6154 72.0415 12.0491 72.0415 11.483C72.0415 9.51097 72.7834 7.65615 74.1306 6.23088L74.4035 5.95754C75.8487 4.57131 77.7231 3.80986 79.734 3.80986C80.2612 3.80986 80.7884 3.86843 81.2958 3.96605C81.374 3.98557 81.4521 4.00511 81.5303 4.02463L72.2562 13.3573Z"
|
||||
fill="#C4FF61" />
|
||||
<path
|
||||
d="M76.278 20.8547C76.0243 20.7571 75.7899 20.6595 75.556 20.5618C75.0679 20.3275 74.599 20.0737 74.1499 19.7614L87.9345 5.84045C88.2273 6.26999 88.5008 6.71903 88.7154 7.20717C88.8326 7.46098 88.9498 7.71479 89.0472 7.9686L76.278 20.8547Z"
|
||||
fill="#C4FF61" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
BIN
bridge-ui/public/images/logo/wallet-connect.png
Normal file
7
bridge-ui/public/images/picto/overlay-vertical.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<svg width="132" height="369" viewBox="0 0 132 369" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M-35.8008 349.975L-35.8008 335.107L-17.1932 335.107L-17.1932 349.93L-2.32507 349.93L-2.32507 335.062L-17.1932 335.062L-17.1932 316.454L-2.32507 316.454L-2.32507 282.979L16.2827 282.979L16.2827 268.111L-2.32507 268.111L-2.32507 249.503L16.2827 249.503L16.2827 234.68L31.1506 234.68L31.1506 249.548L16.2827 249.548L16.2827 268.111L31.1506 268.111L31.1506 335.062L49.7586 335.062L49.7586 349.93L31.1506 349.93L31.1506 368.538L-17.1932 368.538L-17.1932 349.975L-35.8008 349.975Z" fill="#61DFFF"/>
|
||||
<path d="M31.1506 216.072L31.1506 201.204L49.7586 201.204L49.7586 167.728L64.6267 167.728L64.6267 201.204L49.7586 201.204L49.7586 216.072L31.1506 216.072Z" fill="#61DFFF"/>
|
||||
<path d="M64.852 134.072L64.852 148.941L83.4597 148.941L83.4597 134.072L64.852 134.072Z" fill="#61DFFF"/>
|
||||
<path d="M116.935 33.7798L116.935 48.648L131.803 48.648L131.803 33.7798L116.935 33.7798Z" fill="#61DFFF"/>
|
||||
<path d="M116.935 0.304681L116.935 15.1724L131.803 15.1724L131.803 0.30468L116.935 0.304681Z" fill="#61DFFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
7
bridge-ui/public/images/picto/overlay.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="201" height="120" viewBox="0 0 201 120" fill="none">
|
||||
<path
|
||||
d="M-15.6706 0.359619H-0.802399V18.9672H-15.6257V33.8353H-0.757118V18.9672H17.8506V33.8353H51.3258V52.4431H66.1939V33.8353H84.802V52.4431H99.6249V67.311H84.7568V52.4431H66.1939V67.311H-0.757118V85.919H-15.6257V67.311H-34.2334V18.9672H-15.6706V0.359619Z"
|
||||
fill="#61DFFF" />
|
||||
<path d="M118.233 67.311H133.1V85.919H166.577V100.787H133.1V85.919H118.233V67.311Z" fill="#61DFFF" />
|
||||
<path d="M200.233 101.012H185.364V119.62H200.233V101.012Z" fill="#61DFFF" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 577 B |
1
bridge-ui/public/next.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
bridge-ui/public/vercel.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>
|
||||
|
After Width: | Height: | Size: 629 B |
159
bridge-ui/src/abis/ERC20.json
Normal file
@@ -0,0 +1,159 @@
|
||||
[
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "name",
|
||||
"outputs": [{ "name": "", "type": "string" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "name": "_spender", "type": "address" },
|
||||
{ "name": "_value", "type": "uint256" }
|
||||
],
|
||||
"name": "approve",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "totalSupply",
|
||||
"outputs": [{ "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "name": "_from", "type": "address" },
|
||||
{ "name": "_to", "type": "address" },
|
||||
{ "name": "_value", "type": "uint256" }
|
||||
],
|
||||
"name": "transferFrom",
|
||||
"outputs": [{ "name": "success", "type": "bool" }],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "decimals",
|
||||
"outputs": [{ "name": "", "type": "uint8" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [{ "name": "_value", "type": "uint256" }],
|
||||
"name": "burn",
|
||||
"outputs": [{ "name": "success", "type": "bool" }],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [{ "name": "", "type": "address" }],
|
||||
"name": "balanceOf",
|
||||
"outputs": [{ "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "name": "_from", "type": "address" },
|
||||
{ "name": "_value", "type": "uint256" }
|
||||
],
|
||||
"name": "burnFrom",
|
||||
"outputs": [{ "name": "success", "type": "bool" }],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "symbol",
|
||||
"outputs": [{ "name": "", "type": "string" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "name": "_to", "type": "address" },
|
||||
{ "name": "_value", "type": "uint256" }
|
||||
],
|
||||
"name": "transfer",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "name": "_spender", "type": "address" },
|
||||
{ "name": "_value", "type": "uint256" },
|
||||
{ "name": "_extraData", "type": "bytes" }
|
||||
],
|
||||
"name": "approveAndCall",
|
||||
"outputs": [{ "name": "success", "type": "bool" }],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [
|
||||
{ "name": "", "type": "address" },
|
||||
{ "name": "", "type": "address" }
|
||||
],
|
||||
"name": "allowance",
|
||||
"outputs": [{ "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "name": "initialSupply", "type": "uint256" },
|
||||
{ "name": "tokenName", "type": "string" },
|
||||
{ "name": "tokenSymbol", "type": "string" }
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{ "indexed": true, "name": "from", "type": "address" },
|
||||
{ "indexed": true, "name": "to", "type": "address" },
|
||||
{ "indexed": false, "name": "value", "type": "uint256" }
|
||||
],
|
||||
"name": "Transfer",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{ "indexed": true, "name": "from", "type": "address" },
|
||||
{ "indexed": false, "name": "value", "type": "uint256" }
|
||||
],
|
||||
"name": "Burn",
|
||||
"type": "event"
|
||||
}
|
||||
]
|
||||