*Paid Advertisement. Not financial advice. RugDoc is not responsible for the projects showcased here. DYOR and ape safu.

How to verify a smart contract on Etherscan

In order to update token information on Etherscan, the token contract address for the token must be verified. That is to ensure that the contract code is exactly what is being deployed onto the blockchain and allows public to audit and read the contract. Etherscan ensures all token contract must be verified before they can be updated with information submitted by the contract owner.

How to start verifying #

The first thing to do is to go to Etherscan and open the Smart Contract Verification tool:

It is a two-step process:

  1. Provide the address and information about the environment in which the smart contract will be created, or find your contract from Etherscan and point it directly to the Smart Contract Verification tool.
  2. Provide detailed information about the smart contract itself.

Provide information about the smart contract environment #

In this step, you need to fill in three fields. Compiler Type is the type of project you have before deploying a contract on the Etherscan network.

The Etherscan Smart Contracts Validation tool provides four options for the compiler type.

  • Solidity – single file
  • Solidity – multiple files
  • Solidity – standard JSON input
  • Vyper – currently marked as experimental

After selecting the compiler type, the Compiler Version field will appear. You need to use it exactly right, otherwise Etherscan will not be able to validate your smart contract. Therefore, make sure you know exactly which compiler version you are using when constructing your contract and then select it from the drop-down options. For example, you can find the compiler version on remix.

After selecting the “Compiler Type” and “Compiler Version” and providing the contract address, you need to select an “Open Source License Type”. The current options are:

  • No license
  • Unlicense
  • MIT License
  • GNU General Public License v2.0
  • GNU General Public License v3.0
  • GNU Lesser General Public License v2.1
  • GNU Lesser General Public License v3.0
  • BSD 2-clause “Simplified” license
  • BSD 3-clause “New” or “Revised” license
  • Mozilla Public License 2.0
  • Open Software License 3.0
  • Apache 2.0

Once you have done so, you can accept the terms and proceed to the next and final step of the verification process.

Provide smart contract details #

For demo, this article will use single file “compiler type”, but the rest of the options are similar in process.

The first row of fields contains the details provided in the first step, as well as options for specifying whether to use optimization when compiling the contract. For those issues that are not recognized, the compiler’s optimization options will attempt to remove unneeded instructions to reduce gas consumption.

Next is the source code for your smart contract. In our example, we have a text area where we need to paste the code, but, for example, in the case of selecting the “compiler type” for multiple files in the first step, we will have a file upload input that can be used to upload all the files for the deployment contract.

Constructor arguments #

This section can be skipped if no arguments are provided when deploying the contract, however, if you do so, you will need to provide the value of its ABI code. However, it is actually possible to verify without any ABI code values.

To do this, you can use the ABI encoding tool from HashEx. scroll down to the “or manually enter parameters” section and enter the parameters, making sure to select the correct type from the drop-down list.

Library #

The section below the Constructed Function Parameters section is the Smart Contracts Library address. It allows you to add the name and address of the smart contract used by the smart contract.

For example, if your smart contract is too large, you can split it into two smart contracts. You can then deploy one smart contract (a smart contract with some of the utility features used by the second smart contract), then deploy the second smart contract and specify that it uses the first smart contract as a library during the validation process.

This section is optional and is only required if your smart contract uses the functionality of another smart contract already deployed on the Ethernet network.

Miscellaneous settings #

You can choose to modify other settings (they have default settings).

  • Runs – the number of code runs you want to optimize the program to run.
  • EVM version – The specific version of the Ethernet virtual machine you want to compile.
  • License type – This is the same as the one we introduced in the first step of the validation process.

In most cases, you do not need to change any of these settings.

After providing all the details correctly, please prove that you are not a robot and click on the “Verify and Publish” button. If everything goes well, the contract will be verified and you will be able to view its code on the “contract” tab of the Etherscan page of the smart contract.

Updated on October 19, 2021
How do you feel about this article?
 

Leave a Reply

*Paid Advertisement. Not financial advice. RugDoc is not responsible for the projects showcased here. DYOR and ape safu.

Our mission here at RugDoc is to screen for hard rug code that results in 100% theft of ALL underlying funds for ALL participants.

This is the ONE part of the due diligence process that most people cannot simply do on their own as it costs thousands of dollars to hire a senior solidity developer to look over a farm for safety.

A project coin with terrible code can go up in price, and a project with good code and a good team can also go down in price.

Do NOT use our ratings to refer to your likelihood in making money if you invest in the project. They are ONLY in reference to code safety.

Everything else beyond code safety is YOUR responsibility to go do research on. We just make sure the casino you’re betting in won’t rob you before you even get to place a bet.

Our reviews for projects are organized into a few colors.

🟢 Least Risk
These projects are the least likely to hard or soft rug. Usually reserved for cornerstone projects of an ecosystem where it makes no financial sense for them to rug in any manner as they make more money just being legit.

🔵 Low Risk
These projects are usually established projects in an ecosystem that have a track record of success or have KYC’d to us or other authoritative sources in the real world. As a result, it is extremely unlikely for them to soft rug or hard rug their projects. The projects can still fail and the token price can go down, but usually more as a result of natural market forces.

⚪️ Some Risk
This is the default rating for projects with unknown teams but have code that is unlikely to have hard rug risk. Since the team is unknown and doesn’t have a track record of success, it’s entirely possible that they may try to soft rug by dumping tokens, abandoning the project, etc. Even a last minute contract swap to a malicious contract is possible. The only thing that is unlikely is a complete hard rug as long as you are 100% sure you deposit into the contract we review.

🟠 Medium Risk
Similar to Some Risk, but the underlying code itself is custom enough or complex enough that it warrants an elevated risk rating that needs deeper research. Make sure you read every point presented to make sure you’re comfortable with that before entering. Still unlikely to hard rug, but more chances of custom code behaving incorrectly and causing other issues.

🔴 High Risk
Project contains code or practices that are HIGHLY LIKELY to lead to catastrophic losses as they are right now. Make sure you read the description carefully as we will always warn what these issues are. If you see the words Hard Rug anywhere in the review, STAY FAR AWAY!

⚫️ Not Eligible
We reserve the right to not review exceedingly complex projects that would require tens of thousands of dollars of senior security analyst man hours. Typically these are projects that deal with leverage, lending, options, derivatives, and anything that is overly complex and which requires tons of peer reviews and audits from top audit companies.

Search

🟢 For owners who have made impactful changes and would like an update to their farm review:

1️⃣ Use #update at @RugDocChat with your description and proof of changes and it will be forwarded to our scanners.

2️⃣ This does not guarantee a change in your review.

3️⃣ Owners who have difficulty solving the issues can consider our Consultation Package - please contact @BaymaxCrypto on Telegram to discuss.