Skip to content

Commit ed492e5

Browse files
Add external verification documentation page (#47)
* Add external verification documentation page * Update docs/3. Verification/11. externalVerifiers.md Co-authored-by: Kaan Uzdoğan <kaanuzdogan@gmail.com> --------- Co-authored-by: Kaan Uzdoğan <kaanuzdogan@gmail.com>
1 parent eee0967 commit ed492e5

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
id: external-verifiers
3+
title: Automatic verification on external verifiers
4+
slug: /external-verifiers
5+
---
6+
7+
# Automatic verification on external verifiers
8+
9+
Whenever Sourcify finds a match, it automatically forwards the contract for verification to external verification services like Blockscout, Routescan, and Etherscan. In practice, this lets Sourcify act as a single verification entry point, so a contract gets verified across all supported explorers in one go.
10+
11+
Keep in mind Etherscan API has a strict 200 verifications/day per API key. This limit gets filled quickly and we can't share all verifications with Etherscan.
12+
13+
Sourcify can trigger external verification through any of its API endpoints, but tracking the verification's status is only supported by the v2 APIs. Now the verification job endpoint (`/v2/verify/{verificationId}`) returns the external status URL you can poll. The response also includes a direct link to the contract’s page on the relevant explorer
14+
15+
```json
16+
{
17+
...,
18+
externalVerifications: {
19+
blockscout: {
20+
verificationId: "x3ryqcqr1zdknhfhkimqmizlcqpxncqc6nrvp3pgrcpfsqedqi",
21+
statusUrl: "https://api.etherscan.io/v2/api?chainid=1&module=contract&action=checkverifystatus&guid=x3ryqcqr1zdknhfhkimqmizlcqpxncqc6nrvp3pgrcpfsqedqi",
22+
explorerUrl: "https://etherscan.io/address/0x0D41E0B7bbdEBDBc684020dcb64ADe76C0338222#code",
23+
}
24+
}
25+
...
26+
}
27+
```
28+
29+
Via the Sourcify UI users can keep track of the external verifications' status live.
30+
31+
## Enabling external verification in Sourcify Server
32+
33+
If you are maintaining a Sourcify server instance you can enable external verification by using the appropriate Storage services. The appropriate storage service must be configured for each external verifier.
34+
35+
```json
36+
// services/server/src/config/local.js
37+
{
38+
...
39+
storage: {
40+
...
41+
writeOrWarn: [
42+
...
43+
WStorageIdentifiers.EtherscanVerify,
44+
WStorageIdentifiers.BlockscoutVerify,
45+
WStorageIdentifiers.RoutescanVerify,
46+
...
47+
],
48+
...
49+
},
50+
...
51+
}
52+
```
53+
54+
Remember also to specify the API keys.
55+
56+
```bash
57+
# services/server/.env
58+
BLOCKSCOUT_API_KEY=
59+
ROUTESCAN_API_KEY=
60+
# warn: Etherscan have a very strict rate limit of 200 verifications / day.
61+
ETHERSCAN_API_KEY=
62+
```

0 commit comments

Comments
 (0)