# getVerifiedContract

**Identifier:** `sourcify_getVerifiedContract`

**Provider:** [Sourcify](https://kirha.com/providers/sourcify.md)

Details of a smart contract verified on Sourcify: contract name, compiler and settings, license, deployer and deployment transaction, whether it is a proxy and its implementation, its functions and events, and optionally the main source file. Use it to understand what a contract does and who deployed it.

## Run it with the CLI

```bash
kirha tools run sourcify_getVerifiedContract \
  --input '{
    "address": "<address>"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "sourcify_getVerifiedContract",
  "input": {
    "address": "<address>"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "address": {
      "pattern": "^0x[0-9a-fA-F]{40}$",
      "type": "string"
    },
    "chain": {
      "default": "1",
      "description": "Chain id or name, e.g., 1, base, polygon",
      "type": "string"
    },
    "includeSource": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "address"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "address": {
      "type": "string"
    },
    "chainId": {
      "type": "number"
    },
    "chainName": {
      "type": "string"
    },
    "compilerVersion": {
      "type": "string"
    },
    "context": {
      "type": "string"
    },
    "contractName": {
      "type": "string"
    },
    "deployer": {
      "type": "string"
    },
    "deploymentBlock": {
      "type": "string"
    },
    "deploymentTransaction": {
      "type": "string"
    },
    "events": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "found": {
      "type": "boolean"
    },
    "functions": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "implementations": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "isProxy": {
      "type": "boolean"
    },
    "language": {
      "type": "string"
    },
    "license": {
      "type": "string"
    },
    "mainSource": {
      "type": "string"
    },
    "match": {
      "type": "string"
    },
    "optimizer": {
      "type": "string"
    },
    "proxyType": {
      "type": "string"
    },
    "repositoryUrl": {
      "type": "string"
    },
    "sourceFileCount": {
      "type": "number"
    },
    "sourceFiles": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "characters": {
            "type": "number"
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "characters"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "verifiedAt": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "found",
    "address",
    "chainId",
    "chainName",
    "implementations",
    "functions",
    "events",
    "sourceFiles",
    "repositoryUrl"
  ],
  "type": "object"
}
```

-----

[All Sourcify tools](https://kirha.com/providers/sourcify.md) · [< Back to tools list](https://kirha.com/tools.md)