Skip to content

Commit

Permalink
Merge pull request #301 from hirosystems/beta
Browse files Browse the repository at this point in the history
release to master
  • Loading branch information
rafaelcr committed Feb 2, 2024
2 parents 644ca9c + da64e46 commit 613233a
Show file tree
Hide file tree
Showing 22 changed files with 585 additions and 268 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ jobs:
run: npm run lint:prettier

test:
strategy:
fail-fast: false
matrix:
suite: [api, brc-20, ordhook]
runs-on: ubuntu-latest
env:
API_HOST: 127.0.0.1
Expand Down Expand Up @@ -92,7 +96,7 @@ jobs:
npm run testenv:logs -- --no-color &> docker-compose-logs.txt &
- name: Run tests
run: npm run test -- --coverage
run: npm run test:${{ matrix.suite }} -- --coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
63 changes: 63 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,68 @@
"PGPASSWORD": "postgres",
},
},
{
"type": "node",
"request": "launch",
"name": "Jest: API",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": [
"--testTimeout=3600000",
"--runInBand",
"--no-cache",
"${workspaceFolder}/tests/api/"
],
"outputCapture": "std",
"console": "integratedTerminal",
"preLaunchTask": "npm: testenv:run",
"postDebugTask": "npm: testenv:stop",
"env": {
"PGHOST": "localhost",
"PGUSER": "postgres",
"PGPASSWORD": "postgres",
},
},
{
"type": "node",
"request": "launch",
"name": "Jest: BRC-20",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": [
"--testTimeout=3600000",
"--runInBand",
"--no-cache",
"${workspaceFolder}/tests/brc-20/"
],
"outputCapture": "std",
"console": "integratedTerminal",
"preLaunchTask": "npm: testenv:run",
"postDebugTask": "npm: testenv:stop",
"env": {
"PGHOST": "localhost",
"PGUSER": "postgres",
"PGPASSWORD": "postgres",
},
},
{
"type": "node",
"request": "launch",
"name": "Jest: Ordhook",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": [
"--testTimeout=3600000",
"--runInBand",
"--no-cache",
"${workspaceFolder}/tests/ordhook/"
],
"outputCapture": "std",
"console": "integratedTerminal",
"preLaunchTask": "npm: testenv:run",
"postDebugTask": "npm: testenv:stop",
"env": {
"PGHOST": "localhost",
"PGUSER": "postgres",
"PGPASSWORD": "postgres",
},
},
]
}
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## [2.2.0-beta.2](https://github.com/hirosystems/ordinals-api/compare/v2.2.0-beta.1...v2.2.0-beta.2) (2024-02-02)


### Bug Fixes

* include token in address index on brc20_total_balances ([#299](https://github.com/hirosystems/ordinals-api/issues/299)) ([d8271eb](https://github.com/hirosystems/ordinals-api/commit/d8271eb9fc23d6262fab68c59a0710420ebcb8bf))

## [2.2.0-beta.1](https://github.com/hirosystems/ordinals-api/compare/v2.1.2-beta.1...v2.2.0-beta.1) (2024-02-02)


### Features

* support transfers by ordinal number instead of inscription id ([#296](https://github.com/hirosystems/ordinals-api/issues/296)) ([b0c0ffd](https://github.com/hirosystems/ordinals-api/commit/b0c0ffd198a9a98a88b5123927a8fdc5b68ef22d))

## [2.1.2-beta.1](https://github.com/hirosystems/ordinals-api/compare/v2.1.1...v2.1.2-beta.1) (2024-01-16)


### Bug Fixes

* offload ticker lookup from BRC-20 activity query ([#293](https://github.com/hirosystems/ordinals-api/issues/293)) ([e70c222](https://github.com/hirosystems/ordinals-api/commit/e70c2229b03a563f0218c5fcfabb2875451bb77c))

## [2.1.1](https://github.com/hirosystems/ordinals-api/compare/v2.1.0...v2.1.1) (2024-01-09)


Expand Down
22 changes: 22 additions & 0 deletions migrations/1705363472553_locations-block-height-indexes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { MigrationBuilder, ColumnDefinitions } from 'node-pg-migrate';

export const shorthands: ColumnDefinitions | undefined = undefined;

export function up(pgm: MigrationBuilder): void {
pgm.dropIndex('locations', ['block_hash']);
pgm.dropIndex('locations', ['block_height']);
pgm.createIndex('locations', [
{ name: 'block_height', sort: 'DESC' },
{ name: 'tx_index', sort: 'DESC' },
]);
}

export function down(pgm: MigrationBuilder): void {
pgm.dropIndex('locations', [
{ name: 'block_height', sort: 'DESC' },
{ name: 'tx_index', sort: 'DESC' },
]);
pgm.createIndex('locations', ['block_hash']);
pgm.createIndex('locations', ['block_height']);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { MigrationBuilder, ColumnDefinitions } from 'node-pg-migrate';

export const shorthands: ColumnDefinitions | undefined = undefined;

export function up(pgm: MigrationBuilder): void {
pgm.dropIndex('brc20_total_balances', ['address']);
pgm.createIndex('brc20_total_balances', ['address', 'brc20_deploy_id']);
}

export function down(pgm: MigrationBuilder): void {
pgm.dropIndex('brc20_total_balances', ['address', 'brc20_deploy_id']);
pgm.createIndex('brc20_total_balances', ['address']);
}
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"start": "node dist/src/index.js",
"start-ts": "ts-node ./src/index.ts",
"test": "jest --runInBand",
"test:brc-20": "npm run test -- ./tests/brc-20/",
"test:api": "npm run test -- ./tests/api/",
"test:ordhook": "npm run test -- ./tests/ordhook/",
"migrate": "ts-node node_modules/.bin/node-pg-migrate -j ts",
"lint:eslint": "eslint . --ext .js,.jsx,.ts,.tsx -f unix",
"lint:prettier": "prettier --check src/**/*.ts tests/**/*.ts migrations/**/*.ts",
Expand Down Expand Up @@ -51,7 +54,7 @@
"@fastify/swagger": "^8.3.1",
"@fastify/type-provider-typebox": "^3.2.0",
"@hirosystems/api-toolkit": "^1.3.1",
"@hirosystems/chainhook-client": "^1.5.0",
"@hirosystems/chainhook-client": "^1.6.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^10.0.4",
"@semantic-release/git": "^10.0.1",
Expand Down
Loading

0 comments on commit 613233a

Please sign in to comment.