make eth_getCode return nil if the target is not an EVM smart contract.
This commit is contained in:
parent
6d5ec6aff8
commit
323ff1b55e
@ -258,7 +258,9 @@ func (a *EthModule) EthGetCode(ctx context.Context, ethAddr api.EthAddress, blkO
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
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 {
|
if res.MsgRct == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user