Skip to content

Commit

Permalink
fix: tx error reason transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
vasyl-ivanchuk committed Feb 24, 2024
1 parent f0a30db commit 054e3a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 88 deletions.
89 changes: 3 additions & 86 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- '[0-9]+.*'
- prod

jobs:
createReleaseVersion:
Expand Down Expand Up @@ -59,7 +60,7 @@ jobs:
permissions:
contents: read
needs: createReleaseVersion
if: ${{ github.ref == 'refs/heads/main' && needs.createReleaseVersion.outputs.releaseVersion != '' }}
if: ${{ needs.createReleaseVersion.outputs.releaseVersion != '' }}
steps:
- uses: actions/checkout@v3

Expand All @@ -83,95 +84,11 @@ jobs:
run: |
gcloud auth configure-docker us-docker.pkg.dev -q
- name: Build and push Docker image for API
uses: docker/build-push-action@v4
with:
push: true
tags: |
"matterlabs/block-explorer-api:latest"
"matterlabs/block-explorer-api:v${{ needs.createReleaseVersion.outputs.releaseVersion }}"
"matterlabs/block-explorer-api:${{ steps.setVersionForFlux.outputs.imageTag }}"
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/block-explorer-api:latest"
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/block-explorer-api:v${{ needs.createReleaseVersion.outputs.releaseVersion }}"
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/block-explorer-api:${{ steps.setVersionForFlux.outputs.imageTag }}"
file: packages/api/Dockerfile
no-cache: true

- name: Build and push Docker image for Worker
uses: docker/build-push-action@v4
with:
push: true
tags: |
"matterlabs/block-explorer-worker:latest"
"matterlabs/block-explorer-worker:v${{ needs.createReleaseVersion.outputs.releaseVersion }}"
"matterlabs/block-explorer-worker:${{ steps.setVersionForFlux.outputs.imageTag }}"
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/block-explorer-worker:latest"
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/block-explorer-worker:v${{ needs.createReleaseVersion.outputs.releaseVersion }}"
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/block-explorer-worker:${{ steps.setVersionForFlux.outputs.imageTag }}"
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/block-explorer-worker:prod"
file: packages/worker/Dockerfile
no-cache: true

- name: Build and push Docker image for App
uses: docker/build-push-action@v4
with:
push: true
tags: |
"matterlabs/block-explorer-app:latest"
"matterlabs/block-explorer-app:v${{ needs.createReleaseVersion.outputs.releaseVersion }}"
"matterlabs/block-explorer-app:${{ steps.setVersionForFlux.outputs.imageTag }}"
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/block-explorer-app:latest"
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/block-explorer-app:v${{ needs.createReleaseVersion.outputs.releaseVersion }}"
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/block-explorer-app:${{ steps.setVersionForFlux.outputs.imageTag }}"
file: packages/app/Dockerfile
no-cache: true

deployFrontendToStaging:
name: Deploy Block Explorer frontend to staging
runs-on: ubuntu-latest
permissions:
contents: read
needs: createReleaseVersion
if: ${{ github.ref == 'refs/heads/main' && needs.createReleaseVersion.outputs.releaseVersion != '' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Download Dist package
uses: dsaltares/fetch-gh-release-asset@master
with:
version: "tags/v${{ needs.createReleaseVersion.outputs.releaseVersion }}"
file: "dist.zip"
target: "dist.zip"
token: ${{ secrets.GITHUB_TOKEN }}

- name: Unzip Dist package
run: |
unzip dist.zip -d packages/app
- name: Update config
run: |
echo "window[\"##runtimeConfig\"] = { appEnvironment: \"staging\", sentryDSN: \"${{ vars.SENTRY_DSN }}\" };" > packages/app/dist/config.js
- name: Download Storybook package
uses: dsaltares/fetch-gh-release-asset@master
with:
version: "tags/v${{ needs.createReleaseVersion.outputs.releaseVersion }}"
file: "storybook-static.zip"
target: "storybook-static.zip"
token: ${{ secrets.GITHUB_TOKEN }}

- name: Unzip Storybook package
run: |
unzip storybook-static.zip -d packages/app
- name: Deploy
uses: matter-labs/action-hosting-deploy@main
id: deploy
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_STAGING_SCAN_V2 }}"
projectId: staging-scan-v2
channelID: live
entryPoint: ./packages/app
1 change: 1 addition & 0 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"main",
"next",
"next-major",
"prod",
{
"name": "beta",
"prerelease": true
Expand Down
5 changes: 3 additions & 2 deletions packages/worker/src/entities/transaction.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { hexTransformer } from "../transformers/hex.transformer";
import { Batch } from "./batch.entity";
import { Block } from "./block.entity";
import { CountableEntity } from "./countable.entity";
import { stringTransformer } from "../transformers/string.transformer";

@Entity({ name: "transactions" })
@Index(["receivedAt", "transactionIndex"])
Expand Down Expand Up @@ -91,9 +92,9 @@ export class Transaction extends CountableEntity {
@Column({ type: "int", default: 1 })
public readonly receiptStatus: number;

@Column({ nullable: true })
@Column({ nullable: true, transformer: stringTransformer })
public readonly error?: string;

@Column({ nullable: true })
@Column({ nullable: true, transformer: stringTransformer })
public readonly revertReason?: string;
}

0 comments on commit 054e3a0

Please sign in to comment.