> ## Documentation Index
> Fetch the complete documentation index at: https://chainstack-docs-polygon-erigon-trace-deprecation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# zks_getMainContract | zkSync Era

> The zks_getMainContract API method is designed to return the address of the main zkSync Era smart contract the L1. zkSync Era via Chainstack.

The `zks_getMainContract` API method is designed to return the address of the main zkSync Era smart contract the L1. This contract address is fundamental for developers and applications interfacing with the zkSync network.

## Parameters

* `none`

## Response

* `result` — the address of the zkSync Era main contract on the L1 blockchain.

## Use case

This method returns the main contract address where zkSync holds funds on the L1 network (Ethereum). It could be used as interface to make a bridge between L1 and L2.


## OpenAPI

````yaml openapi/zksync_node_api/zks_getMainContract.json POST /afb8312f3710a5bc469f4c87cad3a2e4
openapi: 3.0.0
info:
  title: JSON-RPC API
  version: 1.0.0
servers:
  - url: https://nd-995-911-243.p2pify.com
security: []
paths:
  /afb8312f3710a5bc469f4c87cad3a2e4:
    post:
      summary: zks_getMainContract | zkSync Era
      operationId: zks_getMainContract
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonRpcRequestForMainContract'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonRpcResponseForMainContract'
components:
  schemas:
    JsonRpcRequestForMainContract:
      type: object
      required:
        - jsonrpc
        - id
        - method
        - params
      properties:
        jsonrpc:
          type: string
          example: '2.0'
          default: '2.0'
        id:
          type: integer
          example: 1
          default: 1
        method:
          type: string
          example: zks_getMainContract
          default: zks_getMainContract
        params:
          type: array
          default: []
    JsonRpcResponseForMainContract:
      type: object
      required:
        - jsonrpc
        - id
        - result
      properties:
        jsonrpc:
          type: string
          example: '2.0'
          default: '2.0'
        id:
          type: integer
          default: 1
        result:
          type: object
          properties:
            contractAddress:
              type: string
              description: The address of zkSync main contract on L1.

````