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

This commit is contained in:
Raúl Kripalani 2022-10-22 18:53:59 +01:00 committed by vyzo
parent 6d5ec6aff8
commit 323ff1b55e

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 {