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": "eth_getCode",
"params": [
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f35b600060078202905091905056"
}
Returns code at a given address.
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": "eth_getCode",
"params": [
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f35b600060078202905091905056"
}
eth_getCode:params[0]: The address.params[1]: Block identifier. Can be an integer block number or a string tag: “latest”, “earliest”, or “pending”.“0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f35b600060078202905091905056”.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": "eth_getCode",
"params": [
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f35b600060078202905091905056"
}
Was this page helpful?