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

cowprotocol / contracts / 8703519851
97%

Build:
DEFAULT BRANCH: main
Ran 16 Apr 2024 09:51AM UTC
Jobs 1
Files 22
Run time 1min
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

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

Jobs
ID Job ID Ran Files Coverage
1 8703519851.1 16 Apr 2024 09:51AM UTC 0
97.4
GitHub Action Run
Source Files on build 8703519851
Detailed source file information is not available for this build.
  • Back to Repo
  • 45a0792c on github
  • Prev Build on main (#8702691843)
  • Next Build on main (#8895014647)
  • 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