OpenZeppelin / OpenZeppelin/midnight-apps

Support `Double-Ended Queue` (Deque) in Queue Contract

Open
#14 0 comments 0 reactions 1 assignee View on GitHub

@0xisk is already working on this.

Since Apr 2, 2025.

feature
Dominant language
TypeScript
Stars
11
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Description:

As a follow-up to PR #9 we want to extend the current Queue<T> implementation into a double-ended queue (Deque), similar to OpenZeppelin's [DoubleEndedQueue.sol](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/structs/DoubleEndedQueue.sol).

This would add support for:

  • pushFront(item: T)
  • popBack(): Maybe<T>

Motivation:

  • Enable more flexible queue patterns (e.g., both stack and queue behavior).

Status:

  • Not urgent, but a good candidate for next iteration.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.