Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const envSchema = z.object({
PUBLIC_ADDRESS: z.string(),
MNEMONIC_SECRET_ARN: z.string().optional(),
AWS_REGION: z.string().optional(),
TESTNET: z.coerce.boolean(),
TESTNET: z.preprocess((str) => str === 'true', z.boolean()),
TOKEN_ADDRESS: z.string(),
PROVIDER_URL: z.string(),
Y2K_TOKEN_MIGRATION_ADDRESS: z.string(),
Expand Down
1 change: 1 addition & 0 deletions libs/HyperliquidManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class HyperliquidManager {
async init(arbitrumTokenDecimals: bigint) {
try {
await this.hlSdk.connect()
console.info('Connected to hyperliquid')
this.tokenInfo = await this.getTokenInfo(env.TOKEN_ADDRESS)
console.info(
`Using HL token with name ${this.tokenInfo.name} wei decimals ${this.tokenInfo.weiDecimals}`
Expand Down
4 changes: 2 additions & 2 deletions migrationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function main(runWithCron: boolean) {
redisOperations = new RedisOperations()
await redisOperations.initialize()

hlManager = new HyperliquidManager(true, true, privateKeyManager.getPrivateKey())
hlManager = new HyperliquidManager(false, env.TESTNET, privateKeyManager.getPrivateKey())

blockchainConnectionProvider = new BlockchainConnectionProvider({
providerUrl: env.PROVIDER_URL,
Expand All @@ -56,7 +56,7 @@ export async function main(runWithCron: boolean) {
console.error("Error initializing migration service due to the following error, skipping this run", error);
throw error;
}

console.info('migration service initialized')
if (runWithCron) {
console.info('starting cron job for migrations, running every 5 minutes')
const scheduledTask = cron.schedule('* * * * *', async () => {
Expand Down