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
5 changes: 5 additions & 0 deletions .changeset/giant-glasses-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@layerzerolabs/devtools-solana": patch
---

introduce escape hatch for assertValidSolanaAdmin
8 changes: 8 additions & 0 deletions packages/devtools-solana/src/common/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ export async function isSquadsV4Vault(eid: EndpointId, address: string): Promise
* - Address is off-curve AND account exists AND owned by Squads V3 Program (legacy, allowed with warning)
*/
export async function assertValidSolanaAdmin(connection: Connection, address: string): Promise<void> {
// Skip validation if environment variable is set
if (process.env.LZ_SKIP_SOLANA_ADMIN_VALIDATION) {
console.warn(
'\n\nWarning: LZ_SKIP_SOLANA_ADMIN_VALIDATION is set. Skipping Solana admin validation. Only use this is you are using a non-Squads Multisig.\n\n'
)
return
}

const logger = createLogger()
const pubkey = new PublicKey(address)

Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"LZ_ENABLE_EXPERIMENTAL_PARALLEL_EXECUTION",
"LZ_ENABLE_EXPERIMENTAL_RETRY",
"LZ_ENABLE_EXPERIMENTAL_SIMULATION",
"LZ_SKIP_SOLANA_ADMIN_VALIDATION",
"LZ_ENABLE_SOLANA_OAPP_EXAMPLE",
"LZ_ENABLE_READ_EXAMPLE",
"LZ_ENABLE_ZKSOLC_EXAMPLE",
Expand Down