We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1746c5 commit 84b3d9eCopy full SHA for 84b3d9e
packages/cli/src/command-helpers/contracts.ts
@@ -160,10 +160,10 @@ export class ContractService {
160
const network = this.registry.getNetworkById(networkId);
161
if (!network) throw new Error(`Invalid network ${networkId}`);
162
163
- const chainId = network.caip2Id.split(':')[1];
164
- if (!/^\d+$/.test(chainId))
165
- throw new Error(`Invalid chainId, Sourcify API expects integer value, got '${chainId}'`);
+ if (!network.caip2Id.startsWith('eip155'))
+ throw new Error(`Invalid chainId, Sourcify API only supports EVM chains`);
166
+ const chainId = network.caip2Id.split(':')[1];
167
const url = `https://sourcify.dev/server/files/any/${chainId}/${address}`;
168
const json:
169
| {
0 commit comments