# Eth\_getCode

## Get Contract Bytecode at Address

> Returns the contract code stored at a given address.\
> If the address is an externally owned account (EOA), it returns "0x".<br>

```json
{"openapi":"3.0.0","info":{"title":"Ethereum JSON-RPC","version":"1.0.0"},"servers":[{"url":"https://zksync.nownodes.io"}],"security":[{"api-keyAuth":[]}],"components":{"securitySchemes":{"api-keyAuth":{"type":"apiKey","in":"header","name":"api-key"}}},"paths":{"/":{"post":{"tags":["eth_getCode"],"summary":"Get Contract Bytecode at Address","operationId":"ethGetCode","description":"Returns the contract code stored at a given address.\nIf the address is an externally owned account (EOA), it returns \"0x\".\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","description":"JSON-RPC version."},"method":{"type":"string","description":"JSON-RPC method name."},"params":{"type":"array","description":"Parameters array with two elements:\n1. The address to get the code for (hex string, 0x-prefixed).\n2. The block number or block tag (e.g., \"latest\", \"earliest\", \"pending\").\n","minItems":2,"maxItems":2,"items":{"type":"string"}},"id":{"type":"integer","description":"Request identifier."}}}}}},"responses":{"200":{"description":"Contract bytecode in hex format","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","description":"JSON-RPC version."},"id":{"type":"integer","description":"Request ID."},"result":{"type":"string","description":"The contract bytecode as a hex string (0x-prefixed).\nReturns \"0x\" if no contract code is found at the address.\n"}}}}}}}}}}}
```
