> For the complete documentation index, see [llms.txt](https://gaya-blockchain.gitbook.io/gaya-blockchain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gaya-blockchain.gitbook.io/gaya-blockchain/gaya-blockchain/architecture-overview/contract-deployment-and-interaction.md).

# Contract Deployment and Interaction

Deploying a smart contract in GAYA involves sending a transaction containing the contract’s bytecode. This deployment generates a unique address based on the sender’s account address and nonce, ensuring that each contract has its own distinct location on the network. Once deployed, the contract enters the active state and can interact with other contracts or externally owned accounts (EOAs) to enable complex dApp functions, including DeFi transactions, token swaps, NFT marketplaces, and gaming operations.

<mark style="color:purple;">**Technical Insight**</mark>\
For instance, a decentralized exchange (DEX) built on GAYA could require multiple smart contracts interacting simultaneously to manage user trades, liquidity pools, and deposits. Smart contracts within the DEX could interact autonomously to execute trades and manage token balances, demonstrating GAYA’s capability to support sophisticated applications and decentralized operations.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://gaya-blockchain.gitbook.io/gaya-blockchain/gaya-blockchain/architecture-overview/contract-deployment-and-interaction.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.
