# BaseCoreModule

`BaseCoreModule.sol` serves as the base contract for each module in the Unlockd Protocol. It inherits from `BaseCore.sol` and provides additional functionality specific to modules.

### Key variables:

`moduleId`: The unique identifier of the module.

`moduleVersion`: The version of the module.

### Key functions:

```solidity
constructor(uint256 moduleId_, bytes32 moduleVersion_)
```

Initializes the contract with the module ID and version.

### Parameters:

`moduleId_`: The ID of the module.

`moduleVersion_`: The version of the module.

***

```solidity
function unpackTrailingParamMsgSender() 
internal pure returns (address msgSender)
```

Retrieves the original sender address from the calldata using assembly.

### Returns:&#x20;

The original sender's address.

***

```solidity
function unpackTrailingParams() 
internal pure returns (
    address msgSender, 
    address proxyAddr
)
```

Retrieves the original sender address and proxy address from the calldata using assembly.

### Returns:

`msgSender`: The original sender's address.

`proxyAddr`: The proxy address.

***

```solidity
function _checkHasUnlockdWallet(
    address msgSender
) internal view 
```

Description: Checks if the sender has a valid Unlockd wallet by querying the wallet registry contract.

### Parameters:

`msgSender`: The address of the sender to check.
