make eth_getCode return nil if the target is not an EVM smart contract.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user