gno icon indicating copy to clipboard operation
gno copied to clipboard

feat(examples): Implement p/demo/dequeue

Open linhpn99 opened this issue 1 year ago • 5 comments

From issue : https://github.com/gnolang/gno/issues/2119

Contributors' checklist...
  • [ ] Added new tests, or not needed, or not feasible
  • [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • [ ] Updated the official documentation or not needed
  • [ ] No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • [ ] Added references to related issues and PRs
  • [ ] Provided any useful hints for running manual tests
  • [ ] Added new benchmarks to generated graphs, if any. More info here.

linhpn99 avatar May 23 '24 08:05 linhpn99

@moul i have just implemented queue structure, please take a look !

linhpn99 avatar May 23 '24 09:05 linhpn99

You are adding general-purpose libraries, which is good. However, it's challenging to review without a real usage example. Could you create dapps using your new libraries or provide more actionable examples?

moul avatar May 26 '24 20:05 moul

This data structure is not a Queue but a Deque (double-ended queue). Can you change the name to avoid confusion? Thanks.

72cbc36d33e923171 Thank for this suggestion

linhpn99 avatar Jun 25 '24 08:06 linhpn99

@linhpn99, could you provide an example demonstrating the use of this library?

moul avatar Jun 29 '24 06:06 moul

@linhpn99, could you provide an example demonstrating the use of this library?

There are practical use cases in some Ethereum smart contracts that leverage dequeue, such as in lotteries, gaming, or task scheduling, where using dequeue helps manage the order of writing and retrieving data efficiently and flexibly for processing

Currently, it is just a structure package, making it hard to visualize its applications. We plan to propose specific realms to implement this package

linhpn99 avatar Jun 29 '24 06:06 linhpn99

Can you share some examples in solidity then?

moul avatar Jul 03 '24 21:07 moul

Can you share some examples in solidity then?

https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3153

Sorry, currently I haven't been able to find a specific solidity project using this library. However, I refered to a discussion by the OpenZeppelin community about the reasons for implementing this library. I think it provides users with an additional option for data storage/access depending on their use case

I will add more useful information related to this library when I find something new

linhpn99 avatar Jul 03 '24 22:07 linhpn99

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:loudspeaker: Thoughts on this report? Let us know!

codecov[bot] avatar Jul 15 '24 02:07 codecov[bot]

This PR is stale because it has been open 3 months with no activity. Remove stale label or comment or this will be closed in 3 months.

github-actions[bot] avatar Dec 04 '24 02:12 github-actions[bot]

I'm a bot that assists the Gno Core team in maintaining this repository. My role is to ensure that contributors understand and follow our guidelines, helping to streamline the development process.

The following requirements must be fulfilled before a pull request can be merged. Some requirement checks are automated and can be verified by the CI, while others need manual verification by a staff member.

These requirements are defined in this configuration file.

Automated Checks

🟢 Maintainers must be able to edit this pull request 🔴 The pull request head branch must be up-to-date with its base

Manual Checks

  • [ ] The pull request description provides enough details
Debug
Automated Checks
Maintainers must be able to edit this pull request

If

🟢 Condition met
└── 🟢 On every pull request

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

The pull request head branch must be up-to-date with its base

If

🟢 Condition met
└── 🟢 On every pull request

Then

🔴 Requirement not satisfied
└── 🔴 Head branch (linhpn99:add-package-queue) is up to date with base (master): behind by 201 / ahead by 85

Manual Checks
The pull request description provides enough details

If

🟢 Condition met
└── 🟢 Not (🔴 Pull request author is a member of the team: core-contributors)

Can be checked by

  • team core-contributors

Gno2D2 avatar Dec 04 '24 02:12 Gno2D2

I'm closing this PR as the author has not been contributing to Gno for a while.

Feel free to re-open this PR, or fork this PR and propose a new one, considering the latest comments and any surrounding discussion.

thehowl avatar Apr 08 '25 15:04 thehowl