Welcome to BlocksScan
  • Introduction
  • ✨GETTING STARTED
    • Endpoint URLs
  • 🎯API Endpoints
    • Accounts
    • Contracts
    • Transactions
    • Blocks (WIP)
    • Logs
    • Geth/Parity Proxy (WIP)
    • Tokens
    • Gas Tracker (WIP)
    • Stats
  • ✅CONTRACT VERIFICATION
    • What's Contract Verification
    • Multichain Verification(WIP)
    • Supported Chains
    • Common Verification Errors
    • Contract Verification Plugins
  • 🔧MISC TOOLS & UTILITIES
    • Libraries (WIP)
  • 🤝Support
    • FAQ
    • Rate Limits
    • Common Error Messages
    • Getting Help
    • Visit Blocksscan.io
Powered by GitBook
On this page
  • 1. Using the Verify Contract Endpoint
  • 2. Specify Your chainId
  • 3. Add Contract Source Code
  • 4. Add Contract Metadata
  • 5. Submitting Verification
  1. CONTRACT VERIFICATION

Multichain Verification(WIP)

PreviousWhat's Contract VerificationNextSupported Chains

Last updated 3 months ago

For repeated or multichain contract verification, it's best to use the Verify Contract endpoint to automate source code submission .

1. Using the Verify Contract Endpoint

In Postman, set your request method to HTTP POST and your URL to https://api.xdcscan.io/ .

Under the Body tab and using form-data, specify the "module" to contract and "action" to verifysourcecode.

2. Specify Your chainId

Select the chain you've deployed your contract, which is supported by an Etherscan-like explorer.

Specify it under the "chainId" parameter, such as 51 for Apothem and 8453 for Base.

3. Add Contract Source Code

We support 2 formats, solidity-single-file or solidity-standard-json-input.

Using JSON is the gold standard ✨ for verification, as you can ( if you use imports such as from ).

Paste your source code under "sourceCode" and the code format under the "codeformat" parameter.

Optionally if your contract uses [constructor arguments], you may specify them too under the "constructorArguements" parameter in format.

4. Add Contract Metadata

Include the contract address as "contractaddress", beginning with "0x".

Specify your contract file path and contract name separated by a colon as "contractname", such as "contracts/Verified.sol:Verified".

5. Submitting Verification

If everything went well, you'll see the happy green checkmark on your ✅

✅
🐇
include compiler settings and multiple files
OpenZeppelin
ABI encoded
contract code