SX Network
Search…
Verifying a Smart Contract
Our block explorer https://explorer.sx.technology/ includes the ability for developers to verify any previously-deployed contracts.
Developers can reference this page which describes the verification process within two parts - the first being the preliminary steps required to pre-verify their contract and the final piece consisting of how developers can use our explorer's contract verification form to verify their contracts.
We expect to provide a more seamless contract verification process in the coming months once Polygon-Edge supports the traceTransaction JSON-RPC endpoint needed for instant contract pre-verification. Until that time comes, developers will need to complete the pre-verification process manually (see Part I below).

I. Prepare your Smart Contracts for verification

Follow the simple steps below to prepare your Smart Contracts for verification:
  1. 1.
    Once your contracts have been deployed (we suggest flattening first, see Part II for our reasoning why), please reach out to our dev team, providing them with any addresses that require verification.
  2. 2.
    Our team will then get back to you once we've pre-configured your addresses to be verifiable.
  3. 3.
    On BlockScout, you'll now see a new Code tab appear within the address pages of your contracts.
  4. 4.
    You can then proceed to verify these contracts yourself via 'Standard Input JSON' (see Part II below).

II. Verifying via Standard Input JSON

Proxy/upgradeable contract verification isn't currently available on our explorer however this functionality will be supported in the near future.
Please fill out all fields according to the official BlockScout docs here - note that the uploaded JSON file should only consist of the following 3 keys taken from the input key:
  • language
  • sources
    • Within this section, we suggest you remove all entries that are unrelated to the contract you are verifying as any entries within this section will be included within the Code tab
      • It is highly recommended to first flatten your Smart Contract prior to deploying - this will make it easier to distinguish required imports from other .sol files within your repository.
  • settings
For your convenience, we've included an example .json file which can be referenced below:
1
{
2
"language": "Solidity",
3
"sources": {
4
"@openzeppelin/contracts/token/ERC20/IERC20.sol": {
5
"content": "// SPDX-License-Identifier: MIT ..."
6
},
7
​
8
...
9
​
10
"contracts/tokens/TestToken.sol": {
11
"content": "// SPDX-License-Identifier: MIT ..."
12
},
13
},
14
"settings": {
15
"optimizer": {
16
"enabled": true,
17
"runs": 200
18
},
19
"outputSelection": {
20
"*": {
21
"*": [
22
"abi",
23
"evm.bytecode",
24
"evm.deployedBytecode",
25
"evm.methodIdentifiers",
26
"metadata",
27
"storageLayout",
28
"devdoc",
29
"userdoc",
30
"evm.gasEstimates"
31
],
32
"": [
33
"ast"
34
]
35
}
36
},
37
"metadata": {
38
"useLiteralContent": true
39
}
40
}
41
}
Copied!
After filling the form click the Verify & publish button and wait for the response.
In a few moments you'll see a green check mark appear within the Code tab indicating that your contract has been verified successfully.
Additionally, you'll see a Read Contract and Write Contract tab which will allow users to interact with all read and write functions of your Smart Contract.