Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Replace Gnosis Protocol --> CoW Protocol #2140

Merged
merged 5 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ jobs:
uses: mshick/add-pr-comment@v1
with:
message: |
* **🔭 [GP Swap](${{ env.REVIEW_FEATURE_URL }})**: Gnosis Protocol v2 Swap UI
* **🔭 [GP Swap](${{ env.REVIEW_FEATURE_URL }})**: CoW Protocol v2 Swap UI
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
if: env.PR_NUMBER
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![Tests](https://github.com/gnosis/dex-swap/workflows/Tests/badge.svg)](https://github.com/gnosis/dex-swap/actions?query=workflow%3ATests)
[![Styled With Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io/)

CowSwap is the first trading interface built on top of Gnosis Protocol v2.
CowSwap is the first trading interface built on top of CoW Protocol v2.

It allows you to buy and sell tokens using gas-less orders that are settled peer-to-peer among its users or into any on-chain liquidity source while providing MEV protection.

Expand All @@ -25,8 +25,8 @@ It allows you to buy and sell tokens using gas-less orders that are settled peer

Please see the:

- [Gnosis Protocol: Smart contracts](https://github.com/gnosis/gp-v2-contracts)
- [Gnosis Protocol: Services](https://github.com/gnosis/gp-v2-services)
- [CoW Protocol: Smart contracts](https://github.com/gnosis/gp-v2-contracts)
- [CoW Protocol: Services](https://github.com/gnosis/gp-v2-services)

You can block an entire list of tokens by passing in a tokenlist like [here](./src/constants/lists.ts) or you can block specific tokens by adding them to [unsupported.tokenlist.json](./src/constants/tokenLists/unsupported.tokenlist.json).

Expand Down Expand Up @@ -98,20 +98,20 @@ CowSwap tries to find the best price available onchain using some price feeds.

All price feeds are enabled by default, but they can be individually disabled by using an environment variable:

| Name | Environment variable | Type | Description |
| ------------------- | ---------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Gnosis Protocol** | `REACT_APP_PRICE_FEED_GP_ENABLED` | `boolean` (default = `true`) | [Gnosis Protocol](https://docs.cowswap.exchange/) price estimation. Used for all price estimation. |
| **Paraswap** | `REACT_APP_PRICE_FEED_PARASWAP_ENABLED` | `boolean` (default = `true`) | [Paraswap](https://paraswap.io/) price estimation. Used for all price estimations. |
| **0x** | `REACT_APP_PRICE_FEED_0X_ENABLED` | `boolean` (default = `true`) | [0x](https://0x.org/) price estimation. Used for all price estimation. |
| **Coingecko** | `REACT_APP_PRICE_FEED_COINGECKO_ENABLED` | `boolean` (default = `true`) | [Coingecko](coingecko.com) price estimation. Used only for USD estimations to calculate the slippage on the trade. |
| Name | Environment variable | Type | Description |
| ---------------- | ---------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **CoW Protocol** | `REACT_APP_PRICE_FEED_GP_ENABLED` | `boolean` (default = `true`) | [CoW Protocol](https://docs.cowswap.exchange/) price estimation. Used for all price estimation. |
| **Paraswap** | `REACT_APP_PRICE_FEED_PARASWAP_ENABLED` | `boolean` (default = `true`) | [Paraswap](https://paraswap.io/) price estimation. Used for all price estimations. |
| **0x** | `REACT_APP_PRICE_FEED_0X_ENABLED` | `boolean` (default = `true`) | [0x](https://0x.org/) price estimation. Used for all price estimation. |
| **Coingecko** | `REACT_APP_PRICE_FEED_COINGECKO_ENABLED` | `boolean` (default = `true`) | [Coingecko](coingecko.com) price estimation. Used only for USD estimations to calculate the slippage on the trade. |

### Metadata attached to orders (AppData)

The app will attach some metadata to all orders.

This metadata will be sent to the smart contract as an hexadecimal value in an order field called `AppData`. This value comes from hashing the content of a metadata JSON containing some information about the trade.

Any web app or client using Gnosis Protocol can upload to IPFS a metadata JSON and use the digest hex to attach that
Any web app or client using CoW Protocol can upload to IPFS a metadata JSON and use the digest hex to attach that
information to the order.

For example, CowSwap uploaded the file https://cloudflare-ipfs.com/ipfs/QmTDarZ47oek1miuRd8uuNCy5AFfjzQbWJ7348izx9N8wQ
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gnosis/cowswap",
"description": "CowSwap - Gnosis Protocol",
"description": "CowSwap - CoW Protocol",
"homepage": ".",
"main": "dist/interface.js",
"module": "dist/interface.esm.js",
Expand Down
2 changes: 1 addition & 1 deletion public_uniswap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->

<title>Gnosis Protocol</title>
<title>CoW Protocol</title>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion src/custom/api/gnosisProtocol/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const DEFAULT_HEADERS = {
'Content-Type': 'application/json',
'X-AppId': APP_DATA_HASH.toString(),
}
const API_NAME = 'Gnosis Protocol'
const API_NAME = 'CoW Protocol'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this change, maybe it can cause any problem?

Copy link
Contributor

@henrypalacios henrypalacios Jan 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, that variable is used for messages.

const ENABLED = process.env.REACT_APP_PRICE_FEED_GP_ENABLED !== 'false'
/**
* Unique identifier for the order, calculated by keccak256(orderDigest, ownerAddress, validTo),
Expand Down
2 changes: 1 addition & 1 deletion src/custom/components/SearchModal/CurrencyList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { MenuItem as MenuItemMod } from '@src/components/SearchModal/styleds'
const UNSUPPORTED_TOKEN_TAG = [
{
name: t`Unsupported`,
description: t`This token is unsupported as it does not operate optimally with Gnosis Protocol. Please refer to the FAQ for more information.`,
description: t`This token is unsupported as it does not operate optimally with CoW Protocol. Please refer to the FAQ for more information.`,
id: '0',
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import styled from 'styled-components/macro'
const DEFAULT_DETAILS_TEXT = (
<div>
CowSwap does not support all tokens. Some tokens implement similar, but logically different ERC20 contract methods
which do not operate optimally with Gnosis Protocol.
which do not operate optimally with CoW Protocol.
<p>
For more information, please refer to the <HashLink to={UNSUPPORTED_TOKENS_FAQ_URL}>FAQ</HashLink>.
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/custom/pages/TermsAndConditions/TermsAndConditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Please read these Terms carefully before using our Platform. By using our Platfo
GnosisDAO subcategory of <a href="https://forum.gnosis.io/" target="_blank" rel="noopener nofollow">forum.gnosis.io</a>.
2. We use open source products and developer materials from Gnosis
Limited and affiliated persons and entities (“**Affiliates**”) as
well as other third parties to provide a Platform to Gnosis Protocol
well as other third parties to provide a Platform to CoW Protocol
version 2 (the “**Protocol**”). The provision of the Platform and
the Protocol is based solely on our independent actions.

**2. WE PROVIDE A PLATFORM TO INTERACTING WITH THE GNOSIS PROTOCOL**
**2. WE PROVIDE A PLATFORM TO INTERACTING WITH THE COW PROTOCOL**

1. We provide a graphical user interface (the “**Platform**”) to
facilitate you interacting with the Protocol.
Expand Down