@0xos/sourcify-abi-retriever
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -26,3 +26,3 @@ interface ContractInfo { | ||
}>; | ||
declare function retrieveMetadataFile(chainId: string, address: string, server: string): Promise<string | null>; | ||
declare function retrieveMetadataFile(chainId: string, address: string, server: string): Promise<string | null | undefined>; | ||
export { checkAndRetrieveABI, checkIfIsVerified, retrieveMetadataFile }; |
@@ -125,3 +125,3 @@ "use strict"; | ||
catch (error) { | ||
throw new Error(`Failed to retrieve metadata file: ${error}`); | ||
console.log(error); | ||
} | ||
@@ -128,0 +128,0 @@ }); |
@@ -16,7 +16,7 @@ "use strict"; | ||
const contractInfo = { | ||
address: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f', | ||
address: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', | ||
chainIds: [5, 1, 56], | ||
}; | ||
const contractInfoNoChain = { | ||
address: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f', | ||
address: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', | ||
}; | ||
@@ -23,0 +23,0 @@ try { |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "dist/index.js", | ||
@@ -22,3 +22,7 @@ "author": { | ||
"test": "node ./dist/test.js" | ||
}, | ||
"devDependencies": { | ||
"tsc": "^2.0.4", | ||
"typescript": "^5.2.2" | ||
} | ||
} | ||
} |
@@ -131,3 +131,3 @@ import axios, { AxiosResponse } from 'axios'; | ||
async function retrieveMetadataFile(chainId: string, address: string, server: string): Promise<string | null> { | ||
async function retrieveMetadataFile(chainId: string, address: string, server: string): Promise<string | null | undefined> { | ||
try { | ||
@@ -148,3 +148,3 @@ const apiUrl = `${server}/files/tree/any/${chainId}/${address}`; | ||
} catch (error) { | ||
throw new Error(`Failed to retrieve metadata file: ${error}`); | ||
console.log(error) | ||
} | ||
@@ -151,0 +151,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21341
2