Get contract
By default returns minimal information about the contract: match, creation_match, runtime_match, chainId, address, and verifiedAt
To get other details one can either list the fields requested in the fields query param or ask all fields but omit several with omit. To get everything just pass fields=all.
For Sourcify-verified contracts, the response fields keep their usual Sourcify meanings. Tempo-native contracts such as native precompiles can also be returned from this endpoint. In that case, verification-specific fields such as match, creationMatch, runtimeMatch, verifiedAt, and matchId can be null, and Tempo-specific provenance and native source metadata is returned under extensions.tempo.
Path parameters
Query parameters
Comma seperated fields to include in the response. Can also take all. Supports dotted paths, including Tempo vendor-specific fields such as extensions.tempo.nativeSource.
Comma seperated fields to NOT include in the response. All fields except matching ones will be returned. Can't be used simultanously with fields.
Response
Contract lookup response for a Sourcify-verified contract or a Tempo-native contract
Example response
{
"chainId": "42431",
"address": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c",
"verifiedAt": "2024-07-24T12:00:00Z",
"matchId": "3266227",
"creationBytecode": {
"onchainBytecode": "0x608060405234801561001057600080fd5b5060043610610036570565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea264697066735821220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
"recompiledBytecode": "0x608060405234801561001057600080fd5b5060043610610036570565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea264697066735821220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
"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",
"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": "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": "3",
"deployer": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c"
},
"compilation": {
"compiler": "solc",
"compilerVersion": "0.8.7+commit.e28d00a7",
"name": "MyContract",
"fullyQualifiedName": "contracts/MyContract.sol:MyContract"
},
"signatures": {
"function": [
{
"signature": "transfer(address,uint256)",
"signatureHash32": "0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"signatureHash4": "0xa9059cbb"
}
],
"event": [
{
"signature": "transfer(address,uint256)",
"signatureHash32": "0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"signatureHash4": "0xa9059cbb"
}
],
"error": [
{
"signature": "transfer(address,uint256)",
"signatureHash32": "0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"signatureHash4": "0xa9059cbb"
}
]
},
"proxyResolution": {
"implementations": [
{
"address": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c"
}
],
"proxyResolutionError": {
"customCode": "unsupported_chain",
"message": "The chain with chainId 9429413 is not supported",
"errorId": "1ac6b91a-0605-4459-93dc-18f210a70192"
}
}
}Changes
Changed in 3 of the 5 revisions of this API.1347
- ▲
the response property
allOf[subschema #1: VerifiedContractMinimal]/creationMatchbecame nullable for the status200response-property-became-nullable
- ▲
the response property
allOf[subschema #1: VerifiedContractMinimal]/matchbecame nullable for the status200response-property-became-nullable
- ▲
the response property
allOf[subschema #1: VerifiedContractMinimal]/matchIdbecame nullable for the status200response-property-became-nullable
- ▲
the response property
allOf[subschema #1: VerifiedContractMinimal]/runtimeMatchbecame nullable for the status200response-property-became-nullable
- ▲
the response property
allOf[subschema #1: VerifiedContractMinimal]/verifiedAtbecame nullable for the status200response-property-became-nullable
- ▲
- ▲
the
pathrequest parameterchainIdwas restricted to a list of enum valuesrequest-parameter-became-enum
- ▲
for the
pathrequest parameterchainId, the type/format was changed fromstring/tointeger/request-parameter-type-changed
- ●
changed the pattern of the
pathrequest parameteraddressfrom(\b0x[a-fA-F0-9]{40}\b)to^0x[a-fA-F0-9]{40}$request-parameter-pattern-changed
- ○
added the new enum value
31318.00to thepathrequest parameterchainIdrequest-parameter-enum-value-added
- ○
added the new enum value
4217.00to thepathrequest parameterchainIdrequest-parameter-enum-value-added
- ○
added the new enum value
42431.00to thepathrequest parameterchainIdrequest-parameter-enum-value-added
- ○
for the
pathrequest parameteraddress, the minLength was decreased from42to0request-parameter-min-length-decreased
- ○
for the
pathrequest parameterchainId, the minLength was decreased from1to0request-parameter-min-length-decreased
- ○
removed the pattern
^\d+$from thepathrequest parameterchainIdrequest-parameter-pattern-removed
- ▲
- ▲
removed the enum value
31318.00from thepathrequest parameterchainIdrequest-parameter-enum-value-removed
- ▲
removed the enum value
4217.00from thepathrequest parameterchainIdrequest-parameter-enum-value-removed
- ▲
removed the enum value
42431.00from thepathrequest parameterchainIdrequest-parameter-enum-value-removed
- ▲
for the
pathrequest parameteraddress, the minLength was increased from0to42request-parameter-min-length-increased
- ▲
for the
pathrequest parameterchainId, the minLength was increased from0to1request-parameter-min-length-increased
- ▲
added the pattern
^\d+$to thepathrequest parameterchainIdrequest-parameter-pattern-added
- ●
for the
pathrequest parameteraddress, the maxLength was set to42request-parameter-max-length-set
- ●
for the
pathrequest parameterchainId, the maxLength was set to20request-parameter-max-length-set
- ●
changed the pattern of the
pathrequest parameteraddressfrom^0x[a-fA-F0-9]{40}$to(\b0x[a-fA-F0-9]{40}\b)request-parameter-pattern-changed
- ○
for the
pathrequest parameterchainId, the type/format was generalized frominteger/tostring/request-parameter-type-generalized
This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲