Install dependencies:
yarn
Build project:
yarn build
Start:
yarn start
Start in development:
yarn dev
Run tests:
yarn test
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
LetsExchange source currencies for REEF swaps: /letsexchange/listcurrencies
LetsExchange REEF quote: /letsexchange/quote
LetsExchange REEF quote by target amount: /letsexchange/quote-revert
Create LetsExchange REEF swap: /letsexchange/create-exchange
Get LetsExchange transaction: /letsexchange/transaction/:id
Get LetsExchange transaction status: /letsexchange/transaction/:id/status
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
Whenever the DB schema changes, it is required to create a new migration file. To do so:
- Create a new file in the
migrationsfolder 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) runningsequelize 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.
- Added a new LetsExchange integration under
/letsexchangeto support swapping external currencies into REEF. - Added public routes for source-currency discovery, quotes, reverse quotes, transaction creation, transaction lookup, and transaction status.
- Added LetsExchange route documentation in
api.md. - Added configuration support for
LETSEXCHANGE_API_TOKEN, optionalLETSEXCHANGE_API_URL, and optionalLETSEXCHANGE_AFFILIATE_ID.