# Grant Application: Cow protocol — upgrade to Ethers V6

**URL:** <https://forum.cow.fi/t/grant-application-cow-protocol-upgrade-to-ethers-v6/2778>\
**Category:** CoW Grants Program\
**Tags:** grant-rejected\
**Created:** [January 23, 2025, 6:26am UTC](https://forum.cow.fi/t/grant-application-cow-protocol-upgrade-to-ethers-v6/2778 "2025-01-23T06:26:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![No-rush](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.cow.fi/no-rush/32/1290_2.png) [@No-rush](https://forum.cow.fi/u/No-rush)\
**Post date:** [January 23, 2025, 6:26am UTC](https://forum.cow.fi/t/grant-application-cow-protocol-upgrade-to-ethers-v6/2778/1 "2025-01-23T06:26:05Z")

</div>

* * *

**Grant Title:**

Ethers.js v5 to v6 Upgrade and SDK Agnosticism for Cow Protocol

* * *

**Author:**

This implementation of the project will be carried out by: @[AbhishekKochar](https://github.com/Abhishekkochar)

* * *

**About You:**

I’m a blockchain engineer with over 4 years of experience, specialising in working with multiple DeFi protocols. My expertise primarily lies in developer tools and smart contract development.

* * *

**Additional Links:**

Github: [Abhishekkochar (Abhishek kochar) · GitHub](https://github.com/Abhishekkochar)

* * *

**Grant Category:**

Developer tools

* * *

**Grant Description:**

In response to this [RFG](https://forum.cow.fi/t/rfp-ethers-js-v5-to-v6-upgrade-and-sdk-agnosticism-for-cow-protocol/2689), I aim to upgrade the `@cowprotocol/cow-sdk` & `cowswap` from ether-V5 to ether-V6.

This will also require me to do the following:

- Remove dependency on `@cowprotocol/contracts`package. Import all the necessary function to `@cowprotocol/cow-sdk` .
- Refractor `Cowswap` dependency from `@cowprotocol/contracts` to `@cowprotocol/cow-sdk` .
- Investigating 3rd-party packages dependency on ether.js. Updating packages to appropriate version accordingly,
- Similar changes will be made on related sub-projects like `explorer`.
- Thorough testing of updated projects in staging environments.
- Finalize documentation and migration guides.
- Deploy and monitor updated versions.

Note: Github repository will be public. Changes will be made to the existing repository.

- `ether-v6` will serve as a main branch. All changes related to this upgrade will be made to this branch.
- Upon successful completion of the migration to Ether-V6, a PR will be created to push the changes to `main` branch.

[RFP: Ethers.js v5 to v6 Upgrade and SDK Agnosticism for Cow Protocol](https://forum.cow.fi/t/rfp-ethers-js-v5-to-v6-upgrade-and-sdk-agnosticism-for-cow-protocol/2689)

**Funding Request:**

A total of 15,000 EURO denominated in xDAI token (Gnosis Chain).

* * *

**Milestones**

| Milestone | Task | Due Date | Payment | |
| --- | --- | --- | --- | --- |
| Milestone 1 | Remove dependency `@cowprotocol/contracts` package on both `@cowprotocol/cow-sdk` and `Cowswap` along with passing affected tests. Migration to ether-v6 on both `@cowprotocol/cow-sdk` and `Cowswap` , along with existing passing and additional tests if required. | 2 weeks | 6000 EURO | |
| Milestone 2 | Changes to all sub-projects like `explorer`. Update documents and examples | 1 week | 2000 EURO | |
| Milestone 3 | Modular adapters for blockchain interactions, utilising both Ether.js and Viem, along with documentation. | 3 weeks | 7000 EURO | |
| NOTE: Payment denominated in xDAI. | | | | |

* * *

**Gnosis Chain Address (to receive the grant):**

gno:0xa87a0BE15A8507e0e652f80B0f898301c9a7906D

* * *

**Terms and Conditions:**

By submitting this grant application, I acknowledge and agree to be bound by the [CoW DAO Participation Agreement](https://cloudflare-ipfs.com/ipfs/Qmf9MYhcG2pFrDoVy13p6FWeVF4nG9HbJvRfYYbhazTCFe) and the [CoW Grant Terms and Conditions](https://cloudflare-ipfs.com/ipfs/Qmag8BoNWhBnJ7TFyv2hzWwtoH17Xo7m9468NY6bN8sR6U).

---

<div class="post-metadata">

**Author:** ![mfw78](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.cow.fi/mfw78/32/1598_2.png) [@mfw78](https://forum.cow.fi/u/mfw78)\
**Post date:** [January 23, 2025, 7:04am UTC](https://forum.cow.fi/t/grant-application-cow-protocol-upgrade-to-ethers-v6/2778/2 "2025-01-23T07:04:23Z")

</div>

Hi,  
Thanks for your application. Given the comprehensive and technical nature of this grant, can you please identify links to projects (specific repositories), where you have contributed developer related tooling / SDKs?

Additionally, given the size of this, I would suggest breaking things down into specific milestones and payment to be made upon milestone completion. For example, a refactor extracting the `@cowprotocol/contracts` dependency with tests migration, `ethers-v6` migration with tests, followed by documentation / example updates etc.

Would be nice for feedback as well from @shoom3301 and/or @anxolin.

mfw78.

---

<div class="post-metadata">

**Author:** ![No-rush](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.cow.fi/no-rush/32/1290_2.png) [@No-rush](https://forum.cow.fi/u/No-rush)\
**Post date:** [January 23, 2025, 7:44am UTC](https://forum.cow.fi/t/grant-application-cow-protocol-upgrade-to-ethers-v6/2778/3 "2025-01-23T07:44:37Z")

</div>

Hi,

Thanks for the quick message.  
Following are some of the open source projects I developed with ether.js and other libraries.

Liquidity mining: [GitHub - BirthdayResearch/liquidity.dfi.dev: CFP-2207-17: DFI Liquidity Mining Program.](https://github.com/BirthdayResearch/liquidity.dfi.dev/tree/main),  
Quantum bridge: [GitHub - BirthdayResearch/quantum: Quantum is a trusted, bi-directional bridge that directly connects DeFiChain (DFI) and Ethereum (ETH).](https://github.com/BirthdayResearch/quantum),

Edit: Added milestones table.

---

<div class="post-metadata">

**Author:** ![anxolin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.cow.fi/anxolin/32/275_2.png) [@anxolin](https://forum.cow.fi/u/anxolin)\
**Post date:** [January 23, 2025, 4:15pm UTC](https://forum.cow.fi/t/grant-application-cow-protocol-upgrade-to-ethers-v6/2778/4 "2025-01-23T16:15:35Z")

</div>

Thanks for the proposal @No-rush.

I´d like to understand more the complexity of the project, as far as I can tell, there´s a very manageable number of uses of the `ethers` library. 64 in CoW Swap and 22 in the SDK. These uses are uilising over and over the same types and functions, furthermore, from the 64 in CoW Swap, 47 are auto-generated code that could go away. So I would think there are only a handful of functions to migrate.

Therefore, the migration 5 to 6 shouldn’t be that hard in my opinion. There’s also guides and even IA can assist in giving the conversion from one to the other, so it looks at first sight that milestones 1-4 would not require so many weeks.

I’m particularly interested in Milestone 5, especially for the SDK, I would like to see that one earlier.

Lastly, I’m not sure we should leave CoW Swap with ethers-6 after these changes, once this is abstracted and we can use any library I would be inclined to use `viem` in CoW Swap.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/cow/original/2X/1/13dc5d98e9283dd793d902f0d7ba36e35763fa00.jpeg)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/cow/original/2X/0/064d775e8196405247bb4a3ef763243757d0b8ee.jpeg)

---

<div class="post-metadata">

**Author:** ![No-rush](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.cow.fi/no-rush/32/1290_2.png) [@No-rush](https://forum.cow.fi/u/No-rush)\
**Post date:** [January 23, 2025, 4:58pm UTC](https://forum.cow.fi/t/grant-application-cow-protocol-upgrade-to-ethers-v6/2778/5 "2025-01-23T16:58:26Z")

</div>

Hi @anxolin,

You are correct, I have updated the timeline accordingly. Additionally, I have added one week to the milestone 3.

For milestone 3, View will also be the part of the abstraction layer. It skipped my mind. To be clear, both Ether.js and View will be the part of abstraction layer.

Edit: Updated milestone.

---

<div class="post-metadata">

**Author:** ![c3rnst](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.cow.fi/c3rnst/32/219_2.png) [@c3rnst](https://forum.cow.fi/u/c3rnst)\
**Post date:** [January 29, 2025, 3:11pm UTC](https://forum.cow.fi/t/grant-application-cow-protocol-upgrade-to-ethers-v6/2778/6 "2025-01-29T15:11:08Z")

</div>

hey - just wanted to let you know that the team is a bit busy and might also need some more time to review. There is also at least one additional team we know of that will apply.  
I kindly ask to be a bit patient: likely this will be another week pending.  
Thanks so much!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.cow.fi/system/32/1733_2.png) [@system](https://forum.cow.fi/u/system)\
**Post date:** [November 24, 2025, 1:46pm UTC](https://forum.cow.fi/t/grant-application-cow-protocol-upgrade-to-ethers-v6/2778/7 "2025-11-24T13:46:13Z")

</div>


