website logo
Join the CommunityContact Us
Navigate through spaces
Main
⌘K
Palm Network Developer Portal
The Palm Network
Submit an Article
Network Details
Validators
Get Started
Get PALM Tokens
Gas Fees
Connect to Palm network
Run a Transaction Node
How To Tutorials
MetaMask Wallet Setup
Deploy NFT Contracts
Verifying NFT Contracts
Mint NFTs with Hardhat
Bridge
Use the Bridge
Integrate With the Bridge
Bridge Component Addresses
Deprecated
Use Supported Tools
Block Explorer
Moralis
The Graph
Covalent API
Docs powered by archbee 
15min

Using Sourcify

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. Go to the online verifier
  2. 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
  3. 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.
  4. Select the chain the contract is deployed to.
  5. 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

  • Verify using the Sourcify public server API
  • Lookup a contract with the contract repository



Updated 18 Nov 2022
Did this page help you?
Yes
No
UP NEXT
Mint NFTs with Hardhat
Docs powered by archbee 
TABLE OF CONTENTS
Overview
🏁 Prerequisites
Using the Sourcify Verifier
With Hardhat
Online
Hardhat-Deploy Plugin
With Truffle
Online
Truffle-Plugin-Verify
🏁 Additional Resources