curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=56 \
--header 'content-type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "ots_hasCode",
"params": [
"0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95",
"latest"
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": false
}
Check if an ETH address contains a deployed code.
curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=56 \
--header 'content-type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "ots_hasCode",
"params": [
"0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95",
"latest"
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": false
}
ots_hasCode:params[0]: The address.params[1]: Block identifier. Can be an integer block number or a string tag: “latest”, “earliest”, or “pending”.curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=56 \
--header 'content-type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "ots_hasCode",
"params": [
"0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95",
"latest"
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": false
}
Was this page helpful?