> For the complete documentation index, see [llms.txt](https://paymasterdocs.gitbook.io/paymasterdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://paymasterdocs.gitbook.io/paymasterdocs/resources/integrating-with-further-eips/eip-6900.md).

# EIP-6900

## Overview

The EIP-6900 is a standard of a Modular Account used in the Account Abstract. In the contract, user can install the Plugins which is used before the operation of the validation on the validation phase, before and after the execution in the entrypoint's operation. The Modular Account is conbstructed for the users to install the operation that user want to use. There are many types of plugins from the varioius Web3 protocols including Safe, Alchemy, and etc. In this page, we would introduce of the plugins which validates or integrates with the paymaster contract.&#x20;

## Types of Plugins

### [PaymasterGuardModule](https://github.dev/alchemyplatform/modular-account/blob/14afcd84859cf468684634eb9a9f8cb787f60b16/src/modules/permissions/PaymasterGuardModule.sol)-Alchemy

#### Plugin Type: preValidation Hook

The module checks each UserOperation's paymaster against the stored approved paymaster address. Once installed, the module will validate all UserOperations by checking if they use the approved paymaster. If a different paymaster is used, the transaction will revert with `BadPaymasterSpecified` error. You can use only one paymaster which is stored to the SCW by the plugin.&#x20;

You can see the paymaster address being installed and uninstalled in the contract.

```solidity
function onInstall(bytes calldata data) external override {
    (uint32 entityId, address paymaster) = abi.decode(data, (uint32, address));
    paymasters[entityId][msg.sender] = paymaster;
}

function onUninstall(bytes calldata data) external override {
    (uint32 entityId) = abi.decode(data, (uint32));
    delete paymasters[entityId][msg.sender];
}
```

CF) The onInstall and the onUnInstall function is the callback function to the entrypoint in the Modular Account(SCW). It is called when installing or uninstalling the plugin contract to the wallet.

The validate function is here:

```solidity
function preUserOpValidationHook(uint32 entityId, PackedUserOperation calldata userOp, bytes32)
    external
    view
    override
    assertNoData(userOp.signature)
    returns (uint256)
{
    address payingPaymaster = address(bytes20(userOp.paymasterAndData[:20]));
    if (payingPaymaster == paymasters[entityId][msg.sender]) {
    // checks if the userOp uses the correct paymaster address.
        return 0;
    } else {
        revert BadPaymasterSpecified();
    }
}
```
