Ran
|
Files
22
|
Run time
1s
|
Badge
Embed ▾
README BADGES
|
push
github
Optional explicit token list for self-sell script (#76) Optionally specify the tokens to be sold in the command parameters. This fixes (at least in part) issue #74. ### Test Plan Try out the script on xdai and mainnet, with and without tokens. <details><summary>example output</summary> ``` npx hardhat self-sell --network xdai --origin 0xA03be496e67Ec29bC62F01a428683D7F9c204930 --receiver 0x6b3214fD11dc91De14718DeE98Ef59bCbFcfB432 --to-token 0x6A023CCd1ff6F2045C330976 8eAd9E68F978f6e1 --min-value 100 --safe --leftover 10 --fee-slippage-bps 10000 --price-slippage-bps 500 --max-fee-percent 10 --validity 7200 --api-url "https://barn.api.cow.fi/xdai" '0x177127622c4a00f3d409b7 5571e12cb3c8973d3c' Using account 0xA03be496e67Ec29bC62F01a428683D7F9c204930 Warning: unable to recover token list from 1inchle tokens)... Amounts to sell: address | value (USD) | balance | sold amount | symbol | buy amount (WETH) | fee % | needs allowance? --------------------------------------------+-------------+------------------+------------------+--------+-------------------+-------+------------------ 0x177127622 | 23507.20 | 64922.6327714416 | 64895.0145838472 | COW | 5.9350339919 | <0.01 | yes The settlement transaction will cost approximately 0.000310219 XDAI and will create 1 orders for an estimated total value of 23497.20 USD. The proceeds of the orders will be sent to 0x6b3214fD11dc91De14718DeE98Ef59bCbFcfB432. Submit orders to API? (y/N) y Posting order selling COW... Successfully created order with uid 0xa6b22fcdad3162ea73d0d60971565aa8510560ab4165e9f600 Sign settlement transaction in the Safe UI: https://app.safe.global/transactions/tx?id=multisig_0xA03be496e67Ec29bC62F01a428683D7F9c204930_0xa9995bdfd679f7b4c37eac274859c2772&safe=0xA03be496e... (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
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|