Skip to main content
GET
/
v2
/
contract
/
{chainId}
/
{address}
Get verified contract
curl --request GET \
  --url https://sourcify.dev/server/v2/contract/{chainId}/{address}
{
  "match": "match",
  "creationMatch": "match",
  "runtimeMatch": "match",
  "chainId": "11155111",
  "address": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c",
  "verifiedAt": "2024-07-24T12:00:00Z",
  "matchId": "3266227",
  "creationBytecode": {
    "onchainBytecode": "0x608060405234801561001057600080fd5b5060043610610036570565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea264697066735821220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
    "recompiledBytecode": "0x608060405234801561001057600080fd5b5060043610610036570565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea264697066735821220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
    "sourceMap": "73951:11562:0:-:0;;;;;;;;;;;;-1:-1:-1;63357:7:0;:15;;-1:-1:-1;;63357:15:0;;;73951:11562;;;;;;",
    "linkReferences": {
      "contracts/AmplificationUtils.sol": {
        "AmplificationUtils": [
          {
            "start": 3078,
            "length": 20
          }
        ]
      },
      "contracts/SwapUtils.sol": {
        "SwapUtils": [
          {
            "start": 2931,
            "length": 20
          }
        ]
      }
    },
    "cborAuxdata": {
      "1": {
        "value": "0xa2646970667358221220d6808f0352d5e503f1f878b19b1bf46c893bac1e20b3c51884efb58a87435b5564736f6c634300080a0033",
        "offset": 18685
      },
      "2": {
        "value": "0xa264697066735822122017bf4253b73b339897d7c117916781f30b434e6caa783b20eb15065469814dcf64736f6c634300080a0033",
        "offset": 18465
      }
    },
    "transformations": [
      {
        "id": "1",
        "type": "replace",
        "offset": 18040,
        "reason": "cborAuxdata"
      },
      {
        "type": "insert",
        "offset": 6183,
        "reason": "constructorArguments"
      },
      {
        "id": "sources/lib/MyLib.sol:MyLib",
        "type": "replace",
        "offset": 582,
        "reason": "library"
      }
    ],
    "transformationValues": {
      "libraries": {
        "sources/lib/MyLib.sol:MyLib": "0x40b70a4904fad0ff86f8c901b231eac759a0ebb0"
      },
      "constructorArguments": "0x00000000000000000000000085fe79b998509b77bf10a8bd4001d58475d29386",
      "cborAuxdata": {
        "0": "0xa26469706673582212201c37bb166aa1bc4777a7471cda1bbba7ef75600cd859180fa30d503673b99f0264736f6c63430008190033"
      }
    }
  },
  "runtimeBytecode": {
    "onchainBytecode": "0x608060405234801561001057600080fd5b5060043610610036570565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea264697066735821220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
    "recompiledBytecode": "0x608060405234801561001057600080fd5b5060043610610036570565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea264697066735821220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
    "sourceMap": "73951:11562:0:-:0;;;;;;;;;;;;-1:-1:-1;63357:7:0;:15;;-1:-1:-1;;63357:15:0;;;73951:11562;;;;;;",
    "linkReferences": {
      "contracts/AmplificationUtils.sol": {
        "AmplificationUtils": [
          {
            "start": 3078,
            "length": 20
          }
        ]
      },
      "contracts/SwapUtils.sol": {
        "SwapUtils": [
          {
            "start": 2931,
            "length": 20
          }
        ]
      }
    },
    "cborAuxdata": {
      "1": {
        "value": "0xa2646970667358221220d6808f0352d5e503f1f878b19b1bf46c893bac1e20b3c51884efb58a87435b5564736f6c634300080a0033",
        "offset": 18685
      },
      "2": {
        "value": "0xa264697066735822122017bf4253b73b339897d7c117916781f30b434e6caa783b20eb15065469814dcf64736f6c634300080a0033",
        "offset": 18465
      }
    },
    "immutableReferences": {
      "1050": [
        {
          "start": 312,
          "length": 32
        },
        {
          "start": 2631,
          "length": 32
        }
      ]
    },
    "transformations": [
      {
        "id": "CriminalDogs.sol:SafeMath",
        "type": "replace",
        "offset": 1863,
        "reason": "library"
      },
      {
        "id": "1",
        "type": "replace",
        "offset": 2747,
        "reason": "cborAuxdata"
      },
      {
        "id": "1466",
        "type": "replace",
        "offset": 18703,
        "reason": "immutable"
      },
      {
        "id": "1466",
        "type": "replace",
        "offset": 18939,
        "reason": "immutable"
      },
      {
        "type": "replace",
        "offset": 1,
        "reason": "callProtection"
      }
    ],
    "transformationValues": {
      "libraries": {
        "contracts/order/OrderUtils.sol:OrderUtilsLib": "0x40b70a4904fad0ff86f8c901b231eac759a0ebb0"
      },
      "immutables": {
        "1466": "0x000000000000000000000000000000007f56768de3133034fa730a909003a165"
      },
      "cborAuxdata": {
        "1": "0xa26469706673582212201c37bb166aa1bc4777a7471cda1bbba7ef75600cd859180fa30d503673b99f0264736f6c63430008190033"
      },
      "callProtection": "0x9deba23b95205127e906108f191a26f5d520896a"
    }
  },
  "deployment": {
    "transactionHash": "0xb6ee9d528b336942dd70d3b41e2811be10a473776352009fd73f85604f5ed206",
    "blockNumber": "21721660",
    "transactionIndex": "0",
    "deployer": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c"
  },
  "sources": {
    "contracts/Storage.sol": {
      "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract Storage {\n    uint256 number;\n\n    function setNumber(uint256 newNumber) public {\n        number = newNumber;\n    }\n\n    function getNumber() public view returns (uint256) {\n        return number;\n    }\n}\n"
    },
    "contracts/Owner.sol": {
      "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract Owner {\n    address public owner;\n\n    constructor() {\n        owner = msg.sender;\n    }\n}\n"
    }
  },
  "compilation": {
    "language": "Solidity",
    "compiler": "solc",
    "compilerVersion": "v0.8.12+commit.f00d7308",
    "compilerSettings": {},
    "name": "MyContract",
    "fullyQualifiedName": "contracts/MyContract.sol:MyContract"
  },
  "abi": [
    {}
  ],
  "userdoc": {},
  "devdoc": {},
  "storageLayout": {},
  "transientStorageLayout": {},
  "metadata": {},
  "sourceIds": {
    "contracts/UniswapV3Pool.sol": {
      "id": 2
    },
    "contracts/NoDelegateCall.sol": {
      "id": 0
    }
  },
  "stdJsonInput": {
    "language": "Solidity",
    "sources": {
      "contracts/Storage.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract Storage {\n    uint256 number;\n\n    function setNumber(uint256 newNumber) public {\n        number = newNumber;\n    }\n\n    function getNumber() public view returns (uint256) {\n        return number;\n    }\n}\n"
      },
      "contracts/Owner.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract Owner {\n    address public owner;\n\n    constructor() {\n        owner = msg.sender;\n    }\n}\n"
      }
    },
    "settings": {}
  },
  "stdJsonOutput": {
    "sources": {},
    "contracts": {}
  },
  "signatures": {
    "function": [
      {
        "signature": "name()",
        "signatureHash32": "0x06fdde0383f15d582d1a74511486c9ddf862a882fb7904b3d9fe9b8b8e58a796",
        "signatureHash4": "0x06fdde03"
      },
      {
        "signature": "deprecate(address)",
        "signatureHash32": "0x0753c30c37785fe67c057e37b49f6f8d5a438a94f4d86e2f327454f9c52bf927",
        "signatureHash4": "0x0753c30c"
      }
    ],
    "event": [
      {
        "signature": "AddedBlackList(address)",
        "signatureHash32": "0x42e160154868087d6bfdc0ca23d96a1c1cfa32f1b72ba9ba27b69b98a0d819dc",
        "signatureHash4": "0x42e16015"
      }
    ],
    "error": [
      {
        "signature": "ERC20InsufficientAllowance()",
        "signatureHash32": "0x890e98490493b2eeaa713ba179e7b5e82994498e2a4fd1cb19df5f91a38c1532",
        "signatureHash4": "0x890e9849"
      }
    ]
  },
  "proxyResolution": {
    "isProxy": false,
    "proxyType": null,
    "implementations": []
  }
}

Documentation Index

Fetch the complete documentation index at: https://hedera-0c6e0218-update-sourcify-migration-issue-508-luke.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

chainId
string
required

The chainId number of the EVM chain

Required string length: 1 - 20
Pattern: ^\d+$
Example:

"11155111"

address
string
required

Contract's 20 byte address in hex string with the 0x prefix. Case insensitive.

Required string length: 42
Pattern: (\b0x[a-fA-F0-9]{40}\b)
Example:

"0x2738d13E81e30bC615766A0410e7cF199FD59A83"

Query Parameters

fields
string

Comma seperated fields to include in the response. Can also take all

Example:

"abi,metadata,creationBytecode.onchainBytecode,deployment.blockNumber,compilation"

omit
string

Comma seperated fields to NOT include in the response. All fields except matching ones will be returned. Can't be used simultanously with fields.

Example:

"userdoc,devdoc,storageLayout,transientStorageLayout,compilation.sources"

Response

Example response

match
enum<string>
required
Available options:
match,
exact_match,
null
creationMatch
enum<string>
required
Available options:
match,
exact_match,
null
runtimeMatch
enum<string>
required
Available options:
match,
exact_match,
null
chainId
string
required
Required string length: 1 - 20
Pattern: ^\d+$
Example:

"11155111"

address
string
required

Contract Address in hex string. Can be checksummed or not (i.e. can contain capital letters)

Pattern: (\b0x[a-fA-F0-9]{40}\b)
Example:

"0xDFEBAd708F803af22e81044aD228Ff77C83C935c"

verifiedAt
string<date-time>
Example:

"2024-07-24T12:00:00Z"

matchId
string
Example:

"3266227"

creationBytecode
CreationBytecodeResponse · object
runtimeBytecode
RuntimeBytecodeResponse · object
deployment
object
sources
object
compilation
object
abi
object[]
metadata
object
storageLayout
object

Storage layout of the contract. Format differs by language: Solidity uses {storage: [...], types: {...}}, Vyper uses {variableName: {type, slot, n_slots}}.

transientStorageLayout
object
userdoc
object
devdoc
object
sourceIds
object

Same as stdJsonOutput.sources

additionalInput
object

Additional compiler input fields from the top level of the standard JSON input that are not part of settings. Currently contains Vyper's storage_layout_overrides when used.

stdJsonInput
object

The input fields conforming the compiler standard-JSON format.

stdJsonOutput
object

The outputs conforming the compiler standard JSON format

signatures
object

The signatures of the contract grouped by type (function, event, error).

proxyResolution
ProxyResolution · object