Skip to content

Conversation

@nazreen
Copy link
Contributor

@nazreen nazreen commented Jan 16, 2026

There should be a helper to go from endpoint id to network name

Problem

  • No public utility to go from endpoint ID to chain ID, though there is one for going from endpoint ID to network name
  • getDefaultChainId (from network name to chain ID) exists in verify-contract but wasn't exported

Changes

  • Export getDefaultChainId from @layerzerolabs/verify-contract (one keyword change)

Notes

  • Somehow we only store the mapping between chainkey and chain ID in the verify-contract package
  • The best place imo to export a helper for eid -> chainId is lz-definitions but that package is in monorepo, not in devtools. Easier to make the change here. Also, lz-definitions does not currently have chainkey<>chainId mapping

How to use

import { getDefaultChainId } from '@layerzerolabs/verify-contract'                                            
                                                                                                                
getDefaultChainId('ethereum-mainnet')  // 1                                                                   
getDefaultChainId('polygon-mainnet')   // 137                                                                 
getDefaultChainId('hyperevm-mainnet')  // 999 

--only-oft-store should be a flag, not param

Problem

  • --only-oft-store required passing true as a value, which is verbose for a boolean flag.

Changes

  • Converted --only-oft-store from boolean param to a flag in createOFT.ts and setAuthority.ts
    across oft-solana and lzapp-migration examples.
  • Updated error messages, prompts, and README docs to use --only-oft-store (no true).

Solana OFT: Prompts should respect --ci flag

Problem

  • Several prompts in oft-solana tasks ignored the --ci flag, requiring manual confirmation even in CI mode.

Changes

  • createOFT.ts: Wrapped confirmMaxSupply and continueFreezeAuthority prompts with if (!ci) checks.
  • createOFTAdapter.ts: Added --ci flag and wrapped confirmMaxSupply prompt.
  • setUpdateAuthority.ts: Added --ci flag and wrapped doContinue prompt.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

🧪 E2E Test Status

E2E tests are non-blocking and validate real blockchain interactions. Failures may occur due to network issues, RPC rate limits, or external service downtime.

Test Runs (Newest First):

  • Run #6714 - Passed - 2026-02-10 16:49 (UTC)
  • Run #6625 - Passed - 2026-01-23 01:43 (UTC)
  • Run #6607 - Passed - 2026-01-22 01:42 (UTC)
  • Run #6604 - Passed - 2026-01-21 23:56 (UTC)
  • Run #6571 - Passed - 2026-01-16 23:33 (UTC)

@nazreen
Copy link
Contributor Author

nazreen commented Jan 20, 2026

will collapse this into another PR

@nazreen nazreen changed the title param to flag QoL batch 2 Jan 21, 2026
@nazreen nazreen changed the title QoL batch 2 DEVREL-1240 QoL batch 2 Jan 23, 2026
@nazreen nazreen marked this pull request as ready for review January 29, 2026 01:04
@cursor
Copy link

cursor bot commented Jan 29, 2026

PR Summary

Low Risk
Mostly CLI/task UX changes and documentation updates; minimal functional risk beyond altered command-line semantics and reduced prompting when --ci is used.

Overview
Improves Solana OFT example tasks by converting --only-oft-store from a boolean param to a flag, updating validation/errors/prompts accordingly, and updating both READMEs to show the new invocation (no true).

Adds/aligns CI mode behavior for Solana tasks: createOFT now skips max-supply and freeze-authority confirmations when --ci is set; createOFTAdapter and setUpdateAuthority gain a --ci flag and similarly bypass interactive prompts.

Exports getDefaultChainId from @layerzerolabs/verify-contract (packages/verify-contract/src/index.ts) to make the network-name → chainId lookup publicly usable.

Written by Cursor Bugbot for commit 1502c59. This will update automatically on new commits. Configure here.

@nazreen nazreen requested review from fabianhug and lzJxhn January 29, 2026 01:05
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant