{"id":25015227,"url":"https://github.com/cowprotocol/clogs","last_synced_at":"2025-03-30T06:15:32.428Z","repository":{"id":195405972,"uuid":"688376295","full_name":"cowprotocol/clogs","owner":"cowprotocol","description":"Dutch Auctions (Conditional Order Template)","archived":false,"fork":false,"pushed_at":"2023-12-19T14:47:16.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-05T08:18:23.398Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cowprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.MD","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-09-07T08:13:05.000Z","updated_at":"2023-09-17T08:02:23.000Z","dependencies_parsed_at":"2023-12-19T17:47:10.064Z","dependency_job_id":null,"html_url":"https://github.com/cowprotocol/clogs","commit_stats":null,"previous_names":["cowprotocol/clogs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowprotocol%2Fclogs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowprotocol%2Fclogs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowprotocol%2Fclogs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowprotocol%2Fclogs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cowprotocol","download_url":"https://codeload.github.com/cowprotocol/clogs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246281310,"owners_count":20752213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-05T08:18:29.203Z","updated_at":"2025-03-30T06:15:32.404Z","avatar_url":"https://github.com/cowprotocol.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Clogs - Dutch Auctions on CoW Protocol\n\nThis repository aims to provide an opinionated best-practices reference implementation of a Conditional Order (concretely a Dutch Auction), on CoW Protocol, using the [ComposableCoW conditional order framework](https://github.com/cowprotocol/composable-cow).\n\n## Getting Started\n\nThis repository uses [Foundry](https://getfoundry.sh) as the smart contract development environment. If you're using [Visual Studio Code](https://code.visualstudio.com), with [Development Containers](https://containers.dev/), then everything is ready to go out of the box!\n\nIf not, then you will need to install the following:\n\n- [forge](https://getfoundry.sh)\n\n## Designing / Reasoning of Order Types\n\nWhen designing a new order type, it is important to consider the following:\n\n1. What is the intended use case for the order type?\n2. What are the limitations of the order type?\n3. How can orders be made to be non-replayable?\n4. What are the security considerations for the order type?\n5. What data is required (if any) to be stored in the cabinet?\n\nSee the [Dutch Auction](./docs/types/dutch-auction.md) documentation for an example of how to address these questions.\n\n## Repository Layout\n\n- `src/`: Source code for the Dutch Auction contract\n- `test/`: Tests for the Dutch Auction contract\n- `script/`: Script for deploying the Dutch Auction contract\n- `docs/`: Documentation for the Dutch Auction contract\n\n### Tests\n\nBy extending `BaseComposableCoWTest`, we get a number of useful helper functions for testing the `DutchAuction`` contract. This includes complete fixtures (fully functional deployments) for:\n\n1. Standalone CoW Protocol contracts\n2. Safe contracts\n3. Dogfooded ERC20 tokens (`token0`, `token1`, `token2`)\n4. Test accounts (`alice`, `bob`, `safe1`)\n\nUsing the provided test harness, one may write complete E2E tests that will simulate the entire lifecycle of conditional orders, including:\n\n1. Configuring a Safe for ComposableCoW\n2. Creating a conditional order\n3. Settling a conditional order via the CoW Protocol settlement contract (`GPv2Settlement`)\n\n## Usage\n\n### Build\n\n```shell\nforge build\n```\n\n### Test\n\n```shell\nforge test\n```\n\n### Format\n\n```shell\nforge fmt\n```\n\n### Gas Snapshots\n\n```shell\nforge snapshot\n```\n\n### Deploy\n\nBefore running the deployment script, you **MUST** set the following environment variables:\n\n- `PRIVATE_KEY`: Private key of the deployer\n- `COMPOSABLE_COW`: Address of the ComposableCoW contract\n\nThese can be set in a `.env` file in the root of the repository.\n\n```shell\nsource .env\nforge script script/Deploy.s.sol:Deploy --rpc-url \u003cyour_rpc_url\u003e\n```\n\n### Cast\n\n```shell\ncast \u003csubcommand\u003e\n```\n\n### Help\n\n```shell\nforge --help\nanvil --help\ncast --help\n```\n\n### Documentation\n\nhttps://book.getfoundry.sh/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcowprotocol%2Fclogs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcowprotocol%2Fclogs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcowprotocol%2Fclogs/lists"}