Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: blockscout/blockscout-rs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 22081f3a29d8fed6168824e8b7923101052abbb4
Choose a base ref
..
head repository: blockscout/blockscout-rs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: aa9a5beef11343443273687d6c808449bfa0b813
Choose a head ref
Showing 464 changed files with 36,061 additions and 9,889 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/_push_swagger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Copy Swagger

on:
workflow_call:
secrets:
api_token_github:
description: 'GitHub API token'
required: true
inputs:
user_name:
description: 'Commit username'
required: false
default: 'blockscout-bot'
type: string
user_email:
description: 'Commit user email'
required: false
type: string
default: 'bot@blockscout.com'
service_name:
description: 'Service name (e.g., smart-contract-verifier)'
required: true
type: string
swagger_path:
description: 'Path to the swagger file'
required: true
type: string
workflow_dispatch:
inputs:
user_name:
description: 'Commit username'
required: false
default: 'blockscout-bot'
type: string
user_email:
description: 'Commit user email'
required: false
default: 'bot@blockscout.com'
type: string
service_name:
description: 'Service name (e.g., smart-contract-verifier)'
required: true
type: string
swagger_path:
description: 'Path to the swagger file'
required: true
type: string
version:
description: 'Version to set if manually triggered'
required: true
type: string

jobs:
copy-swagger:
name: Copy swagger
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get the current tag, branch, or commit hash
id: git_info
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "version=${{ inputs.version }}" >> $GITHUB_ENV
else
if [[ "${GITHUB_REF}" =~ refs/tags/${{ inputs.service_name }}/v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
version=$(echo "${GITHUB_REF}" | grep -o 'v[0-9]\+\.[0-9]\+\.[0-9]\+')
echo "version=${version}" >> $GITHUB_ENV
# If it's the main branch
elif [ "${GITHUB_REF#refs/heads/}" = "main" ]; then
echo "version=main" >> $GITHUB_ENV
# Otherwise, use the first 8 characters of the commit hash
else
echo "version=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
fi
fi
echo "version=${version}"
- name: Push swagger to another repo
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.api_token_github || secrets.BLOCKSCOUT_BOT_TOKEN }}
with:
source_file: ${{ inputs.swagger_path }}
rename: 'swagger.yaml'
commit_message: '[BOT] [CREATE-SWAGGER] [SKIP-GH-PAGES] create swagger for "${{ inputs.service_name }}" of version ${{ env.version }}'
destination_repo: 'blockscout/swaggers'
destination_folder: "services/${{ inputs.service_name }}/${{ env.version }}"
user_email: ${{ inputs.user_email }}
user_name: ${{ inputs.user_name }}
destination_branch: 'master'
13 changes: 11 additions & 2 deletions .github/workflows/bens.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: postgres:16
env:
POSTGRES_PASSWORD: admin
POSTGRES_USER: graph-node
@@ -175,4 +175,13 @@ jobs:
secrets: inherit
with:
version: ${{ needs.push.outputs.semver }}
project_name: blockscout-ens
project_name: blockscout-ens

push-swagger:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags'))
uses: ./.github/workflows/_push_swagger.yml
with:
service_name: 'bens'
swagger_path: 'blockscout-ens/bens-proto/swagger/bens.swagger.yaml'
secrets:
api_token_github: ${{ secrets.BLOCKSCOUT_BOT_TOKEN }}
11 changes: 10 additions & 1 deletion .github/workflows/da-indexer.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: postgres:16
env:
POSTGRES_PASSWORD: admin
POSTGRES_USER: postgres
@@ -83,3 +83,12 @@ jobs:
uses: ./.github/workflows/_docker-build-push.yml
with:
service-name: da-indexer

push-swagger:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags'))
uses: ./.github/workflows/_push_swagger.yml
with:
service_name: 'da-indexer'
swagger_path: 'da-indexer/da-indexer-proto/swagger/v1/da-indexer.swagger.yaml'
secrets:
api_token_github: ${{ secrets.BLOCKSCOUT_BOT_TOKEN }}
11 changes: 10 additions & 1 deletion .github/workflows/eth-bytecode-db.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: postgres:16
env:
POSTGRES_PASSWORD: admin
POSTGRES_USER: postgres
@@ -95,3 +95,12 @@ jobs:
uses: ./.github/workflows/_docker-build-push.yml
with:
service-name: eth-bytecode-db

push-swagger:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags'))
uses: ./.github/workflows/_push_swagger.yml
with:
service_name: 'eth-bytecode-db'
swagger_path: 'eth-bytecode-db/eth-bytecode-db-proto/swagger/v2/eth-bytecode-db.swagger.yaml'
secrets:
api_token_github: ${{ secrets.BLOCKSCOUT_BOT_TOKEN }}
9 changes: 9 additions & 0 deletions .github/workflows/proxy-verifier.yml
Original file line number Diff line number Diff line change
@@ -65,3 +65,12 @@ jobs:
uses: ./.github/workflows/_docker-build-push.yml
with:
service-name: proxy-verifier

push-swagger:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags'))
uses: ./.github/workflows/_push_swagger.yml
with:
service_name: 'proxy-verifier'
swagger_path: 'proxy-verifier/proxy-verifier-proto/swagger/v1/proxy-verifier.swagger.yaml'
secrets:
api_token_github: ${{ secrets.BLOCKSCOUT_BOT_TOKEN }}
10 changes: 10 additions & 0 deletions .github/workflows/sig-provider.yml
Original file line number Diff line number Diff line change
@@ -65,3 +65,13 @@ jobs:
uses: ./.github/workflows/_docker-build-push.yml
with:
service-name: sig-provider


push-swagger:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags'))
uses: ./.github/workflows/_push_swagger.yml
with:
service_name: 'sig-provider'
swagger_path: 'sig-provider/sig-provider-proto/swagger/sig-provider.swagger.yaml'
secrets:
api_token_github: ${{ secrets.BLOCKSCOUT_BOT_TOKEN }}
9 changes: 9 additions & 0 deletions .github/workflows/smart-contract-verifier.yml
Original file line number Diff line number Diff line change
@@ -65,3 +65,12 @@ jobs:
uses: ./.github/workflows/_docker-build-push.yml
with:
service-name: smart-contract-verifier

push-swagger:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags'))
uses: ./.github/workflows/_push_swagger.yml
with:
service_name: 'smart-contract-verifier'
swagger_path: 'smart-contract-verifier/smart-contract-verifier-proto/swagger/v2/smart-contract-verifier.swagger.yaml'
secrets:
api_token_github: ${{ secrets.BLOCKSCOUT_BOT_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/stats.yml
Original file line number Diff line number Diff line change
@@ -56,6 +56,11 @@ jobs:
run: cargo test --locked --workspace --all-features --doc
if: success() || failure()

- name: ENVs in documentation
run: cargo run --bin env-docs-generation
env:
VALIDATE_ONLY: true

- name: Integration tests
run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --test '*' -- --nocapture
if: success() || failure()
@@ -94,3 +99,13 @@ jobs:
with:
version: ${{ needs.docker.outputs.tag-value }}
project_name: stats


push-swagger:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags'))
uses: ./.github/workflows/_push_swagger.yml
with:
service_name: 'stats'
swagger_path: 'stats/stats-proto/swagger/stats.swagger.yaml'
secrets:
api_token_github: ${{ secrets.BLOCKSCOUT_BOT_TOKEN }}
67 changes: 67 additions & 0 deletions .github/workflows/stylus-verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
on:
push:
branches:
- 'main'
tags:
- 'stylus-verifier/v*'
paths:
- stylus-verifier/**
- .github/workflows/stylus-verifier.yml
- .github/workflows/_*.yml
- .github/actions/**
pull_request:
paths:
- stylus-verifier/**
- .github/workflows/stylus-verifier.yml
- .github/workflows/_*.yml
- .github/actions/**

name: Test, lint and docker (stylus-verifier)

defaults:
run:
working-directory: stylus-verifier

jobs:
test:
name: Unit, doc and integration tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup
with:
working-directory: stylus-verifier

- name: Unit tests
run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --all-features --lib --bins -- --nocapture
if: success() || failure()

- name: Doc tests
run: cargo test --locked --workspace --all-features --doc
if: success() || failure()

- name: Integration tests
run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --test '*' -- --nocapture --include-ignored
if: success() || failure()

lint:
name: Linting
uses: ./.github/workflows/_linting.yml
with:
working-directory: stylus-verifier

docker:
name: Docker build and docker push
needs:
- test
- lint
if: |
always() &&
(needs.test.result == 'success' || needs.test.result == 'cancelled') &&
(needs.lint.result == 'success' || needs.lint.result == 'cancelled')
uses: ./.github/workflows/_docker-build-push.yml
with:
service-name: stylus-verifier
11 changes: 10 additions & 1 deletion .github/workflows/user-ops-indexer.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: postgres:16
env:
POSTGRES_PASSWORD: admin
POSTGRES_USER: postgres
@@ -81,3 +81,12 @@ jobs:
uses: ./.github/workflows/_docker-build-push.yml
with:
service-name: user-ops-indexer

push-swagger:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags'))
uses: ./.github/workflows/_push_swagger.yml
with:
service_name: 'user-ops-indexer'
swagger_path: 'user-ops-indexer/user-ops-indexer-proto/swagger/user-ops-indexer.swagger.yaml'
secrets:
api_token_github: ${{ secrets.BLOCKSCOUT_BOT_TOKEN }}
9 changes: 9 additions & 0 deletions .github/workflows/visualizer.yml
Original file line number Diff line number Diff line change
@@ -84,3 +84,12 @@ jobs:
with:
version: ${{ needs.docker.outputs.tag-value }}
project_name: visualizer

push-swagger:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags'))
uses: ./.github/workflows/_push_swagger.yml
with:
service_name: 'visualizer'
swagger_path: 'visualizer/visualizer-proto/swagger/visualizer.swagger.yaml'
secrets:
api_token_github: ${{ secrets.BLOCKSCOUT_BOT_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ Crates that require database connection may also have additional sea-orm defined

## Contributing

We appreciate your support. Before writing code and submiting pull request, please read contributing [instructions](CONTRIBUTING.md).
We appreciate your support. Before writing code and submitting pull request, please read contributing [instructions](CONTRIBUTING.md).


## License
Loading