Skip to main content

Add new input contract

  • Import the contract metadata file and the source files from a deployed contract extracting the metadata IPFS CID from the contract's bytecode
note

Session-based API is only meant for the sourcify.dev UI. Because it makes use of session cookies and it is not possible have Access-Control-Allow-Origin: * with credentials: true, meaning these endpoints can only be used on explicitly set domains on the browser. (e.g. sourcify.dev). Please use the verification API if you want Sourcify on your frontend.

URL : /session/input-contract

Method : POST

Content-Type : application/json

Body

{
"address": "0x0000...",
"chainId": "1"
}

Responses

Check add input files API to see a complete list of responses

Conditions :

  • The contract doesn't have a metadata IPFS CID

Code : 402

Content :

{
"error": "The contract doesn't have a metadata IPFS CID"
}