Skip to content

Commit 5ac8c3d

Browse files
Antoine de Chevignéclaude
andcommitted
Fix code review issues from CodeAnt AI
- Fix ERC1155 typo in selectors.json (erc155 -> erc1155) - Add boolean coercion (!!) to flags.js for isSelfHosted, isStripeEnabled, isApproximatedEnabled - Update route documentation in accounts.js to match actual routes - Update route documentation in addresses.js to include all routes - Update route documentation in demo.js to match actual routes - Update route documentation in explorers.js with complete route list - Update route documentation in faucets.js to include all routes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent f282208 commit 5ac8c3d

File tree

7 files changed

+47
-18
lines changed

7 files changed

+47
-18
lines changed

run/api/accounts.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
* Manages imported accounts with private keys and native token balances.
44
* @module api/accounts
55
*
6-
* @route GET / - Get top native token holders
7-
* @route GET /imported - Get imported accounts
8-
* @route POST / - Import new account
9-
* @route DELETE /:address - Remove imported account
6+
* @route GET / - Get filtered native token balances (paginated)
7+
* @route GET /imported - Get imported accounts for current user
8+
* @route POST /:address/syncBalance - Update account balance
9+
* @route POST /:address/privateKey - Store encrypted private key for account
1010
*/
1111

1212
const express = require('express');

run/api/addresses.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44
* @module api/addresses
55
*
66
* @route GET /:address/tokenTransferHistory - Get token transfer count over time
7+
* @route GET /:address/spentTransactionFeeHistory - Get transaction fees spent over time
8+
* @route GET /:address/transactionHistory - Get transaction count over time
9+
* @route GET /:address/internalTransactions - Get internal transactions for address
710
* @route GET /:address/tokenTransfers - Get token transfers for address
11+
* @route GET /:address/stats - Get address transaction statistics
12+
* @route GET /:address/nativeTokenBalance - Get current native token balance
13+
* @route GET /:address/balances - Get latest token balances
814
* @route GET /:address/transactions - Get transactions for address
9-
* @route GET /:address/stats - Get address statistics
10-
* @route GET /:address - Get address details
1115
*/
1216

1317
const express = require('express');

run/api/demo.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
* Creates and manages demo explorers for trial users.
44
* @module api/demo
55
*
6-
* @route POST / - Create demo explorer
7-
* @route POST /:id/dex - Create demo DEX integration
8-
* @route POST /:id/claim - Claim demo explorer to user account
6+
* @route POST /explorers/:id/v2_dexes - Create V2 DEX for demo explorer
7+
* @route GET /explorers - Get demo explorer by token
8+
* @route POST /migrateExplorer - Migrate demo explorer to user account with trial
9+
* @route POST /explorers - Create new demo explorer
910
*/
1011

1112
const express = require('express');

run/api/explorers.js

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,31 @@
33
* Manages explorer lifecycle: creation, configuration, syncing, and billing.
44
* @module api/explorers
55
*
6-
* @route GET /:id/orbitConfig - Get Orbit L2 configuration
6+
* @route GET / - Get user's explorers (paginated)
7+
* @route GET /:id - Get explorer by ID
78
* @route POST / - Create new explorer
8-
* @route PUT /:id - Update explorer settings
99
* @route DELETE /:id - Delete explorer
10-
* @route POST /:id/sync - Start/stop block synchronization
10+
* @route GET /search - Search explorer by domain
11+
* @route GET /:id/orbitConfig - Get Orbit L2 configuration
12+
* @route PUT /:id/orbitConfig - Update Orbit L2 configuration
13+
* @route POST /:id/orbitConfig - Create Orbit L2 configuration
14+
* @route PUT /:id/startSync - Start block synchronization
15+
* @route PUT /:id/stopSync - Stop block synchronization
1116
* @route GET /:id/syncStatus - Get synchronization status
17+
* @route POST /:id/settings - Update explorer settings
18+
* @route POST /:id/branding - Update explorer branding
19+
* @route POST /:id/domains - Add custom domain
20+
* @route POST /:id/faucets - Create faucet for explorer
21+
* @route POST /:id/v2_dexes - Create V2 DEX for explorer
22+
* @route GET /billing - Get billing summary
23+
* @route GET /plans - Get available subscription plans
24+
* @route POST /:id/subscription - Create subscription
25+
* @route PUT /:id/subscription - Update subscription
26+
* @route DELETE /:id/subscription - Cancel subscription
27+
* @route POST /:id/startTrial - Start trial subscription
28+
* @route POST /:id/cryptoSubscription - Create crypto payment subscription
29+
* @route PUT /:id/quotaExtension - Update quota extension
30+
* @route DELETE /:id/quotaExtension - Remove quota extension
1231
*/
1332

1433
const { getNodeEnv, getAppDomain, getDefaultPlanSlug, getDefaultExplorerTrialDays, getStripeSecretKey } = require('../lib/env');

run/api/faucets.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
* @module api/faucets
55
*
66
* @route GET /:id/transactionHistory - Get faucet drip history
7+
* @route GET /:id/tokenVolume - Get token volume over time
8+
* @route GET /:id/requestVolume - Get request volume over time
9+
* @route GET /:id/privateKey - Get faucet wallet private key (owner only)
10+
* @route GET /:id/balance - Get current faucet balance
711
* @route POST /:id/drip - Request tokens from faucet
8-
* @route PUT /:id - Update faucet configuration
9-
* @route POST / - Create new faucet
12+
* @route PUT /:id - Update faucet amount and interval
13+
* @route PUT /:id/activate - Activate faucet
14+
* @route PUT /:id/deactivate - Deactivate faucet
1015
* @route DELETE /:id - Delete faucet
1116
*/
1217

run/lib/abis/selectors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"errors": []
3636
},
3737

38-
"erc155": {
38+
"erc1155": {
3939
"functions": [
4040
"0x00fdd58ea",
4141
"0x4e1273f46",

run/lib/flags.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
module.exports = {
88
/** @returns {boolean} True if running in self-hosted mode */
9-
isSelfHosted: () => process.env.SELF_HOSTED,
9+
isSelfHosted: () => !!process.env.SELF_HOSTED,
1010

1111
/** @returns {boolean} True if Pusher/Soketi is configured and enabled */
1212
isPusherEnabled: () => !!process.env.SOKETI_DEFAULT_APP_ID && !!process.env.SOKETI_DEFAULT_APP_KEY && !!process.env.SOKETI_DEFAULT_APP_SECRET && !!process.env.SOKETI_HOST && !!process.env.SOKETI_PORT,
1313

1414
/** @returns {boolean} True if Stripe billing is configured */
15-
isStripeEnabled: () => process.env.STRIPE_WEBHOOK_SECRET && process.env.STRIPE_SECRET_KEY,
15+
isStripeEnabled: () => !!(process.env.STRIPE_WEBHOOK_SECRET && process.env.STRIPE_SECRET_KEY),
1616

1717
/** @returns {boolean} True if Firebase authentication is enabled */
1818
isFirebaseAuthEnabled: () => !!process.env.ENABLE_FIREBASE_AUTH,
@@ -21,7 +21,7 @@ module.exports = {
2121
isGoogleApiEnabled: () => !!process.env.GOOGLE_API_KEY,
2222

2323
/** @returns {boolean} True if Approximated SSL is configured */
24-
isApproximatedEnabled: () => process.env.APPROXIMATED_API_KEY && process.env.APPROXIMATED_TARGET_IP,
24+
isApproximatedEnabled: () => !!(process.env.APPROXIMATED_API_KEY && process.env.APPROXIMATED_TARGET_IP),
2525

2626
/** @returns {boolean} True if NODE_ENV is 'production' */
2727
isProductionEnvironment: () => process.env.NODE_ENV == 'production',

0 commit comments

Comments
 (0)