• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cowprotocol / contracts / 8703519851 / 1
97%
main: 97%

Build:
DEFAULT BRANCH: main
Ran 16 Apr 2024 09:51AM UTC
Files 22
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Apr 2024 09:48AM UTC coverage: 97.398%. Remained the same
8703519851.1

push

github

web-flow
Get token list for self-sell task on Gnosis Chain (#82)

This fixes (at least on Gnosis Chain) issue #74.

Adds support for fetching the token lists on Gnosis Chain/xdai. Api
source is blockscout, see docs
[here](https://gnosis.blockscout.com/api-docs#operations-default-get_address_token_balances).

### Test Plan

Try the script on xdai. Note the updated parameters.

```
npx hardhat self-sell --network xdai --origin 0xA03be496e67Ec29bC62F01a428683D7F9c204930 --receiver 0xA03be496e67Ec29bC62F01a428683D7F9c204930 --to-token 0x<a class=hub.com/cowprotocol/contracts/commit/e91d153e0b41518a2ce8dd3d7944fa863463a97d">e91d153e0 --min-value 500 --leftover 100 --fee-slippage-bps 10000 --price-slippage-bps 500 --max-fee-percent 10 --validity 7200 --api-url "https://api.cow.fi/xdai"
```

<details><summary>Output</summary>

```
$ npx hardhat self-sell --network xdai --origin 0xA03be496e67Ec29bC62F01a428683D7F9c204930 --receiver 0xA03be496e67Ec29bC62F01a428683D7F9c204930 --to-token 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d --min-value 10 --leftover 5 --fee-slippage-bps 10000 --price-slippage-bps 500 --max-fee-percent 10 --validity 7200 --api-url "https://api.cow.fi/xdai"
Using account 0xA03be496e67Ec29bC62F01a428683D7F9c204930
Warning: price retrieval failed for token MPS (0xfa57AA7beED63D03Aaf85fFd1753f5f6242588fb): UnsupportedToken (Token 0xfa57aa7be is unsupported: Could not find on chain source of the token with at least 100000 balance.)
Ignored 3 units of MPS (0xfa57AA7beED63D03Aaf85fFd1753f5f6242588fb) with value 0.00 USD, does not satisfy conditions on min value and leftover
Ignored 3.428515320952721743 units of OLAS (0xcE11e14225575945b8E6Dc0D4F2dD4C570f79d9f) with value 13.23 USD, does not satisfy conditions on min value and leftover
Amounts to sell:
 address                                    | value (USD) | balance         | sold amount     | symbol | buy amount (WXDAI) | fee % | needs allowance? 
--------------------------------------------+-------------... (continued)

160 of 172 branches covered (93.02%)

Branch coverage included in aggregate %.

364 of 366 relevant lines covered (99.45%)

37.8 hits per line

Source Files on job 8703519851.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 8703519851
  • 45a0792c on github
  • Prev Job for on main (#8702691843.1)
  • Next Job for on main (#8895014647.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc