# .derupt-profiles

**The following function call is only only callable by .derupt-profile:**

* activate-member

{% hint style="info" %}
**General:**

* The **.derupt-profiles** contract is for logging user contract activations.
  {% endhint %}

{% hint style="warning" %}
**Warning:**

* **users should deploy a** `.derupt-profile` contract in app to interact with core features.
* **users should call**`.derupt-profile`&#x20;
* **users should not call**`.derupt-core-yyyymmdd` *(nor logging contracts)*
* **users should only** enable 1 extension per 1 key function at a time (eg up to 6 active extensions at a time)&#x20;
  {% endhint %}

In should be noted, users deploy their `.derupt-profile` contracts to Stacks Mainnet, then their Activation is what is logged in `.derupt-profiles`  events

{% hint style="info" %}
Work in Progress
{% endhint %}

```
;; title: derupt-profiles
;; version: 1.3.1
;; summary: Profiles Contract
;; description: used to log all user .derupt-profile contract activations

(use-trait derupt-profile-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.derupt-profile-trait.derupt-profile-trait)
;; (use-trait derupt-profile-trait 'MAINNETADDRESS.derupt-profile-trait.derupt-profile-trait)

;; Errors
(define-constant ERR-UNAUTHORIZED (err u100))
(define-constant ERR-NOTFOUND (err u101))
(define-constant ERR-ALREADY-ACTIVATED (err u106))

(define-public (activate-member (contract-address <derupt-profile-trait>)) 
    (let 
        (
            (member-caller (unwrap! (get name (unwrap! (principal-destruct? contract-caller) ERR-NOTFOUND)) ERR-NOTFOUND))
            (member-status (unwrap! (contract-call? contract-address get-activation-status tx-sender) ERR-NOTFOUND))
        )
        (asserts! (is-eq member-caller "derupt-profile") ERR-UNAUTHORIZED)
        (asserts! (is-eq (contract-of contract-address) contract-caller) ERR-UNAUTHORIZED)
        (asserts! (is-eq member-status false) ERR-ALREADY-ACTIVATED)                                 
        (is-ok (contract-call? contract-address registration-activation tx-sender))
        (print {publisher: tx-sender, contract: contract-caller})
        (ok true)
    )
)
```


---

# 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.derupt.io/latest/contracts/.derupt-profiles.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.
