makerdao / mcd-cli

MCD Command-line interface
GNU Affero General Public License v3.0
18 stars 8 forks source link

0x is being appended twice to WETH contract #14

Closed guifel closed 4 years ago

guifel commented 4 years ago

0x is being appended twice.

$ ETH_RPC_URL=<RPC> ETH_FROM=<ADDR> mcd gem --ilk=ETH-A balance
Warning: `--chain' option not specified. Defaulting to kovan
vat 0.000000000000000000 Unlocked collateral (WETH)
seth---to-hexdata: error: invalid hexdata: `0x0xd0A1E359811322d97991E03f863a0C30C2cF029C'
ink 0.000000000000000000 Locked collateral (WETH)
brianmcmichael commented 4 years ago

Which version mcd --version of this are you running? I can't seem to replicate.

bmcmichael@bmcx1c:~/makerdao/mcd-cli$ mcd gem --ilk=ETH-A balance
Warning: `--chain' option not specified. Defaulting to kovan
vat 1.500000000000000000 Unlocked collateral (WETH)
ink 0.000000000000000000 Locked collateral (WETH)
ext 0.000000000000000000 External account balance (WETH)
eth 45270.910628588207210496 External account balance (ETH)
guifel commented 4 years ago

mcd 1.0.1-rc.1 I followed the install instructions from the README.

gbalabasquer commented 4 years ago

Problem is seth version. mcd-cli was not updated for latest seth versions, meaning that the 0x is appended twice in some places. This is pending to be done, in general mcd-cli is a bit outdated at this moment.

brianmcmichael commented 4 years ago

I was able to repeat this and added a fix in https://github.com/makerdao/mcd-cli/pull/15

guifel commented 4 years ago

Great, appreciate the quick fix.