Closed datgrog closed 4 years ago
Do you have the address to check balance in the $ETH_FROM
variable?
here is my .sethrc
# Use Infura's node for all RPC calls
export SETH_CHAIN=kovan
# Set an address as the default sender
export ETH_FROM=0x5aBd8f42dA79fe93f2B0DB6cB0167fd0e932c788
# Look for my key files in a custom directory
export ETH_KEYSTORE=/Users/onche/Projects/MakerDAO
export ETH_PASSWORD=/Users/onche/Projects/MakerDAO/pwd_kovan_mcd
export MCD_CHAIN=kovan
So in my context the env var $ETH_FROM is only set in this file, not in my shell session. Given that seth cmd works for seth send $FAUCET 'gulp(address)' $REP
as it successfully craft and sign a transaction by reading both ETH_KEYSTORE
, ETH_PASSWORD
, I don't see why the ETH_FROM
is not handle properly as well
Just to clarify, doing explicitly export ETH_FROM=0x5aBd8f42dA79fe93f2B0DB6cB0167fd0e932c788
before seth --from-wei $(seth --to-dec $(seth call $REP 'balanceOf(address)' $ETH_FROM)) eth
works but the command seth call
itself looks like it does not grasp $ETHFROM from .sethrc_ as seth send
did.
Actually it does, look at the tx details:
seth-rpc: {"id":1,"jsonrpc":"2.0","method":"eth_call","params":[{"data":"0xInvalid data","from":"0x5aBd8f42dA79fe93f2B0DB6cB0167fd0e932c788","to":"0xC7aa227823789E363f29679F23f7e8F6d9904a9B"},"latest"]}
seth-rpc: error: code -32602
seth-rpc: error: message Invalid params: Invalid hex: Invalid character 'I' at position 0.
The from
is filled in with the correct address. The problem is in the data
field because your shell doesn't have a variable "$ETH_FROM" exported (which could be called anything) breaking the whole calldata value.
Sorry for the silly mistake, thanks!
No problem!
Hello!
Sorry to disturb you as it might be nothing.. I'm following this guide MakerDAO create Kovan DAI and
seth call
give an unexpected result.calling
seth call $REP 'balanceOf(address)' $ETH_FROM
givesbut
seth send $FAUCET 'gulp(address)' $REP
works as it should. Did I miss something ? The call I'm trying to fire thought isseth --from-wei $(seth --to-dec $(seth call $REP 'balanceOf(address)' $ETH_FROM)) eth