Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Gem output fixups #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Gem output fixups #34

wants to merge 2 commits into from

Conversation

jar-o
Copy link

@jar-o jar-o commented Sep 16, 2021

Hi, my platform is

ProductName:	Mac OS X
ProductVersion:	10.15.6
BuildVersion:	19G2021

When playing around with mcd to learn about the Maker system I noticed the following odd looking output:

./bin/mcd --chain mainnet --ilk=ETH-A --urn=0xF949272B728F32Ea6CB5543Fe0DCcE8aBF6fEe4B gem balance

vat 0.000000000000000000 Unlocked collateral (WETH
UNI-V2
UNI-V2
UNI-V2
UNI-V2
UNI-V2
UNI-V2)
ink 0.000000000000000000 Locked collateral (WETH
UNI-V2
UNI-V2
UNI-V2
UNI-V2
UNI-V2
UNI-V2)
hevm: could not parse abi argument:  : address
CallStack (from HasCallStack):
  error, called at src/EVM/ABI.hs:485:8 in hevm-0.48.0-JFbaB4z3V2D4yuHF1ql3y4:EVM.ABI
ext  External account balance (WETH
UNI-V2
UNI-V2
UNI-V2
UNI-V2
UNI-V2
UNI-V2)

I added a start-of-line anchor to sed to eliminate the multiline matching of GEMs (first commit), but then that left the issue of "bad argument address" when ETH_FROM is not set. I added a guard as a second commit to eliminate the Callstack dump, so now if ETH_FROM is unset you get

./bin/mcd --chain mainnet --ilk=ETH-A --urn=0xF949272B728F32Ea6CB5543Fe0DCcE8aBF6fEe4B gem balance
vat 0.000000000000000000 Unlocked collateral (WETH)
ink 0.000000000000000000 Locked collateral (WETH)

and when it's set you'll get the following output:

ETH_FROM=0x0000000000000000000000000000000000000000 ./bin/mcd --chain mainnet --ilk=ETH-A --urn=0xF949272B728F32Ea6CB5543Fe0DCcE8aBF6fEe4B gem balance
vat 0.000000000000000000 Unlocked collateral (WETH)
ink 0.000000000000000000 Locked collateral (WETH)
ext 1.131487362908677203 External account balance (WETH)
eth 11269.408812248300628127 External account balance (ETH)

Happy to revise if there are any issues or I've overlooked something.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant