-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into change-runners-to-matterlabs-ci-runner
- Loading branch information
Showing
74 changed files
with
885 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
version: '3.2' | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: ./packages/app/Dockerfile | ||
environment: | ||
- VITE_APP_ENVIRONMENT=local | ||
ports: | ||
- '3010:3010' | ||
depends_on: | ||
- api | ||
restart: unless-stopped | ||
|
||
worker: | ||
build: | ||
context: . | ||
dockerfile: ./packages/worker/Dockerfile | ||
environment: | ||
- PORT=3001 | ||
- LOG_LEVEL=verbose | ||
- NODE_ENV=development | ||
- DATABASE_HOST=postgres | ||
- DATABASE_USER=postgres | ||
- DATABASE_PASSWORD=postgres | ||
- DATABASE_NAME=block-explorer | ||
- BLOCKCHAIN_RPC_URL=http://host.docker.internal:3050 | ||
- BATCHES_PROCESSING_POLLING_INTERVAL=1000 | ||
ports: | ||
- '3001:3001' | ||
- '9229:9229' | ||
- '9230:9230' | ||
restart: unless-stopped | ||
|
||
api: | ||
build: | ||
context: . | ||
dockerfile: ./packages/api/Dockerfile | ||
environment: | ||
- PORT=3020 | ||
- METRICS_PORT=3005 | ||
- LOG_LEVEL=verbose | ||
- NODE_ENV=development | ||
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/block-explorer | ||
ports: | ||
- '3020:3020' | ||
- '3005:3005' | ||
- '9231:9229' | ||
- '9232:9230' | ||
depends_on: | ||
- worker | ||
restart: unless-stopped | ||
|
||
postgres: | ||
image: "postgres:14" | ||
logging: | ||
driver: none | ||
volumes: | ||
- postgres:/var/lib/postgresql/data | ||
ports: | ||
- "5432:5432" | ||
healthcheck: | ||
test: [ "CMD-SHELL", "pg_isready -U postgres" ] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 5 | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
- POSTGRES_DB=block-explorer | ||
|
||
volumes: | ||
postgres: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/api/src/api/dtos/account/accountMinedBlock.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
|
||
export class AccountMinedBlock { | ||
@ApiProperty({ | ||
type: String, | ||
description: "The number (height) of the block", | ||
example: "3233097", | ||
}) | ||
public readonly blockNumber: string; | ||
|
||
@ApiProperty({ | ||
type: String, | ||
description: "The timestamp of the block", | ||
example: "1679988122", | ||
}) | ||
public readonly timeStamp: string; | ||
|
||
@ApiProperty({ | ||
type: String, | ||
description: "Reward for the block", | ||
example: "1000", | ||
}) | ||
public readonly blockReward: string; | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/api/src/api/dtos/account/accountMinedBlocksResponse.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { ResponseBaseDto } from "../common/responseBase.dto"; | ||
import { AccountMinedBlock } from "./accountMinedBlock.dto"; | ||
|
||
export class AccountMinedBlocksResponseDto extends ResponseBaseDto { | ||
@ApiProperty({ | ||
description: "List of blocks validated by address", | ||
type: AccountMinedBlock, | ||
isArray: true, | ||
}) | ||
public readonly result: AccountMinedBlock[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.