Skip to main content

kaia_isContractAccount RPC Method

Returns true if an input account has a non-empty codeHash at the time of a specific block number. It returns false if the account is an EOA or a smart contract account which doesn't have codeHash.

Updated on
Aug 7, 2024

kaia_isContractAccount RPC Method

Parameters

address
string
REQUIRED
The address of the account being queried
BlockNumberOrHashOrTag
string
REQUIRED
The block number in integer, block hash or block tag(earliest and latest)

Returns

result
boolean
Returns true if an input account has a non-empty codeHash at the time of a specific block number
Request
1
curl https://docs-demo.kaia-kairos.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{
5
"method": "kaia_isContractAccount",
6
"id": 1,
7
"jsonrpc": "2.0",
8
"params": [
9
"0x5b70c66bc2758f12cb8ab2c19e0f3bfb9a407d5d",
10
"latest"
11
]
12
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free