guarantee round-trip

This commit is contained in:
Steven Allen 2023-01-13 20:14:22 -08:00
parent 3421e6a127
commit 1045dce1ea

View File

@ -111,6 +111,10 @@ func EthTxArgsFromMessage(msg *types.Message) (EthTxArgs, error) {
if paramsReader.Len() != 0 {
return EthTxArgs{}, xerrors.Errorf("extra data found in params")
}
if len(params) == 0 {
// Otherwise, we don't get a guaranteed round-trip.
return EthTxArgs{}, xerrors.Errorf("cannot invoke contracts with empty parameters from an eth-account")
}
}
}