diff --git a/composable-cow/deployment/deploying.mdx b/composable-cow/deployment/deploying.mdx index 43b90fd..4d9bcd1 100644 --- a/composable-cow/deployment/deploying.mdx +++ b/composable-cow/deployment/deploying.mdx @@ -24,6 +24,7 @@ Foundry installation is required: ```bash curl -L https://foundry.paradigm.xyz | bash +# Note: This URL redirects to https://getfoundry.sh foundryup ``` diff --git a/cow-protocol/reference/sdks/cow-sdk.mdx b/cow-protocol/reference/sdks/cow-sdk.mdx index c9f2c6f..b73d3cd 100644 --- a/cow-protocol/reference/sdks/cow-sdk.mdx +++ b/cow-protocol/reference/sdks/cow-sdk.mdx @@ -135,7 +135,7 @@ For more advanced use cases, you can use additional parameters such as `receiver The SDK automatically includes UTM tracking in all orders to attribute trading volume to developers. Default parameters: ``` -{ utmSource: 'cowmunity', utmMedium: 'cow-sdk@7.1.6', // SDK version utmCampaign: 'developer-cohort', utmContent: '', utmTerm: 'js'} +{ utmSource: 'cowmunity', utmMedium: 'cow-sdk@', // SDK version (set automatically) utmCampaign: 'developer-cohort', utmContent: '', utmTerm: 'js'} ``` **Customize or disable** via `advancedSettings.appData.metadata.utm`: diff --git a/cow-protocol/tutorials/solvers/local_test.mdx b/cow-protocol/tutorials/solvers/local_test.mdx index 3a97f5e..57a2360 100644 --- a/cow-protocol/tutorials/solvers/local_test.mdx +++ b/cow-protocol/tutorials/solvers/local_test.mdx @@ -43,8 +43,8 @@ Once the above are set up and running, one can then start testing their solver e | [https://api.cow.fi/mainnet/api](https://api.cow.fi/mainnet/api) | Mainnet | Production | | [https://barn.api.cow.fi/xdai/api](https://barn.api.cow.fi/xdai/api) | Gnosis Chain | Staging | | [https://api.cow.fi/xdai/api](https://api.cow.fi/xdai/api) | Gnosis Chain | Production | -| [https://barn.api.cow.fi/arbitrum\_one/api](https://barn.api.cow.fi/arbitrum_one/api) | Arbitrum One | Staging | -| [https://api.cow.fi/arbitrum\_one/api](https://api.cow.fi/arbitrum_one/api) | Arbitrum One | Production | +| [https://barn.api.cow.fi/arbitrum_one/api](https://barn.api.cow.fi/arbitrum_one/api) | Arbitrum One | Staging | +| [https://api.cow.fi/arbitrum_one/api](https://api.cow.fi/arbitrum_one/api) | Arbitrum One | Production | | [https://barn.api.cow.fi/base/api](https://barn.api.cow.fi/base/api) | Base | Staging | | [https://api.cow.fi/base/api](https://api.cow.fi/base/api) | Base | Production | | [https://barn.api.cow.fi/avalanche/api](https://barn.api.cow.fi/avalanche/api) | Avalanche | Staging | diff --git a/cow-py/api/swap.mdx b/cow-py/api/swap.mdx index 87962d5..c8392ba 100644 --- a/cow-py/api/swap.mdx +++ b/cow-py/api/swap.mdx @@ -105,11 +105,17 @@ class CompletedOrder(BaseModel): | Field | Type | Description | |-------|------|-------------| | `uid` | `UID` | Unique order identifier (56 bytes) | -| `url` | `str` | CoW Explorer URL for tracking | +| `url` | `str` | OrderBook API URL for the order | -### Explorer URLs +### Order URL -The URL points to CoW Explorer based on the chain: +The `url` field contains the OrderBook API endpoint for the order: + +``` +https://api.cow.fi/mainnet/api/v1/orders/{uid} +``` + +To get the CoW Explorer URL for user-facing tracking, construct it manually: - Mainnet: `https://explorer.cow.fi/ethereum/orders/{uid}` - Gnosis Chain: `https://explorer.cow.fi/gc/orders/{uid}` diff --git a/cow-py/guides/swapping-tokens.mdx b/cow-py/guides/swapping-tokens.mdx index 22a4d9d..8eb841f 100644 --- a/cow-py/guides/swapping-tokens.mdx +++ b/cow-py/guides/swapping-tokens.mdx @@ -229,10 +229,9 @@ completed_order = await swap_tokens( The function returns a `CompletedOrder` object with: ```python -@dataclass -class CompletedOrder: +class CompletedOrder(BaseModel): uid: UID # Unique order identifier - url: str # CoW Explorer URL for tracking + url: str # OrderBook API URL for the order ``` ## How It Works @@ -288,7 +287,14 @@ print(f"Status: {order.status}") # open, fulfilled, cancelled, expired If your order has not yet been filled, you can request cancellation: ```python -await api.delete_order(completed_order.uid, signature, signing_scheme) +from cowdao_cowpy.order_book.generated.model import OrderCancellations + +cancellation = OrderCancellations( + orderUids=[completed_order.uid], + signature=signature, + signingScheme=signing_scheme, +) +await api.delete_order(cancellation) ``` @@ -303,6 +309,9 @@ The SDK supports swapping on the following networks: - **Gnosis Chain** -- `Chain.GNOSIS` - **Arbitrum One** -- `Chain.ARBITRUM_ONE` - **Base** -- `Chain.BASE` +- **Polygon** -- `Chain.POLYGON` +- **Avalanche** -- `Chain.AVALANCHE` +- **BNB Smart Chain** -- `Chain.BNB` - **Sepolia Testnet** -- `Chain.SEPOLIA` diff --git a/cow-py/quickstart.mdx b/cow-py/quickstart.mdx index df2aa99..21e5f57 100644 --- a/cow-py/quickstart.mdx +++ b/cow-py/quickstart.mdx @@ -155,7 +155,7 @@ result = await swap_tokens( slippage_tolerance=0.01, # 1% slippage (default: 0.5%) partially_fillable=False, # Allow partial fills (default: False) valid_to=None, # Order expiry timestamp (default: uses quote expiry) - env="prod" # Environment: "prod", "staging", or "barn" (default: "prod") + env="prod" # Environment: "prod" or "staging" (default: "prod") ) ``` diff --git a/cow-sdk/api/subgraph-sdk.mdx b/cow-sdk/api/subgraph-sdk.mdx index 1731a0a..7975938 100644 --- a/cow-sdk/api/subgraph-sdk.mdx +++ b/cow-sdk/api/subgraph-sdk.mdx @@ -3,6 +3,10 @@ title: "Subgraph SDK" description: "TypeScript client for querying CoW Protocol's historical trading data and metrics from TheGraph" --- + +The `SubgraphApi` is deprecated and not currently maintained. It may be removed in a future SDK version. Consider using the [OrderBook API](/cow-protocol/reference/apis/orderbook) for querying order and trade data instead. + + The SubgraphApi provides a TypeScript client for querying historical trading data, volume statistics, and protocol metrics from CoW Protocol subgraphs across multiple chains. ## Installation diff --git a/cow-sdk/installation.mdx b/cow-sdk/installation.mdx index b40b05b..dda9acc 100644 --- a/cow-sdk/installation.mdx +++ b/cow-sdk/installation.mdx @@ -39,10 +39,10 @@ The SDK requires `cross-fetch` (^3.x). Optional packages include `ipfs-only-hash ## Environment Requirements -Node.js 16+ is mandatory. TypeScript support includes built-in type definitions with standard `tsconfig.json` settings (moduleResolution: "node", esModuleInterop: true). +Node.js 22+ is required. TypeScript support includes built-in type definitions with standard `tsconfig.json` settings (moduleResolution: "node", esModuleInterop: true). ## Framework Integration React/Next.js users typically integrate via wagmi, while Node.js backends use direct Viem initialization with environment variables for sensitive credentials. -The current SDK version is **v7.4.1**, with migration guidance available for v6 upgrades. +Migration guidance is available for v6 to v7 upgrades. diff --git a/cow-sdk/quickstart.mdx b/cow-sdk/quickstart.mdx index 2e36d8c..05a5a9e 100644 --- a/cow-sdk/quickstart.mdx +++ b/cow-sdk/quickstart.mdx @@ -10,7 +10,7 @@ This documentation provides a comprehensive walkthrough for executing your first ## Key Prerequisites Before starting, ensure you have: -- Node.js version 16 or higher +- Node.js version 22 or higher - A wallet containing a private key for transaction signing - An RPC endpoint URL (Alchemy, Infura, or Tenderly) - Test tokens on Sepolia testnet @@ -84,7 +84,7 @@ The SDK automatically includes UTM tracking in all orders to attribute trading v ```typescript { utmSource: 'cowmunity', - utmMedium: 'cow-sdk@7.1.6', // SDK version + utmMedium: 'cow-sdk@', // SDK version (set automatically) utmCampaign: 'developer-cohort', utmContent: '', utmTerm: 'js' diff --git a/cow-swap/widget/params.mdx b/cow-swap/widget/params.mdx index 01dd1a1..b9cde1b 100644 --- a/cow-swap/widget/params.mdx +++ b/cow-swap/widget/params.mdx @@ -25,7 +25,7 @@ import { createCowSwapWidget, CowSwapWidgetParams } from '@cowprotocol/widget-li ## App key -You must specify the `appCode` parameter when initializing the widget. This parameter is used to identify the source of orders. The key must be a UTF8 string of up to 50 chars. It will be a part of orders meta-data, see more in the [CoW Protocol Docs](https://docs.cow.fi/front-end/creating-app-ids/create-the-order-meta-data-file/appcode). +You must specify the `appCode` parameter when initializing the widget. This parameter is used to identify the source of orders. The key must be a UTF8 string of up to 50 chars. It will be a part of orders meta-data, see more in the [CoW Protocol Docs](/cow-protocol/reference/core/intents/app-data). ## Partner fee diff --git a/flash-loan-router/getting-started/installation.mdx b/flash-loan-router/getting-started/installation.mdx index 97bcbcf..a4916b2 100644 --- a/flash-loan-router/getting-started/installation.mdx +++ b/flash-loan-router/getting-started/installation.mdx @@ -13,6 +13,7 @@ The Flash-Loan Router is built with Foundry, a blazing fast Ethereum development ```bash curl -L https://foundry.paradigm.xyz | bash +# Note: This URL redirects to https://getfoundry.sh foundryup ``` diff --git a/snippets/supported-networks.mdx b/snippets/supported-networks.mdx index 909a3db..a533db1 100644 --- a/snippets/supported-networks.mdx +++ b/snippets/supported-networks.mdx @@ -9,7 +9,7 @@ CoW Protocol is deployed on the following networks: | Polygon | 137 | Sidechain | | Avalanche C-Chain | 43114 | Sidechain | | BNB Smart Chain | 56 | Sidechain | -| Optimism | 10 | Layer 2 | +| Optimism | 10 | Layer 2 (bridge-only) | | Linea | 59144 | Layer 2 | | Plasma | 9745 | Layer 2 | | Ink | 57073 | Layer 2 | diff --git a/watch-tower/development/setup.mdx b/watch-tower/development/setup.mdx index 8a8d128..0be7217 100644 --- a/watch-tower/development/setup.mdx +++ b/watch-tower/development/setup.mdx @@ -11,7 +11,7 @@ Instructions for setting up the CoW Protocol Watch Tower development environment To develop the CoW Protocol Watch Tower, you'll need: -* `node` (`>= v16.18.0`) +* `node` (`>= v18.0.0`) * `yarn` * `npm` diff --git a/watch-tower/getting-started/installation.mdx b/watch-tower/getting-started/installation.mdx index 82b141f..d4c73ce 100644 --- a/watch-tower/getting-started/installation.mdx +++ b/watch-tower/getting-started/installation.mdx @@ -11,7 +11,7 @@ The CoW Protocol Watch Tower is a standalone application that monitors blockchai Before installing the Watch Tower, ensure you have the following: -* Node.js `>= v16.18.0` +* Node.js `>= v18.0.0` * yarn package manager * An RPC node connected to a supported network (Ethereum mainnet, Arbitrum One, Gnosis Chain, Base, Sepolia, etc.) * Internet access to the CoW Protocol OrderBook API diff --git a/watch-tower/introduction.mdx b/watch-tower/introduction.mdx index e45dd93..26df038 100644 --- a/watch-tower/introduction.mdx +++ b/watch-tower/introduction.mdx @@ -9,7 +9,7 @@ An overview of the CoW Protocol Watch Tower for monitoring and executing program ## What is Watch Tower? -The Watch Tower is a standalone application that monitors the blockchain for programmatic orders created through the [CoW Protocol](https://docs.cow.fi/cow-protocol) [programmatic order framework](https://docs.cow.fi/cow-protocol/concepts/order-types/programmatic-orders). It acts as a critical infrastructure component that bridges on-chain programmatic orders with the CoW Protocol OrderBook API. +The Watch Tower is a standalone application that monitors the blockchain for programmatic orders created through the [CoW Protocol](https://docs.cow.fi/cow-protocol) [programmatic order framework](/cow-protocol/reference/contracts/programmatic/twap). It acts as a critical infrastructure component that bridges on-chain programmatic orders with the CoW Protocol OrderBook API. > "Watch Tower keeps an eye on Composable Cows, automatically detecting new programmatic orders and posting eligible discrete orders to the orderbook."