pulsechain.box
ots

ots_hasCode

Checks whether an address contains contract code at the specified block. This is a lightweight alternative to calling eth_getCode and checking if the result is empty.

Checks whether an address contains contract code at the specified block. This is a lightweight alternative to calling eth_getCode and checking if the result is empty.

Parameters

#TypeDescription
1stringAddress to check.
2stringBlock tag ("latest", "earliest") or hex block number.

Returns

TypeDescription
booleantrue if the address has deployed contract code, false for externally-owned accounts (EOAs).

Example

curl -s -X POST https://rpc.pulsechain.box \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "ots_hasCode",
    "params": [
      "0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39",
      "latest"
    ],
    "id": 1
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}
TRY IT

Notes

  • Returns false for addresses that have never been used or are standard EOA wallets.
  • Since this is an archive node, you can query any historical block number to check whether an address had code at that point in time.
  • More efficient than eth_getCode when you only need a boolean answer.
Copyright © 2026 AvecdrA. Made with love.