|
|
@@ -972,7 +972,7 @@ type BatchCallArgs struct {
|
|
|
// CallResult is the result of one call.
|
|
|
type CallResult struct {
|
|
|
Return hexutil.Bytes
|
|
|
- Error error
|
|
|
+ Error string
|
|
|
}
|
|
|
|
|
|
// BlockChainAPI provides an API to access Ethereum blockchain data.
|
|
|
@@ -1031,14 +1031,14 @@ func (s *PublicBlockChainAPI) BatchCall(ctx context.Context, config BatchCallCon
|
|
|
result, err := doCall(ctx, s.b, call.CallArgs, state, header, timeout, gp, &blockContext)
|
|
|
if err != nil {
|
|
|
fmt.Fprintf(os.Stderr, "call execution reverted: %v\n\n", err)
|
|
|
- results = append(results, CallResult{Return: nil, Error: err})
|
|
|
+ results = append(results, CallResult{Return: nil, Error: err.Error()})
|
|
|
} else {
|
|
|
// If the result contains a revert reason, try to unpack it.
|
|
|
if len(result.Revert()) > 0 {
|
|
|
result.Err = newRevertError(result)
|
|
|
}
|
|
|
|
|
|
- results = append(results, CallResult{Return: result.Return(), Error: result.Err})
|
|
|
+ results = append(results, CallResult{Return: result.Return(), Error: result.Err.Error()})
|
|
|
}
|
|
|
}
|
|
|
return results, nil
|