Skip to content

Commit 31a46aa

Browse files
committed
update
1 parent 064bcc4 commit 31a46aa

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • examples/oft-solana/tasks/solana

examples/oft-solana/tasks/solana/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,14 @@ export const getSolanaDeployment = (
166166

167167
/**
168168
* Safely load the OFT store PDA for a given Solana endpoint.
169-
* Logs a warning if the deployment file is missing or malformed,
170-
* and returns null so consumers can decide how to proceed.
169+
* Returns null silently if deployment file doesn't exist (expected during create).
170+
* Logs a warning only if the file exists but is malformed.
171171
*/
172172
export const getOftStoreAddress = (eid: EndpointId): string | null => {
173+
const filePath = path.join('deployments', endpointIdToNetwork(eid), 'OFT.json')
174+
if (!existsSync(filePath)) {
175+
return null
176+
}
173177
try {
174178
const { oftStore } = getSolanaDeployment(eid)
175179
if (!oftStore) {

0 commit comments

Comments
 (0)