Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions db/seeders/20250416132150-add-htr-token.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

module.exports = {
up: async (queryInterface) => {
// Check if HTR token already exists
const [existing] = await queryInterface.sequelize.query(
"SELECT id FROM token WHERE id = '00'"
);

if (existing.length > 0) {
console.log('HTR token already exists, skipping.');
return;
}

// Count unique transactions for HTR
const [results] = await queryInterface.sequelize.query(
"SELECT COUNT(DISTINCT tx_id) AS count FROM tx_output WHERE token_id = '00'"
Expand All @@ -14,6 +24,7 @@ module.exports = {
name: 'Hathor',
symbol: 'HTR',
transactions: htrTxCount,
version: 0, // TokenVersion.NATIVE
}]);
},

Expand Down