Verified contract source · Contract Source
$0.005
per call · USD Coin on Base
Fetch the verified Solidity source files and compiler metadata for a contract address from Sourcify's open verification repository. Covers 8 EVM mainnets (ethereum, base, polygon, arbitrum, optimism, bsc, gnosis, celo). Contracts that were never verified return a structured {verified:false} miss, not an error. Feed the returned source into /api/solidity-scan for a heuristic pattern check.
Endpoint
POST https://agent402.tools/api/contract-source4
Calls / 30d
1
Unique payers / 30d
Aug 31
Last called
exact
Payment scheme
Call this service
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPay("https://agent402.tools/api/contract-source", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"network": "base"
}),
});
const data = await res.json();curl -X POST \
"https://agent402.tools/api/contract-source" \
-H "Content-Type: application/json" \
-d '{"address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"base"}' \
-H "X-PAYMENT: <signed x402 payment>"Example response
{
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"chainId": 8453,
"compiler": {
"language": "Solidity",
"version": "0.6.12"
},
"match": "exact_match",
"network": "base",
"sourceCount": 2,
"sources": {
"contracts/FiatTokenProxy.sol": "// SPDX-License-Identifier: MIT …"
},
"verified": true,
"verifiedAt": "2024-08-08T13:59:29Z"
}Payment details
0xabf4fabd7c416fb67202e5f9002389fc75e2a9d0USD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913Is this your API?
Pin it to the top of Onchain Data and the homepage with a featured placement.
More from Verified contract source & similar services
Chain · Operations
agents.chain.link
Chainlink For Agents: execute a catalog workflow by workflow name.
Chain · Operations Submit
agents.chain.link
Chainlink For Agents: submit a signed operation payload.
Sniperx · Activities Smarttraders Smartmoney
x402.sniperx.fun
Get SmartMoney trading activities on token (sorted by time descending)