# WEbdEXManagerV3

{% hint style="success" %}
The WEbdEXManagerV3 contract, part of the WEbdEX protocol, is a Solidity-based smart contract that serves as a management hub for users of the Botmoney platform and their interaction with various DeFi strategies. This document provides a comprehensive understanding of its structure, functionalities and purpose.
{% endhint %}

#### Solidity Version and License

```solidity
solidityCopy code// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
```

The contract adheres to the MIT license and is compatible with Solidity version 0.8.18.

#### Imports

The contract imports key functionalities from the OpenZeppelin library, a standard in secure smart contract development.

```solidity
solidityCopy codeimport "@openzeppelin/contracts/access/Ownable.sol";
import "../utils/NFT.sol";
```

#### Interface IWEbdEXPassV3

It defines an external interface to interact with user pass information, including pass expiration and free trial status.

### Contract Structure

#### Key Structures

1. **Bot**: Represents a bot entity with attributes like name, token, wallet, and seller.
2. **User**: Stores information about users, including their manager and status within the platform.
3. **Register**: A structure to keep track of registered users and their associated managers.
4. **Display**: Used to display comprehensive user information.

#### Events

The contract emits a `Transaction` event to log significant activities such as user registration.

#### Constructor

Initializes the bot entity and sets up the contract with necessary parameters like bot details and external contract addresses.

#### Modifiers

* **onlyWebDexStrategiesOrOwner**: Ensures that certain functions can only be called by the contract owner or the specified WEbdEXStrategiesV3 contract.

#### Public Functions

1. **changeWEbdEXStrategiesV3**: Allows the owner to update the address of the WEbdEXStrategiesV3 contract.
2. **registerInBot**: Enables users to register themselves in the bot, associating with a manager if specified.
3. **getUserInfo**: Provides detailed user information for the caller.
4. **getUserInfoByWallet**: Fetches user information based on a given wallet address, restricted to the owner or WEbdEXStrategiesV3 contract.
5. **getBot**: Returns information about the bot.
6. **getRegisters**: Retrieves a list of all registered users and their managers.

#### Internal Functions

* **\_getUser**: A utility function to compile and return user information in a structured format.

### Security and Permissions

Inheriting from `Ownable`, the contract ensures that critical functionalities like updating strategy contract addresses are reserved for the contract owner. This approach ensures that the platform's integrity is maintained while allowing for necessary updates and management actions.

### Fund Management

Notably, the contract does not include functions for the owner to withdraw or transfer user funds, aligning with best practices in DeFi for user asset security.

### Conclusion

The `WEbdEXManagerV3` contract is a multifaceted management tool within the WEbdEX ecosystem. It plays a crucial role in maintaining user data, managing registrations, and ensuring smooth interaction with the WEbdEXPassV3 and WEbdEXStrategiesV3 contracts. Its design prioritizes security, user autonomy, and efficient platform management.


---

# 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://botmoney-eth.gitbook.io/whitepaper-botmoney/contracts-documentation/overview/webdexmanagerv3.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.
