# L1X VM Cross-Contract Calls

eBPF runtime allows a smart-contract to call another smart-contract's function. The smart-contract is halted until the called smart-contract finishes execution.

When Smart-Contract A calls Smart-Contract B, the  is Smart-Contract B is executed in the following context:

1. The `caller_address()` API function will return the Smart-Contract A **contract instance address** &#x20;
2. `transfer_from_caller()` API function will transfer tokens from Smart-Contract A balance to Smart-Contract B balance
3. `contract_instance_address` API function will return Smart-Contract B contract instance address
4. `contract_owner_address` API function will return Smart-Contract B contract owner address
5. If Smart-Contract A has been called in *read-only* context then Smart-Contract B will be called in the same context. It means Smart-Contract B will not be able to modify its own persistent storage.

**Diagram**

<figure><img src="https://879140870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTLmER6Ab8VaxeOI6Vla%2Fuploads%2FSXPukql9TlvrvrbbY8Kv%2FGitbook%20Cross-Contract%20calls%20-%20L1XVM%20-%26gt%3B%20L1XVM.jpg?alt=media&#x26;token=5c46cabf-184e-487c-850b-eab036fff64d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://879140870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTLmER6Ab8VaxeOI6Vla%2Fuploads%2FrWA11xWPk7bxnLnRozgn%2FGitbook%20Cross-Contract%20calls%20-%20L1XVM%20-%26gt%3B%20L1XEVM.jpg?alt=media&#x26;token=9b6491f6-26e9-406c-b755-ae1cb8e9212c" alt=""><figcaption></figcaption></figure>


---

# 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://l1x-sdk.gitbook.io/l1x-master-sdk/ubTvs7ITP4emn1uocqF8/core-concepts/cross-contract-call/l1x-vm-cross-contract-calls.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.
