Skip to content

reef-chain/reefscan-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fc7e65e · Mar 26, 2025
Feb 20, 2024
Jun 28, 2023
Jun 28, 2023
Jun 28, 2023
Mar 26, 2025
Mar 14, 2023
Jan 19, 2023
Oct 11, 2024
Jan 5, 2023
Dec 21, 2023
Mar 10, 2023
Jul 4, 2024
Jul 4, 2024
Jan 21, 2025
Oct 27, 2023
Oct 27, 2023

Repository files navigation

REEF Subsquid API

Commands

Install dependencies:

yarn

Build project:

yarn build

Start:

yarn start

Start in development:

yarn dev

Run tests:

yarn test

API

Public endpoints

Find contract : /contract/:address

Get verification status : /verification/status

Submit verification request : /verification/submit

Get verified contract : /verification/contract/:address

Get verified contracts count : /verification/verified-contracts-count

Get REEF price: /price/reef

Admin endpoints

Verify from backup (DB => Squid): /verification/verify-from-backup

Backup from Squid (Squid => DB): /verification/backup-from-squid

Export backup (DB => JSON files): /verification/export-backup

Import backup (JSON files => DB): /verification/import-backup

Set contract approved: /verification/set-contract-approved

DB Migrations

Whenever the DB schema changes, it is required to create a new migration file. To do so:

  • Create a new file in the migrations folder with the following name format: YYYYMMDDHHmmss_migration_name.ts. This can be done manually or by installing the Sequelize CLI (npm install -g sequelize-cli) running sequelize migration:generate --name addNewColumn.
  • Add the migration code to the newly created file. The existing migrations can be used as a reference.

The migrations will be run automatically when the app starts.