-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into auction-transaction
- Loading branch information
Showing
24 changed files
with
449 additions
and
534 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Contributing Guidelines | ||
|
||
There are many ways to contribute to CoW Protocol. We welcome contributions of all kinds from anyone, whether you've been a long-time user or you are just getting started with development. | ||
|
||
## Troubleshooting | ||
|
||
You can help other users in the community to solve their issues in the [CoW Protocol Discord]. | ||
|
||
[CoW Protocol Discord]: https://discord.gg/cowprotocol | ||
[CoW Protocol Forums]: https://forum.cow.fi | ||
|
||
## Opening an issue | ||
|
||
You can [open an issue] to suggest a feature or report a minor bug. For serious bugs please do not open an issue, instead refer to our [security policy] for appropriate steps. | ||
|
||
If you believe your issue may be due to user error and not a problem in the library, consider instead posting a question on the [CoW Protocol Discord]. | ||
|
||
Before opening an issue, be sure to search through the existing open and closed issues, and consider posting a comment in one of those instead. | ||
|
||
When requesting a new feature, include as many details as you can, especially around the use cases that motivate it. | ||
Features are prioritised according to the impact they may have on the ecosystem, so we appreciate information showing that the impact could be high. | ||
|
||
[security policy]: https://github.com/cowprotocol/services/security | ||
[open an issue]: https://github.com/cowprotocol/services/issues/new/choose | ||
|
||
## Submitting a pull request | ||
|
||
If you would like to contribute code or documentation you may do so by forking the repository and submitting a pull request. | ||
|
||
Any non-trivial documentation must be first discussed with the maintainers in an issue (see [Opening an issue](#opening-an-issue)). Only very minor changes are accepted without prior discussion. | ||
|
||
When opening the pull request you will be presented with a template and a series of instructions. Read through it carefully and follow all the steps. | ||
Expect a review and feedback from the maintainers afterwards. | ||
|
||
If you're looking for a good place to start, look for issues labelled ["help wanted"](https://github.com/cowprotocol/services/labels/help%20wanted)! | ||
|
||
## Reward for Contributions | ||
We are excited to support our community's contributions in a tangible way. | ||
For merged pull requests that contribute to issues labeled "help wanted", we are offering a reward of 100 DAI. | ||
To be eligible for this reward, make sure your pull request meets all the required criteria and is successfully merged. | ||
|
||
Please leave a Gnosis Chain address at which you'd like to receive the DAI either in the PR description or via Discord DM to *mastercow.eth*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,44 @@ | ||
pub use crate::boundary::mempool::{Config, GlobalTxPool, Kind, Mempool, RevertProtection}; | ||
pub use crate::boundary::mempool::{Config, GlobalTxPool, Kind, RevertProtection, SubmissionLogic}; | ||
|
||
#[derive(Debug, Clone)] | ||
pub enum Mempool { | ||
/// Legacy implementation of the mempool, using the shared and solvers crate | ||
Boundary(crate::boundary::mempool::Mempool), | ||
/// Driver native mempool implementation | ||
Native(Inner), | ||
} | ||
|
||
impl std::fmt::Display for Mempool { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
match self { | ||
Self::Boundary(mempool) => write!(f, "Boundary({mempool})"), | ||
Self::Native(mempool) => write!(f, "Native({mempool})"), | ||
} | ||
} | ||
} | ||
|
||
impl Mempool { | ||
pub fn config(&self) -> &Config { | ||
match self { | ||
Self::Boundary(mempool) => mempool.config(), | ||
Self::Native(mempool) => &mempool.config, | ||
} | ||
} | ||
} | ||
|
||
#[derive(Debug, Clone)] | ||
pub struct Inner { | ||
config: Config, | ||
} | ||
|
||
impl std::fmt::Display for Inner { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
write!(f, "Mempool({})", self.config.kind.format_variant()) | ||
} | ||
} | ||
|
||
impl Inner { | ||
pub fn config(&self) -> &Config { | ||
&self.config | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.