Using Sourcify
Sourcify is a Solidity source code and metadata verification tool and repository that works to verify smart contracts for the Palm network.
π Prerequisites
- You have a Deploy NFT Contracts on the Palm network written in Solidity, compiled and deployed.
- You have the contract source code and the metadata file which contains the compilation settings.
Using the Sourcify Verifier
- Go to the online verifier
- 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 Hardhat or Truffle
- 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.
- Select the chain the contract is deployed to.
- Click
Verify
.
With Hardhat
If you are using Hardhat to deploy your smart contracts you can verify in two ways:
Online
- Drag and drop the
.json
file found in theartifacts
>build-info
folder. - Select the main contract deployed at the address you want to verify.
- 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
- Use the output file at
build/contracts/<contract-name>.json
for the metadata file. - Add the source files.
- Select the main contract deployed at the address you want to verify.
- Input the address and chain and click βVerifyβ.
Truffle-Plugin-Verify
Truffle and its plugin, truffle-plugin-verify, have been discontinued. It is recommended to migrate to Hardhat or Foundry for smart contract development and verification.