make eth_getCode return nil if the target is not an EVM smart contract.

This commit is contained in:
Raúl Kripalani
2022-11-09 19:46:24 +02:00
committed by vyzo
parent 6d5ec6aff8
commit 323ff1b55e
+3 -1
View File
@@ -258,7 +258,9 @@ func (a *EthModule) EthGetCode(ctx context.Context, ethAddr api.EthAddress, blkO
}
if err != nil {
return nil, xerrors.Errorf("Call failed: %w", err)
// if the call resulted in error, this is not an EVM smart contract;
// return no bytecode.
return nil, nil
}
if res.MsgRct == nil {