# Deposit

Deposit from Layer 1 to [zkLink layer](/developer/api-and-sdk/transaction/deposit.md).

<table><thead><tr><th width="20">Name</th><th width="20">Type</th><th width="10">Required</th><th width="250">Description</th></tr></thead><tbody><tr><td></td><td></td><td></td><td></td></tr><tr><td>type</td><td>String</td><td>yes</td><td>The value is "Deposit"</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>fromChainId</td><td><a href="/pages/9wsGjTwfpfc2nyUJWAzS#chainid">ChainId</a></td><td>yes</td><td>The chain id defined by zkLink, the chain that the deposit is initiated on</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>from</td><td>String</td><td>yes</td><td>The initiator address of the deposit</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>to</td><td>String</td><td>yes</td><td>The recipient of the deposit. An account will be created if it does not exist on zkLink Layer3</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>subAccountId</td><td><a href="/pages/9wsGjTwfpfc2nyUJWAzS#subaccountid">SubAccountId</a></td><td>yes</td><td>The subaccount id of the recipient</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>l1SourceToken</td><td><a href="/pages/9wsGjTwfpfc2nyUJWAzS#tokenid">TokenId</a></td><td>yes</td><td>The token deducted from the initiator on Layer 1</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>l2TargetToken</td><td><a href="/pages/9wsGjTwfpfc2nyUJWAzS#tokenid">TokenId</a></td><td>yes</td><td>The token received by the recipient on zkLink Layer 3</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>amount</td><td><a href="/pages/BDCFoF8VRxOutzyi5iLV">BigUint</a></td><td>yes</td><td>The amount of deposit</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>serialId</td><td>u64</td><td>yes</td><td>The serial number of the event, used as nonce</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>l2Hash</td><td><a href="/pages/9wsGjTwfpfc2nyUJWAzS#txhash">TxHash</a></td><td>no</td><td>Transaction hash of linea/zksync/starket</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>ethHash</td><td><a href="/pages/9wsGjTwfpfc2nyUJWAzS#txhash">TxHash</a></td><td>no</td><td>Transaction hash of ethereum, exist when deposit from Ethereum bridge to linea/zksync/starket</td></tr></tbody></table>

For example:

```json
{
    "type": "Deposit",
    "fromChainId": 1,
    "from": "0x76920dfacad4f28f97d6209977c1057b9e3e5cad",
    "subAccountId": 1,
    "l1SourceToken": 18,
    "l2TargetToken": 1,
    "amount": "4000000000000000000000",
    "to": "0x76920dfacad4f28f97d6209977c1057b9e3e5cad",
    "serialId": 53,
    "l2Hash": "0xaaa1e7a5bc48e7cfaa562a4d1a5abc1d6dc5e7f7683e89eb00e895d438f0acab"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zk.link/developer/api-and-sdk/transaction/deposit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
