feat(examples): Implement p/demo/dequeue
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: xxxmessage 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.
@moul i have just implemented queue structure, please take a look !
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?
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, could you provide an example demonstrating the use of this library?
@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
Can you share some examples in solidity then?
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
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:loudspeaker: Thoughts on this report? Let us know!
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.
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 requestThen
🟢 Requirement satisfied └── 🟢 Maintainer can modify this pull requestThe pull request head branch must be up-to-date with its base
If
🟢 Condition met └── 🟢 On every pull requestThen
🔴 Requirement not satisfied └── 🔴 Head branch (linhpn99:add-package-queue) is up to date with base (master): behind by 201 / ahead by 85Manual 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
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.