> For the complete documentation index, see [llms.txt](https://dev.dapps.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.dapps.co/dapps-contract-sdk.md).

# Dapps Contract SDK

### Introduction

Dapps smart contracts provide the functionality to add new dapps to the [dapps.co](http://dapps.co) platform. Anyone can register their dapp and other users can subscribe to these dapps to receive notifications. While registering a new dapp, we need to provide an account that will act as the admin of the dapp and will have some extra privileges. We will discuss them later in the documentation. All the notifications will be encrypted using the user's secondary wallet (if it exists, otherwise simply encoded), created during the user onboarding process.

### Quickstart -

These are the functionalities provided in the contract SDK -

* Create a dapp
* Register the dapp
* Subscribe/Unsubscribe any user to the dapp
* Get the user subscription status for a dapp
* Send notifications to the subscribers

### Full Overview -

Now, let's explore the dapps contract to achieve these functionalities.

First of all, let’s create a **Test** contract and then import `SubscriptionModule.sol` contract. Now, we need to declare an instance of the `SubscriptionModule` contract, and initialize it in the constructor with the relevant contract address for that chain.

```solidity
import "./SubscriptionModule.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract Test is Ownable {
	SubscriptionModule public dapps;

	constructor(SubscriptionModule _dapps) {
		dapps = _dapps;
	}

	function updateSubscriptionModule(SubscriptionModule _dapps) external onlyOwner {
		dapps = _dapps;
	}

}
```

So after the initial setup, developers can perform the above mentioned actions by calling the functions mentioned, in their smart contract.

####

####


---

# 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://dev.dapps.co/dapps-contract-sdk.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.
