Skip to content

Conversation

@nazreen
Copy link
Contributor

@nazreen nazreen commented Dec 12, 2025

Problem

We have an important partner who uses a non-Squads multisig. The current implementation results in the assertion being triggered. Due to this, that parter's implementation had to fork the devtools-solana package. This PR will remove the need to maintain that fork.

Changes

Introduce env var to allow for skipping of assertValidSolanaAdmin. This was the simplest change possible given the requirement.

Testing

  • Deploy Solana OFT as usual.
  • Wire as usual.
  • Modify LZ Config to update the solanaContract's delegate to be a PDA not owned by System Program or the Squads Multisig Program. For simplicity, we can use the ULN302 Msg Lib PDA (2XgGZG4oP29U3w5h4nTk1V2LFHL23zKDPJjs3psGzLKQ)

Run without the env var

npx hardhat lz:oapp:wire --oapp-config layerzero.config.ts
...
Error: SOLANA_INVALID_OWNER_OR_DELEGATE
Fix suggestion: The owner or delegate of the Solana OApp must either be a regular on curve address or a Squads Vault Account.
Elaboration: Ensure that you are using a regular on-curve Solana address or a Squads Vault PDA as the owner or delegate of the OApp.

error:   [OApp] Failed to check OApp delegate for [DgQrWVJvhgRigzKA5Kyz3qnRHV54X2tPmVRpsULma5Uu @ SOLANA_V2_TESTNET]: Error: Invalid owner/delegate address 2XgGZG4oP29U3w5h4nTk1V2LFHL23zKDPJjs3psGzLKQ. Must be a valid on-curve address or a Squads Vault PDA.
error:   [OApp] Failed to check OApp configuration: Error: Invalid owner/delegate address 2XgGZG4oP29U3w5h4nTk1V2LFHL23zKDPJjs3psGzLKQ. Must be a valid on-curve address or a Squads Vault PDA.
An unexpected error occurred:

Run with the env var

$ LZ_SKIP_SOLANA_ADMIN_VALIDATION=1 npx hardhat lz:oapp:wire --oapp-config layerzero.config.ts
...
info:    [OApp] Checking OApp delegates configuration

Warning:LZ_SKIP_SOLANA_ADMIN_VALIDATION is set. Skipping Solana admin validation. Only use this is you are using a non-Squads Multisig

info:    [OApp] ✓ Checked OApp delegates
info:    [OApp] ✓ Checked OApp configuration
info:    There is 1 transaction required to configure the OApp
? Would you like to preview the transactions before continuing? › (Y/n)

@github-actions
Copy link
Contributor

🚨 E2E Tests Failed

The E2E tests failed during CI. These tests validate real blockchain interactions and may fail due to:

This is non-blocking and does not prevent merging. Check the action logs above for detailed failure information.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

🚨 E2E Tests Failed

The E2E tests failed during CI. These tests validate real blockchain interactions and may fail due to:

This is non-blocking and does not prevent merging. Check the action logs above for detailed failure information.

@nazreen nazreen marked this pull request as ready for review January 6, 2026 01:04
@cursor
Copy link

cursor bot commented Jan 6, 2026

PR Summary

Introduces an optional escape hatch for Solana admin validation.

  • Adds LZ_SKIP_SOLANA_ADMIN_VALIDATION to assertValidSolanaAdmin, skipping validation with a warning when set
  • Passes LZ_SKIP_SOLANA_ADMIN_VALIDATION through in turbo.json
  • Updates examples/oft-solana/layerzero.config.ts to set a Solana delegate PDA for demonstration/testing
  • Adds a changeset marking a patch release for @layerzerolabs/devtools-solana

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

contracts: [{ contract: arbitrumContract }, { contract: solanaContract }],
contracts: [
{ contract: arbitrumContract },
{ contract: solanaContract, config: { delegate: '2XgGZG4oP29U3w5h4nTk1V2LFHL23zKDPJjs3psGzLKQ' } },
Copy link

Choose a reason for hiding this comment

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

Test delegate address accidentally left in example config

The example configuration file now includes a hardcoded test delegate address (2XgGZG4oP29U3w5h4nTk1V2LFHL23zKDPJjs3psGzLKQ). According to the PR description's "Testing" section, this ULN302 Msg Lib PDA was used specifically to verify the escape hatch feature works. This test configuration appears to have been accidentally committed and would affect users who clone this example as a template, potentially causing deployment issues since they'd have an unexpected delegate address that isn't theirs.

Fix in Cursor Fix in Web

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