contract ReceiptToken is ERC20, AccessControl {
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE");

    constructor()
        public
        ERC20("pAT", "Parachain Auction Token")
    {
        // Grant the contract deployer the default admin role: it will be able
        // to grant and revoke any roles
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    /**
     * @notice Mint new receipt tokens to some user
     * @param to Address of the user that gets the receipt tokens
     * @param amount Amount of receipt tokens that will get minted
    */
    function mint(address to, uint256 amount) public {
        require(
            hasRole(MINTER_ROLE, msg.sender),
            "ReceiptToken: Caller is not a minter"
        );
        _mint(to, amount);
    }

    /**
     * @notice Burn receipt tokens from some user
     * @param from Address of the user that gets the receipt tokens burne
     * @param amount Amount of receipt tokens that will get burned
    */
    function burn(address from, uint256 amount) public {
        require(
            hasRole(BURNER_ROLE, msg.sender),
            "ReceiptToken: Caller is not a burner"
        );
        _burn(from, amount);
    }
}
// This contract is used for printing receipt tokens
// Whenever someone joins a pool, a receipt token will be printed for that person
function burn(address from, uint256 amount) public {
    require(
        hasRole(BURNER_ROLE, msg.sender),
        "ReceiptToken: Caller is not a burner"
    );
    _burn(from, amount);
}

/**
 * @notice Burn receipt tokens from some user
 * @param from Address of the user that gets the receipt tokens burne
 * @param amount Amount of receipt tokens that will get burned
 */