diff --git a/.env.example b/.env.example index 9c951dd..a9dfef6 100644 --- a/.env.example +++ b/.env.example @@ -26,6 +26,5 @@ REGISTRY_FEES=900000alnt REGISTRY_GAS_PRICE=0.001 # Application Configuration -APP_NAME=gor-deploy DEPLOYER_LRN= LACONIC_TRANSFER_AMOUNT=1000000alnt diff --git a/.gitignore b/.gitignore index 24c06b8..6214ebd 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ yarn-error.log* # env files (can opt-in for committing if needed) .env.local +.env # vercel .vercel diff --git a/src/app/api/registry/route.ts b/src/app/api/registry/route.ts index d3790a7..864478a 100644 --- a/src/app/api/registry/route.ts +++ b/src/app/api/registry/route.ts @@ -6,6 +6,9 @@ import axios from 'axios'; import { verifyUnusedSolanaPayment } from '@/utils/solanaVerify'; import { transferLNTTokens } from '@/services/laconicTransfer'; +// Use CAIP convention for chain ID: namespace + reference +const SOLANA_CHAIN_ID = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp'; // Solana mainnet + // Sleep helper function const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); @@ -398,8 +401,7 @@ export async function POST(request: NextRequest) { repository: repoUrl, repository_ref: fullHash, external_payment: { - // Use CAIP convention for chain ID: namespace + reference - chain_id: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', // Solana mainnet + chain_id: SOLANA_CHAIN_ID, tx_hash: txHash, // TODO: Take pubkey from user and add it // pubkey: '' diff --git a/src/config/index.ts b/src/config/index.ts index 58f8f14..6ad4cf2 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -32,18 +32,6 @@ export const getRegistryConfig = (): RegistryConfig => { }; }; -export const getDeployerLrn = (): string => { - if (!process.env.DEPLOYER_LRN) { - throw new Error('Missing environment variable: DEPLOYER_LRN'); - } - return process.env.DEPLOYER_LRN; -}; - -export const getAppName = (): string => { - return process.env.APP_NAME || 'gor-deploy'; -}; - - export const getLaconicTransferConfig = () => { const requiredEnvVars = [ 'REGISTRY_USER_KEY', // Same account as the registry user