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 
16min

Verifying a Smart Contract

Overview

Once a contract is verified the code can be viewed and interacted with on the Palm network block explorers. You can verify your contract in a multitude of ways i.e. through the CLI, Sourcify (see Verifying NFT Contracts), and the block explorer.

You can verify on the explorer through:

  • Source Code (Solidity)
  • Standard JSOn Input
  • Sourcify: Sources and metadata JSON file

🏁 Prerequisites

1. Look up your deployment on the Palm network block explorer

Paste the address of your deployed contract into the search bar of the block explorer.. It may take 10-20 minutes to appear.



Testnet

Mainnet

Explorer URL

https://explorer.palm-uat.xyz

https://explorer.palm.io

Document image

2. Select the Code tab

Click the Verify & Publish button. You will see several options for verification.

Document image

3. Choose the verification method

You can verify on the explorer through:

  • Via flattened source code
  • Sourcify: Sources and metadata JSON file
Document image



How to Verify

Via Flattened Source Code

1. Input the values





Contract Address

The 0x address supplied on contract creation.

Contract Name

Must match the name specified in the code. For example, in contract MyContract {..} MyContract is the contract name.

Include Nightly Builds

Yes if you want to show nightly builds.

Compiler

The compiler version is specified in pragma solidity X.X.X. Use the compiler version rather than the nightly build. If using the Solidity compiler, run solc —version to check.

EVM Version: 

The EVM version the contract is written for. If the bytecode does not match the version, we try to verify using the latest EVM version. EVM version details.

Optimization

If you enabled optimization during compilation, check yes.

Optimization Runs

200 is the Solidity Compiler default value. Only change if you changed this value while compiling.

Enter the Solidity Contract Code

We recommend using flattened code. This is necessary if your code utilizes a library or inherits dependencies. Use the POA solidity flattener or the truffle flattener.

Try to fetch constructor arguments automatically

If similar contracts exist these may be available.

Add Contract Libraries

Enter the name and 0x address for any required libraries called in the called in the .sol file.

4. Verify and Publish

If all goes well, you will see a ✅ checkmark next to Code in the code tab, and an additional tab called Read Contract and Write Contract. The contract name will now appear in the explorer with any transactions related to your contract.

Updated 11 Jan 2023
Did this page help you?
Yes
No
UP NEXT
Moralis
Docs powered by archbee 
TABLE OF CONTENTS
Overview
🏁 Prerequisites
1. Look up your deployment on the Palm network block explorer
2. Select the Code tab
3. Choose the verification method
How to Verify
Via Flattened Source Code
1. Input the values
4. Verify and Publish