Transaction object.
The format of the return value.
Returns an estimate of the gas required for a L1 to L2 transaction.
Transaction object.
The format of the return value.
Returns all balances for confirmed tokens given by an account address.
The account address.
The format of the return value.
Returns additional ZKsync-specific information about the L2 block.
committed: The batch is closed and the state transition it creates exists on layer 1. proven: The batch proof has been created, submitted, and accepted on layer 1. executed: The batch state transition has been executed on L1; meaning the root state has been updated.
The number of the block.
The format of the return value.
Returns L1/L2 addresses of default bridges.
The format of the return value.
Returns bytecode of a transaction given by its hash.
Bytecode hash as string.
The format of the return value.
Lists confirmed tokens. Confirmed in the method name means any token bridged to ZKsync Era via the official bridge. The tokens are returned in alphabetical order by their symbol. This means the token id is its position in an alphabetically sorted array of tokens.
The token id to start from.
The number of tokens to return.
The format of the return value.
Returns the range of blocks contained within a batch given by batch number. The range is given by beginning/end block numbers in hexadecimal.
The layer 1 batch number.
The format of the return value.
Returns data pertaining to a given batch.
The layer 1 batch number.
The format of the return value.
Given a transaction hash, and an index of the L2 to L1 log produced within the transaction, it returns the proof for the corresponding L2 to L1 log.
The index of the log that can be obtained from the transaction receipt (it includes a list of every log produced by the transaction)
Hash of the L2 transaction the L2 to L1 log was produced within.
Optional
l2ToL1LogIndex: NumbersThe index of the L2 to L1 log in the transaction (optional).
The format of the return value.
Retrieves the proof for an L2 to L1 message.
The L2 block number.
The sender address.
The message hash.
Optional
l2LogPosition: numberThe log position in L2.
The format of the return value.
Returns Merkle proofs for one or more storage values at the specified account along with a Merkle proof of their authenticity. This allows to verify that the values have not been tampered with. More details: https://docs.zksync.io/build/api.html#zks-getproof
The account to fetch storage values and proofs for.
Vector of storage keys in the account.
Number of the L1 batch specifying the point in time at which the requested values are returned.
The format of the return value.
Gets the protocol version.
Optional
versionId: numberThe version ID.
The format of the return value.
Returns data of transactions in a block.
Block number.
The format of the return value.
Returns the testnet paymaster address
if available, or null
.
Calls the zks_getTestnetPaymaster JSON-RPC method.
Returns data from a specific transaction given by the transaction hash.
Transaction hash as string.
The format of the return value.
Executes a transaction and returns its hash, storage logs, and events that would have been generated if the transaction had already been included in the block. The API has a similar behaviour to eth_sendRawTransaction but with some extra data returned from it. With this API Consumer apps can apply "optimistic" events in their applications instantly without having to wait for ZKsync block confirmation time. It’s expected that the optimistic logs of two uncommitted transactions that modify the same state will not have causal relationships between each other.
The transaction data.
The format of the return value.
Returns the fee for the transaction.