Ran
|
Jobs
1
|
Files
22
|
Run time
1min
|
Badge
README BADGES
|
push
github
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
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 8703519851.1 | 22 |
97.4 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|