Skip to content

feat(examples/lzapp-migration): unified send task + align DevEx with oft-solana - #1527

Merged
nazreen merged 17 commits into
mainfrom
codex/identify-devex-gaps-in-lzapp-migration
Jul 15, 2025
Merged

feat(examples/lzapp-migration): unified send task + align DevEx with oft-solana #1527
nazreen merged 17 commits into
mainfrom
codex/identify-devex-gaps-in-lzapp-migration

Conversation

@nazreen

@nazreen nazreen commented May 28, 2025

Copy link
Copy Markdown
Contributor

This PR was inited by Codex but had to be manually edited afterwards. Manual send testing was also done.

Summary

  • unify send task like in oft-solana
  • add in simple version of debug command
  • update .env.example to also contain Solana variables
  • improve ESLint config with modern module resolution
  • register all Solana tasks
  • use getSolanaKeypair in Solana helpers
  • add forge test script
  • update wiring task for async key loading

Affected tasks

  • send
  • debug (newly added)

My Tests

Solana to Sepolia - https://testnet.layerzeroscan.com/tx/38FAXsTFuGxNVbbJFVpRD4Y3NoTPAWHpDUzvcAQBryueDBkoT35WCg8dVXPNZkUQPuLXaJtiHsqHCZTdAyYAEgmY

Sepolia to Solana - https://testnet.layerzeroscan.com/tx/0xccbe7cdc8423f6ccf16174c81d01535005203681d92ac6da0f9280dcbf80a5e9

How you can test

Send

Make sure you have called setMinDstGas:

npx hardhat --network sepolia-testnet lz:lzapp:set-min-dst-gas --dst-eid 40168

Deploy as usual.

Run the send tasks.

Sepolia V1 to Solana:

npx hardhat --network sepolia-testnet  lz:oft:send --src-eid 10161 --dst-eid 40168 --amount 1 --to <SOLANA_ADDRESS>

Solana to Sepolia V1

npx hardhat lz:oft:send --amount 1 --src-eid 40168 --to <EVM_ADDRESS> --dst-eid 10161

Debug

Without needing to deploy:

npx hardhat lz:oft:solana:debug --oft-store G2XdmSk2NLVuF3hZkTRtHJBkDhK8AREEwAXoJrdq4YmS --eid 40168

If you deployed (uses solana deployment file):

npx hardhat lz:oft:solana:debug --eid 40168

@nazreen nazreen closed this May 28, 2025
@nazreen nazreen changed the title Improve lzapp-migration Solana tooling feat(examples/lzapp-migration): unified send task May 28, 2025
@nazreen nazreen reopened this May 28, 2025
Comment thread examples/lzapp-migration/tasks/evm/v1/sendEvm.ts Outdated
@nazreen

nazreen commented Jun 9, 2025

Copy link
Copy Markdown
Contributor Author

@nazreen
nazreen requested review from DanL0 and EWCunha June 10, 2025 06:43
@nazreen

nazreen commented Jun 26, 2025

Copy link
Copy Markdown
Contributor Author

CI is all green as of 16 days ago

St0rmBr3w
St0rmBr3w previously approved these changes Jun 26, 2025

@St0rmBr3w St0rmBr3w left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@nazreen nazreen changed the title feat(examples/lzapp-migration): unified send task feat(examples/lzapp-migration): unified send task + align DevEx with oft-solana Jul 2, 2025

@ItsAdel ItsAdel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm!

@nazreen
nazreen requested a review from Copilot July 3, 2025 20:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR aligns the lzapp-migration example with the oft-solana patterns, introduces a unified lz:oft:send task for both EVM and Solana, and enhances DevEx tooling for Solana (notably by using getSolanaKeypair and adding a debug command).

  • Introduce sendSolana, sendEvm, and a top-level lz:oft:send task for unified cross-chain sends
  • Swap direct env-key loading for getSolanaKeypair in Solana helpers and add a debug task
  • Update .env.example, ESLint config, and task exports to support new tooling

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

File Description
examples/oft-solana/.env.example Grouped EVM vars, added Solana-specific env settings
examples/lzapp-migration/tasks/solana/utils.ts Added parseDecimalToUnits and silenceSolana429 helpers
examples/lzapp-migration/tasks/solana/index.ts Refactored deriveConnection and useWeb3Js to use getSolanaKeypair
examples/lzapp-migration/tasks/index.ts Swapped in unified send task and new Solana commands
Comments suppressed due to low confidence (3)

examples/lzapp-migration/tasks/index.ts:13

  • There is no setAuthority.ts file in the solana tasks directory; it looks like this should import setUpdateAuthority.ts instead.
import './solana/setAuthority'

examples/lzapp-migration/tasks/index.ts:14

  • No updateMetadata.ts exists in the solana folder; verify the correct filename or remove this import.
import './solana/updateMetadata'

examples/lzapp-migration/tasks/index.ts:16

  • There is no getPrioFees.ts module in the solana tasks; confirm the intended file or update the import path.
import './solana/getPrioFees'

Comment thread examples/lzapp-migration/tasks/solana/utils.ts
Comment thread examples/lzapp-migration/tasks/solana/retryPayload.ts
Comment thread examples/lzapp-migration/tasks/solana/index.ts
Comment thread examples/lzapp-migration/tasks/evm/v1/sendEvm.ts

@St0rmBr3w St0rmBr3w left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor comments, otherwise looks good

@St0rmBr3w St0rmBr3w left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@nazreen
nazreen merged commit c74f410 into main Jul 15, 2025
11 checks passed
@nazreen
nazreen deleted the codex/identify-devex-gaps-in-lzapp-migration branch July 15, 2025 17:29
mattsse pushed a commit to mattsse/devtools that referenced this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants