Skip to content

Commit

Permalink
feat: add base (#162)
Browse files Browse the repository at this point in the history
# Description

Add Base network support

# Changes

- [x] Bump cow-sdk version

## How to test

1. Use the following config:
```
{
  "networks": [
    {
      "name": "base",
      "rpc": "<set a base rpc here>",
      "deploymentBlock": 21794150,
      "processEveryNumBlocks": 5,
      "pageSize": 5000,
      "filterPolicy": {
        "defaultAction": "ACCEPT",
        "conditionalOrderIds": {},
        "transactions": {},
        "handlers": {},
        "owners": {}
      }
    }
  ]
}
```

2. Run it with `yarn cli`
* Should start and process blocks accordingly

![image](https://github.com/user-attachments/assets/4437453a-a2ad-403c-88db-ea100baa3b6a)


Note: Not yet able to place TWAP orders, so can't be fully tested yet
  • Loading branch information
alfetopito authored Nov 27, 2024
1 parent b50d5b4 commit fc2d231
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The [programmatic order](https://docs.cow.fi/cow-protocol/concepts/order-types/p

If running your own watch-tower instance, you will need the following:

- An RPC node connected to the Ethereum mainnet, Arbitrum One, Gnosis Chain, or Sepolia.
- An RPC node connected to the Ethereum mainnet, Arbitrum One, Gnosis Chain, Base, or Sepolia.
- Internet access to the [CoW Protocol `OrderBook` API](https://docs.cow.fi/cow-protocol/reference/apis/orderbook).

**CAUTION**: Conditional order types may consume considerable RPC calls.
Expand All @@ -17,7 +17,6 @@ If running your own watch-tower instance, you will need the following:

**NOTE**: The `pageSize` option is used to specify the number of blocks to fetch from the blockchain when querying historical events (`eth_getLogs`). The default is `5000`, which is the maximum number of blocks that can be fetched in a single request from Infura. If you are running the watch-tower against your own RPC, you may want to set this to `0` to fetch all blocks in one request, as opposed to paging requests.


### Docker

The preferred method of deployment is using `docker`. The watch-tower is available as a docker image on [GitHub](https://github.com/cowprotocol/watch-tower/pkgs/container/watch-tower). The tags available are:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"dependencies": {
"@commander-js/extra-typings": "^11.0.0",
"@cowprotocol/contracts": "^1.4.0",
"@cowprotocol/cow-sdk": "^5.3.0",
"@cowprotocol/cow-sdk": "^5.7.1",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
"chalk": "^4.1.2",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,10 @@
resolved "https://registry.yarnpkg.com/@cowprotocol/contracts/-/contracts-1.6.0.tgz#d0fc83ed8c624b968d1a68bb5c74712c11ec81e0"
integrity sha512-+UKhYRzkvnqqviBru5D3btTLYc743n0O5YTG+wpYwGl4fb7VNKBkFHe28C5Mf1DF/kOfmqfu+0IAvX9Vuq5Dqw==

"@cowprotocol/cow-sdk@^5.3.0":
version "5.3.0"
resolved "https://registry.yarnpkg.com/@cowprotocol/cow-sdk/-/cow-sdk-5.3.0.tgz#3330a43134d6a15453afb22dd1f490738089e591"
integrity sha512-gH53emDVsHkO9sGb8rxqx5RLNBmH1ABrum4bSxRorT3eXWviJy5kYUlucCSUIk5uMCbcJnyvsnHBZptGiMCVAA==
"@cowprotocol/cow-sdk@^5.7.1":
version "5.7.1"
resolved "https://registry.yarnpkg.com/@cowprotocol/cow-sdk/-/cow-sdk-5.7.1.tgz#22b556b79c949a3c5a65ee87f188a477f29d76eb"
integrity sha512-1SKzf6hqLEUP3if+Ki6eweSWcUA7hDyFcmUW2tf6a0XROwl9ktNHWP7dJ09zMrnFn6k03DqoYvKun1i+WS1D7Q==
dependencies:
"@cowprotocol/contracts" "^1.6.0"
"@ethersproject/abstract-signer" "^5.7.0"
Expand Down

0 comments on commit fc2d231

Please sign in to comment.