Otterscan
ots_hasCode
Check if an ETH address contains a deployed code.
POST
Parameters
string
default:"1"
required
Unique identifier for a blockchain network.
number
default:1
required
Request identifier used to match responses.
string
default:"2.0"
required
JSON-RPC version.
string
default:"ots_hasCode"
required
JSON-RPC method name.
object
required
The parameters for the method ots_hasCode: [address, defaultBlock].Positional parameters for
ots_hasCode:params[0]: The address.params[1]: Block identifier. Can be an integer block number or a string tag: “latest”, “earliest”, or “pending”.
Returns
boolean
boolean indicating if the address contains a bytecode or not.