API Reference

eth_getCode - zkSync Era

Returns code at a given address.

This method can be used to distinguish between contract addresses and wallet addresses.

Parameters

  • DATA, 20 Bytes - address
  • QUANTITY|TAG - Integer block number, or the string "latest", "earliest" or "pending", see the default block parameter.
params: ["0xb59f67a8bff5d8cd03f6ac17265c550ed8f33907", "latest"];

Returns

DATA - The code from the given address.

Example

Request

curl --location --request POST 'https://zksync-era-mainnet.unifra.io/v1/your-api-key' \ --header 'Content-Type: application/json' \ --data-raw '{ "jsonrpc":"2.0", "method":"eth_getCode", "params":["0x3bA3B56f992bB8FDB946B8f5E33310f86560359B", "latest"], "id":0 }'

Result

{ "jsonrpc": "2.0", "id": 0, "result": "0x" }
Path Params
string
required
Body Params
string
Defaults to 2.0
string
Defaults to eth_getCode
array of strings
params
int32
Defaults to 0
Responses

Language
Click Try It! to start a request and see the response here! Or choose an example:
application/json