In this section, we will go over the process of verifying a smart contract in Subscan. Verifying your smart contract allows for readable and interpretable data (such as function calls and parameters) to be displayed directly in Subscan, making it easier to understand and debug interactions with the contract.
SimpleStorage.sol
).Follow these steps to complete the verification process. We will be showing how this ca:
We will be using the same Remix IDE workspace that was used to deploy the SimpleStorage.sol
contract.
Once you are there:
artifacts/build-info/hex_value
file. This contains the content we need to move to the SimpleStorage_metadata.json
file.
content
line as shown in the screenshot above.After copying this content we will need to paste it into the SimpleStorage_metadata.json
file.
SimpleStorage_metadata.json
file.sources
object where the data for contract SimpleStorage.sol
is stored.license
field.
The next step is to simply download this file to your local machine. It will be used later in the verification process.
Now go to Subscan and search for your deployed contract address. Then go to the Contract
tab.
Contract Address
field matched your Smart Contract to verify.Compiler Type
.Include Nightly Builds
.Compiler Version
that was used when you compiled your smart contract.Verify & Publish
button.
A proper Contract Verification will have a ✅ next to Contract.
SimpleStorage
v0.8.26+commit.8a97fa7a
cancun
false
This indicates the deployed contract was compiled using Solidity version 0.8.26
, with the Ethereum Virtual Machine (EVM) set to cancun
, and without optimization enabled.
get
:
uint256
value.view
(read-only).set
:
uint256
value (_data
).nonpayable
(modifies the state).This confirms the contract has two primary functions:
set(uint256 _data)
: Stores a value.get()
: Retrieves the stored value.The source code of the contract is displayed as it was written:
set
: Allows the user to save a uint256
value in the contract’s state.get
: Returns the saved value without modifying the state.By completing the process, your contract will be displayed with all relevant details, as seen in the successful verification example above. This ensures a professional and polished deployment on the blockchain.
In this section, we will go over the process of verifying a smart contract in Subscan. Verifying your smart contract allows for readable and interpretable data (such as function calls and parameters) to be displayed directly in Subscan, making it easier to understand and debug interactions with the contract.
SimpleStorage.sol
).Follow these steps to complete the verification process. We will be showing how this ca:
We will be using the same Remix IDE workspace that was used to deploy the SimpleStorage.sol
contract.
Once you are there:
artifacts/build-info/hex_value
file. This contains the content we need to move to the SimpleStorage_metadata.json
file.
content
line as shown in the screenshot above.After copying this content we will need to paste it into the SimpleStorage_metadata.json
file.
SimpleStorage_metadata.json
file.sources
object where the data for contract SimpleStorage.sol
is stored.license
field.
The next step is to simply download this file to your local machine. It will be used later in the verification process.
Now go to Subscan and search for your deployed contract address. Then go to the Contract
tab.
Contract Address
field matched your Smart Contract to verify.Compiler Type
.Include Nightly Builds
.Compiler Version
that was used when you compiled your smart contract.Verify & Publish
button.
A proper Contract Verification will have a ✅ next to Contract.
SimpleStorage
v0.8.26+commit.8a97fa7a
cancun
false
This indicates the deployed contract was compiled using Solidity version 0.8.26
, with the Ethereum Virtual Machine (EVM) set to cancun
, and without optimization enabled.
get
:
uint256
value.view
(read-only).set
:
uint256
value (_data
).nonpayable
(modifies the state).This confirms the contract has two primary functions:
set(uint256 _data)
: Stores a value.get()
: Retrieves the stored value.The source code of the contract is displayed as it was written:
set
: Allows the user to save a uint256
value in the contract’s state.get
: Returns the saved value without modifying the state.By completing the process, your contract will be displayed with all relevant details, as seen in the successful verification example above. This ensures a professional and polished deployment on the blockchain.