Contracts
Last updated
Last updated
Returns the Contract Application Binary Interface ( ABI ) of a verified smart contract.
https://api.basescan.org/api
?module=contract
&action=getabi
&address=0xe1621db14277d66c356e14888c57ef1c0c0dc195
&apikey=YourApiKeyToken
Try this endpoint in your browser
Query Parameters
address
the contract address
that has a verified source code
Returns the Solidity source code of a verified smart contract.
https://api.basescan.org/api
?module=contract
&action=getsourcecode
&address=0xe1621db14277d66c356e14888c57ef1c0c0dc195
&apikey=YourApiKeyToken
Query Parameters
address
the contract address
that has a verified source code
Returns a contract's deployer address and transaction hash it was created, up to 5 at a time.
https://api.basescan.org/api
?module=contract
&action=getcontractcreation
&contractaddresses=0xB83c27805aAcA5C7082eB45C868d955Cf04C337F,0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45,0xe4462eb568E2DFbb5b0cA2D3DbB1A35C9Aa98aad,0xdAC17F958D2ee523a2206206994597C13D831ec7,0xf5b969064b91869fBF676ecAbcCd1c5563F591d0
&apikey=YourApiKeyToken
Query Parameters
contractaddresses
the contract address
, up to 5 at a time
Submits a contract source code to BaseScan for verification.
https://api.basescan.org/api
?module=contract
&action=verifysourcecode
&apikey=YourApiKeyToken
Query Parameters
codeformat
single file, use solidity-single-file
JSON file ( recommended ), use solidity-standard-json-input
sourceCode
the Solidity source code
constructorArguements
optional, include if your contract uses constructor arguments
contractaddress
the address your contract is deployed at
contractname
the name of your contract, such as contracts/Verified.sol:Verified
compilerversion
optimizationUsed
0 - no optimization 1 - optimization used
runs
no. of optimization runs used, eg 200
evmversion
leave blank for compiler default
available options homestead
, tangerineWhistle
, spuriousDragon
, byzantium
, constantinople
, petersburg
, istanbul
, paris
Returns the success or error status of a contract verification request.
https://api.basescan.org/api
?module=contract
&action=checkverifystatus
&guid=x3ryqcqr1zdknhfhkimqmizlcqpxncqc6nrvp3pgrcpfsqedqi
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
guid
the unique guid
received from the verification request
Submits a proxy contract source code to BaseScan for verification.
Requires a valid BaseScan API key, it will be rejected otherwise
Current daily limit of 100 submissions per day per user (subject to change)
Only supports HTTP post
Upon successful submission you will receive a GUID (50 characters) as a receipt
You may use this GUID to track the status of your submission
Verified proxy contracts will display the "Read/Write as Proxy" of the implementation contract under the contract address's contract tab
// example with only the mandatory contract address parameter
curl -d "address=0xcbdcd3815b5f975e1a2c944a9b2cd1c985a1cb7f" "https://api.basescan.org/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"
// example using the expectedimplementation optional parameter
// the expectedimplementation enforces a check to ensure the returned implementation contract address == address picked up by the verifier
curl -d "address=0xbc46363a7669f6e12353fa95bb067aead3675c29&expectedimplementation=0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6" "https://api.basescan.org/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"
curl "https://api.basescan.org/api?module=contract&action=checkproxyverification&guid=gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz&apikey=YourApiKeyToken"
Try this endpoint in your browser
Try this endpoint in your browser
Note : This endpoint is limited to 100 verifications/day, regardless of API PRO tier.
used, such as v0.8.24+commit.e11b9ed9