Skip to content
Open
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
6 changes: 3 additions & 3 deletions docs/cow-protocol/reference/contracts/core/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Take care when [signing](../core/signing-schemes), ensuring that the `EIP-712` d

| **Contracts** | **Address / Chains** |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [`GPv2Settlement`](core/settlement)<br />Upgradeable: No ❎<br />[GitHub](https://github.com/cowprotocol/contracts/blob/main/src/contracts/GPv2Settlement.sol) | `0x9008D19f58AAbD9eD0D60971565AA8510560ab41`<br />{explorerLinks(["Ethereum","Gnosis","Arbitrum One","Base","Avalanche","Polygon","Plasma","Lens","Linea","BNB","Sepolia"], "0x9008D19f58AAbD9eD0D60971565AA8510560ab41", {separator: <br />})} |
| [`GPv2AllowListAuthentication`](core/allowlist)<br />Upgradeable: Yes ⚠️<br />[GitHub](https://github.com/cowprotocol/contracts/blob/main/src/contracts/GPv2AllowListAuthentication.sol) | `0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE`<br />{explorerLinks(["Ethereum","Gnosis","Arbitrum One","Base","Avalanche","Polygon","Plasma","Lens","Linea","BNB","Sepolia"], "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE", {separator: <br />})} |
| [`GPv2VaultRelayer`](core/vault-relayer)<br />Upgradeable: No ❎<br />[GitHub](https://github.com/cowprotocol/contracts/blob/main/src/contracts/GPv2VaultRelayer.sol) | `0xC92E8bdf79f0507f65a392b0ab4667716BFE0110`<br />{explorerLinks(["Ethereum","Gnosis","Arbitrum One","Base","Avalanche","Polygon","Plasma","Lens","Linea","BNB","Sepolia"], "0xC92E8bdf79f0507f65a392b0ab4667716BFE0110", {separator: <br />})} |
| [`GPv2Settlement`](core/settlement)<br />Upgradeable: No ❎<br />[GitHub](https://github.com/cowprotocol/contracts/blob/main/src/contracts/GPv2Settlement.sol) | `0x9008D19f58AAbD9eD0D60971565AA8510560ab41`<br />{explorerLinks(["Ethereum","Gnosis","Arbitrum One","Base","Avalanche","Polygon","Plasma","Lens","Linea","BNB","Ink","Sepolia"], "0x9008D19f58AAbD9eD0D60971565AA8510560ab41", {separator: <br />})} |
| [`GPv2AllowListAuthentication`](core/allowlist)<br />Upgradeable: Yes ⚠️<br />[GitHub](https://github.com/cowprotocol/contracts/blob/main/src/contracts/GPv2AllowListAuthentication.sol) | `0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE`<br />{explorerLinks(["Ethereum","Gnosis","Arbitrum One","Base","Avalanche","Polygon","Plasma","Lens","Linea","BNB","Ink","Sepolia"], "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE", {separator: <br />})} |
| [`GPv2VaultRelayer`](core/vault-relayer)<br />Upgradeable: No ❎<br />[GitHub](https://github.com/cowprotocol/contracts/blob/main/src/contracts/GPv2VaultRelayer.sol) | `0xC92E8bdf79f0507f65a392b0ab4667716BFE0110`<br />{explorerLinks(["Ethereum","Gnosis","Arbitrum One","Base","Avalanche","Polygon","Plasma","Lens","Linea","BNB","Ink","Sepolia"], "0xC92E8bdf79f0507f65a392b0ab4667716BFE0110", {separator: <br />})} |

<details close>
<summary>Upgradeable allow-list</summary>
Expand Down
30 changes: 16 additions & 14 deletions docs/cow-protocol/reference/contracts/periphery/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Peripheral contracts are those that are not necessary for CoW Protocol to functi

| Environment | Address | Networks |
| ------------------------ | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Production (most chains) | `0xbA3cB449bD2B4ADddBc894D8697F5170800EAdeC` | {explorerLinks(["Ethereum","Gnosis","Arbitrum One","Base","Avalanche","Polygon","BNB","Linea","Plasma","Sepolia"], "0xbA3cB449bD2B4ADddBc894D8697F5170800EAdeC")}, but not Lens! |
| Staging (most chains) | `0x04501b9b1D52e67f6862d157E00D13419D2D6E95` | {explorerLinks(["Ethereum","Gnosis","Arbitrum One","Base","Avalanche","Polygon","BNB","Linea","Plasma","Sepolia"], "0x04501b9b1D52e67f6862d157E00D13419D2D6E95")}, but not Lens! |
| Production (most chains) | `0xbA3cB449bD2B4ADddBc894D8697F5170800EAdeC` | {explorerLinks(["Ethereum","Gnosis","Arbitrum One","Base","Avalanche","Polygon","BNB","Linea","Plasma","Ink","Sepolia"], "0xbA3cB449bD2B4ADddBc894D8697F5170800EAdeC")}, but not Lens! |
| Staging (most chains) | `0x04501b9b1D52e67f6862d157E00D13419D2D6E95` | {explorerLinks(["Ethereum","Gnosis","Arbitrum One","Base","Avalanche","Polygon","BNB","Linea","Plasma","Ink","Sepolia"], "0x04501b9b1D52e67f6862d157E00D13419D2D6E95")}, but not Lens! |
| Production (Lens) | `0x5A5b8aE7a0b4C0EAf453d10DCcfbA413f07ebdC2` | {explorerLinks("Lens", "0x5A5b8aE7a0b4C0EAf453d10DCcfbA413f07ebdC2")} only! |
| Staging (Lens) | `0xFb337f8a725A142f65fb9ff4902d41cc901de222` | {explorerLinks("Lens", "0xFb337f8a725A142f65fb9ff4902d41cc901de222")} only! |

Expand Down Expand Up @@ -43,18 +43,19 @@ You should not assume that the HooksTrampoline contract address will remain fixe
#### Networks

{explorerLinks([
"Ethereum",
"Sepolia",
"Gnosis",
"Base",
"Arbitrum One",
"Avalanche",
"Polygon",
"Lens",
"Base",
"BNB",
"Ethereum",
"Gnosis",
"Ink"
"Lens",
"Linea",
"Plasma",
"Optimism"
"Plasma",
Comment on lines 45 to +56
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix missing commas in the network list (build break).

The explorerLinks([...]) array is missing commas after "Ink" and "Optimism", which will invalidate the MDX/JS and fail builds.

🔧 Proposed fix
 "Gnosis",
-"Ink"
+"Ink",
 "Lens",
 "Linea",
-"Optimism"
+"Optimism",
 "Plasma",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{explorerLinks([
"Ethereum",
"Sepolia",
"Gnosis",
"Base",
"Arbitrum One",
"Avalanche",
"Polygon",
"Lens",
"Base",
"BNB",
"Ethereum",
"Gnosis",
"Ink"
"Lens",
"Linea",
"Plasma",
"Optimism"
"Plasma",
{explorerLinks([
"Arbitrum One",
"Avalanche",
"Base",
"BNB",
"Ethereum",
"Gnosis",
"Ink",
"Lens",
"Linea",
"Optimism",
"Plasma",
🤖 Prompt for AI Agents
In `@docs/cow-protocol/reference/contracts/periphery/README.mdx` around lines 45 -
56, The MDX array passed to explorerLinks is missing commas after the "Ink" and
"Optimism" entries which breaks parsing; update the array inside the
explorerLinks([...]) call (the list containing "Arbitrum One", "Avalanche", ...,
"Ink", "Lens", "Linea", "Optimism", "Plasma") to include the missing commas so
each string is a separate element and the MDX/JS is valid.

"Polygon",
"Sepolia",
], "0x60Bf78233f48eC42eE3F101b9a05eC7878728006")}


Expand All @@ -69,16 +70,17 @@ You should not assume that the HooksTrampoline contract address will remain fixe
**Networks**:

{explorerLinks([
"Ethereum",
"Gnosis",
"Arbitrum One",
"Base",
"Avalanche",
"Polygon",
"Lens",
"Base",
"BNB",
"Ethereum",
"Gnosis",
"Ink",
"Lens",
"Linea",
"Plasma",
"Polygon",
"Sepolia",
], "0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74")}

Expand Down
3 changes: 2 additions & 1 deletion docs/cow-protocol/reference/core/auctions/rewards.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The payment calculation can result in a negative figure, in which case the solve

The payment is capped from above and below using the function $$\textrm{cap}(x) = \max(-c_l, \min(c_u, x))$$, where $$c_u$$ is the protocol fee (excluding partner fees) that the protocol earned from the trades in all solutions supplied by the solver in that auction and $$c_l$$ is chain-specific, determined by the following values:

- Ethereum mainnet, Arbitrum, and Base chain: $$0.010 \;\textrm{ETH}$$
- Ethereum mainnet, Arbitrum, Base and Ink chain: $$0.010 \;\textrm{ETH}$$
Copy link
Author

Choose a reason for hiding this comment

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

Not sure if this is the case (Ink == Mainnet)

- Gnosis Chain: $$10 \;\textrm{xDAI}$$
- Avalanche: $$0.3 \;\textrm{AVAX}$$
- Polygon: $$30 \;\textrm{POL}$$
Expand Down Expand Up @@ -97,5 +97,6 @@ The current rewards for eligible quotes are as follows:
- BNB Chain: $$\min\{0.001 ~\textrm{BNB}, 6 ~\textrm{COW}\}$$
- Linea: $$\min\{0.00003 ~\textrm{ETH}, 6 ~\textrm{COW}\}$$.
- Plasma: $$\min\{0.6 ~\textrm{XPL}, 6 ~\textrm{COW}\}$$.
- Ink: $$\min\{X.X ~\textrm{XPL}, 6 ~\textrm{COW}\}$$.
Copy link
Author

Choose a reason for hiding this comment

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

Need values.

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Incorrect token symbol: Ink uses ETH, not XPL.

The placeholder shows X.X XPL but Ink is an OP Stack chain that uses ETH as its native token. XPL is Plasma's native token (copied from line 99).

🔧 Proposed fix
-- Ink: $$\min\{X.X ~\textrm{XPL}, 6 ~\textrm{COW}\}$$.
+- Ink: $$\min\{X.X ~\textrm{ETH}, 6 ~\textrm{COW}\}$$.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Ink: $$\min\{X.X ~\textrm{XPL}, 6 ~\textrm{COW}\}$$.
- Ink: $$\min\{X.X ~\textrm{ETH}, 6 ~\textrm{COW}\}$$.
🤖 Prompt for AI Agents
In `@docs/cow-protocol/reference/core/auctions/rewards.md` at line 100, Replace
the incorrect token symbol in the Ink reward line: change the expression "Ink:
$$\min\{X.X ~\textrm{XPL}, 6 ~\textrm{COW}\}$$." so that the placeholder token
symbol "XPL" is "ETH" (e.g., "Ink: $$\min\{X.X ~\textrm{ETH}, 6
~\textrm{COW}\}$$."), preserving the LaTeX formatting and the rest of the text.


where, again, the conversion from native token to COW is done by using an up-to-date price (specifically, the average native token/COW Dune prices of the past 24h before the payout are used to determine these exchange rates).
12 changes: 7 additions & 5 deletions docs/cow-protocol/reference/core/signing_schemes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,17 @@ The actual domain separator is the result of hashing the previous `EIP712Domain`
For convenience, the domain separator is exposed as a public view function in the settlement contract:

{explorerLinks([
"Ethereum",
"Gnosis",
"Arbitrum One",
"Base",
"Avalanche",
"Polygon",
"Lens",
"Base",
"BNB",
"Ethereum",
"Gnosis",
"Ink",
"Lens",
"Linea",
"Plasma",
"Polygon",
"Sepolia",
], "0x9008D19f58AAbD9eD0D60971565AA8510560ab41", {separator: <br />, urlTrailing: "#readContract#F2"})}

Expand Down Expand Up @@ -136,6 +137,7 @@ For convenience, we also deployed a small helper contract that makes it easy to
- BNB N/A
- Linea N/A
- Plasma N/A
- Ink N/A
- {explorerLinks("Sepolia", "0x59Ffd6c1823F212D49887230f155A35451FdDbfa", {urlTrailing: "#readContract#F1"})}

## Supported schemes
Expand Down
1 change: 1 addition & 0 deletions docs/cow-protocol/tutorials/cow-swap/custom-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Native and wrapped tokens per chain:
- BNB: [`WBNB`](https://bscscan.com/address/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c) - wrapped `BNB`
- Linea: [`WETH`](https://lineascan.build/token/0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f) - wrapped `ETH`
- Plasma: [`WXPL`](https://plasmascan.to/token/0x6100E367285b01F48D07953803A2d8dCA5D19873) - wrapped `XPL`
- Ink: [`WETH`](https://explorer.inkonchain.com/token/0x4200000000000000000000000000000000000006) - wrapped `ETH`
- Sepolia: [`WETH`](https://sepolia.etherscan.io/address/0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14) - wrapped `ETH`

:::
2 changes: 2 additions & 0 deletions docs/cow-protocol/tutorials/solvers/local_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,7 @@ Once the above are set up and running, one can then start testing their solver e
| <https://api.cow.fi/linea/api> | Linea | Production |
| <https://barn.api.cow.fi/plasma/api> | Plasma | Staging |
| <https://api.cow.fi/plasma/api> | Plasma | Production |
| <https://barn.api.cow.fi/ink/api> | Ink | Staging |
| <https://api.cow.fi/ink/api> | Ink | Production |
| <https://barn.api.cow.fi/sepolia/api> | Sepolia | Staging |
| <https://api.cow.fi/sepolia/api> | Sepolia | Production |
2 changes: 2 additions & 0 deletions docs/governance/token.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ At the core of CoW Protocol lies the COW token, which serves as a governance tok
| BNB | N/A |
| Linea | N/A |
| Plasma | N/A |
| Ink | N/A |

[^bridgedTokens]:
These contracts were not developed nor deployed by CoW DAO, however, they are the bridged versions of the canonical token from Ethereum, using the official bridges.
Expand All @@ -41,6 +42,7 @@ At the core of CoW Protocol lies the COW token, which serves as a governance tok
| BNB | N/A |
| Linea | N/A |
| Plasma | N/A |
| Ink | N/A |

## Supply & Inflation Schedule

Expand Down
13 changes: 10 additions & 3 deletions src/components/contract-addresses/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ export const explorerByChain = {
"Linea": "https://lineascan.build",
"Plasma": "https://plasmascan.to",
"Optimism": "https://optimistic.etherscan.io",
"Ink": "https://explorer.inkonchain.com",
} as const;

export type ChainName = keyof typeof explorerByChain;

interface ExplorerUrlOptions {
/**
* Which parameters to append after the Explorer URL. For example, #code
* points to the contract code.
*/
urlTrailing?: string | undefined,
}
export function explorerUrl(chain: string, address: string, params?: ExplorerUrlOptions) {
export function explorerUrl(chain: ChainName, address: string, params?: ExplorerUrlOptions) {
const urlTrailing = params?.urlTrailing ?? "";
if (!(chain in explorerByChain)) {
throw new Error(`Explorer URL for chain ${chain} is not known`);
Expand All @@ -49,8 +52,8 @@ interface ExplorerLinksOptions {
* chains separated by a comma. All chain names are links to that chain's
* explorer for the given address.
*/
export function explorerLinks(chains: string[] | string, address: string, options?: ExplorerLinksOptions): React.ReactNode {
chains = (typeof chains == "string") ? [chains] : chains;
export function explorerLinks(chainsParam: ChainName[] | ChainName, address: string, options?: ExplorerLinksOptions): React.ReactNode {
const chains = asArray(chainsParam);
const separator = options?.separator ?? ", ";
const urlTrailing = options?.urlTrailing ?? "#code";
return chains.reduce(
Expand All @@ -63,3 +66,7 @@ export function explorerLinks(chains: string[] | string, address: string, option
}
, []);
}

function asArray<T>(arr: T | T[]): T[] {
return Array.isArray(arr) ? arr : [arr];
}
Loading