How To Tutorials
Verifying NFT Contracts

Using Sourcify

11min

Overview

Sourcify is a Solidity source code and metadata verification tool and repository that works to verify smart contracts for the Palm network.



🏁 Prerequisites

  1. You have a Deploy NFT Contractson the Palm network written in Solidity, compiled and deployed.
  2. You have the contract source code and the metadata file which contains the compilation settings.


Using the Sourcify Verifier

  1. Drag and drop the folder containing your source files and metadata, or add them separately. See below to help you find the correct files generated by Using Sourcify or Using Sourcify
  2. Input the contract address you want to verify. If a contract at that address is verified in any of the chains it will be shown above.
  3. Select the chain the contract is deployed to.
  4. Click Verify.


With Hardhat

If you are using Hardhat to deploy your smart contracts you can verify in two ways:

Online

  1. Drag and drop the .json file found in the artifacts > build-info folder.
  2. Select the main contract deployed at the address you want to verify.
  3. Input the address and chain and click "Verify".

Hardhat-Deploy Plugin

Hardhat-deploy allows you to write deploy scripts and has other features geared towards a better developer experience.

  • Follow along this Using Hardhat to correctly install the prerequisites needed to use the sourcify task via the CLI.


With Truffle

If you are using Truffle to deploy your smart contracts you can verify in two ways:

Online

  1. Use the output file at build/contracts/<contract-name>.json for the metadata file.
  2. Add the source files.
  3. Select the main contract deployed at the address you want to verify.
  4. Input the address and chain and click "Verify".

Truffle-Plugin-Verify

Truffle-Plugin-Verify allows you to automatically verify your contracts' source code straight from the CLI.

  • Follow along this Using Truffle to correctly install and add the plugin to your configuration file needed to verify via the CLI.


🏁 Additional Resources