Skip to content

Conversation

@nazreen
Copy link
Contributor

@nazreen nazreen commented Dec 9, 2025

Problem

  • The API endpoint (https://4fnetmviidiqkjzenwxe66vgoa0soerr.lambda-url.us-east-1.on.aws/isSquad/${address}) by Squads only works for mainnet.

Changes

  • Updated isSquadsV4Vault to take eid: EndpointId as first parameter and return null for Solana testnet (40168), since the Squads API only works on mainnet (30168). Throws for unsupported EIDs.

  • Refactored assertValidSolanaAdmin to use flattened early-return structure for better readability

  • Allow for PDAs owned by Squads V3 program (SMPLecH534NA9acpos4G6x7uf3LWbCAwZQE9e8ZekMu) - allows with warning instead of throwing

  • Addressed missing case of when address is off curve by not owned by System Program or a Squads program (we should throw)

  • Removed isPossibleSquadsVault function (unused, logic consolidated into assertValidSolanaAdmin)

  • Added debug logging throughout address validation helpers using lazy logger factory pattern (fixes issue where logs weren't respecting --log-level flag)

Testing

pnpm build --filter=./packages/devtools-solana
cd examples/oft-solana

deploy and wire as usual, then refer to Proof of Test section
(update the delegate address in the LZ config)

Proof of Test

Tip: when looking through the logs, search for 'Solana addresses'.

When new delegate is regular (onCurve) address (EKXXXF8kzh4Bnq1HBHVwZgA5egJJWLDYqXmJTQtbbd5D)

npx hardhat lz:oapp:wire --oapp-config layerzero.config.ts --ci --multisig-key 59jdDuB6khhBf9nwwyJfwGXPeEF2mxTMbQusNXGAXjff --log-level debug
...
debug:   [Solana addresses] [assertValidSolanaAdmin] start address=EKXXXF8kzh4Bnq1HBHVwZgA5egJJWLDYqXmJTQtbbd5D
debug:   [Solana addresses] [isOnCurveAddress] address=EKXXXF8kzh4Bnq1HBHVwZgA5egJJWLDYqXmJTQtbbd5D onCurve=true
debug:   [Solana addresses] [assertValidSolanaAdmin] address=EKXXXF8kzh4Bnq1HBHVwZgA5egJJWLDYqXmJTQtbbd5D valid

When new delegate is a Squads v4 vault on devnet (DokBLkqgnws2GsfBcbowX1bYqk4noYEhcDDdTZDV8Yh)

npx hardhat lz:oapp:wire --oapp-config layerzero.config.ts --ci --multisig-key 59jdDuB6khhBf9nwwyJfwGXPeEF2mxTMbQusNXGAXjff --log-level debug
...
debug:   [Solana addresses] [assertValidSolanaAdmin] start address=DokBLkqgnws2GsfBcbowX1bYqk4noYEhcDDdTZDV8Yh
debug:   [Solana addresses] [isOnCurveAddress] address=DokBLkqgnws2GsfBcbowX1bYqk4noYEhcDDdTZDV8Yh onCurve=false
debug:   [Solana addresses] [assertValidSolanaAdmin] address=DokBLkqgnws2GsfBcbowX1bYqk4noYEhcDDdTZDV8Yh valid: off-curve, account does not exist (possibly unfunded Squads Vault)

When new delegate is a Squads v4 Multisig (invalid) on devnet (59jdDuB6khhBf9nwwyJfwGXPeEF2mxTMbQusNXGAXjff)

npx hardhat lz:oapp:wire --oapp-config layerzero.config.ts --ci --multisig-key 59jdDuB6khhBf9nwwyJfwGXPeEF2mxTMbQusNXGAXjff --log-level debug
...
debug:   [Solana addresses] [assertValidSolanaAdmin] start address=59jdDuB6khhBf9nwwyJfwGXPeEF2mxTMbQusNXGAXjff
debug:   [Solana addresses] [isOnCurveAddress] address=59jdDuB6khhBf9nwwyJfwGXPeEF2mxTMbQusNXGAXjff onCurve=false
debug:   [Solana addresses] [assertValidSolanaAdmin] address=59jdDuB6khhBf9nwwyJfwGXPeEF2mxTMbQusNXGAXjff invalid: off-curve, account exists, owned by Squads Program (multisig account)
Error: SOLANA_OWNER_OR_DELEGATE_MULTISIG_ACCOUNT
Fix suggestion: The owner or delegate of the Solana OApp must not be the Squads multisig account address.
Elaboration: If you intend to use Squads Multisig, ensure that you are providing a Squads Vault address as the owner or delegate of the OApp. The Squads Multisig account address cannot be the owner or delegate.

error:   [OApp] Failed to check OApp delegate for [5jBe5bLSsm1wXu6YD5KTDyDehFmgUrE4Crw9LyedkWTe @ SOLANA_V2_TESTNET]: Error: Invalid owner/delegate address 59jdDuB6khhBf9nwwyJfwGXPeEF2mxTMbQusNXGAXjff. This is a Squads multisig account. Use the vault address instead.
error:   [OApp] Failed to check OApp configuration: Error: Invalid owner/delegate address 59jdDuB6khhBf9nwwyJfwGXPeEF2mxTMbQusNXGAXjff. This is a Squads multisig account. Use the vault address instead.
verbose: [::lz:oapp:wire:configure] Encountered an error: Error: Invalid owner/delegate address 59jdDuB6khhBf9nwwyJfwGXPeEF2mxTMbQusNXGAXjff. This is a Squads multisig account. Use the vault address instead.
An unexpected error occurred:

Error: An error occurred while getting the OApp configuration: Error: Invalid owner/delegate address 59jdDuB6khhBf9nwwyJfwGXPeEF2mxTMbQusNXGAXjff. This is a Squads multisig account. Use the vault address instead.

@nazreen nazreen marked this pull request as ready for review December 9, 2025 19:02
@nazreen nazreen requested a review from rad-lz December 9, 2025 19:02
@nazreen nazreen changed the title DEVREL-1012 Vault detection when solana devnet DEVREL-1012 fix squads vault detection Dec 9, 2025
@nazreen nazreen requested a review from DanL0 December 9, 2025 19:04
@nazreen nazreen enabled auto-merge December 9, 2025 19:04
rad-lz
rad-lz previously approved these changes Dec 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

🚨 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 Dec 9, 2025

🚨 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.

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.

2 participants