@@ -331,7 +331,7 @@ func ExecuteContract(
331
331
revertMsg := string (data [64 : 64 + msgLength ])
332
332
receipt .SetExecutionRevertMsg (revertMsg )
333
333
}
334
- log .S ().Debugf ("Receipt: %+v, %v" , receipt , err )
334
+ log .S ().Debugf ("Retval: %x, Receipt: %+v, %v" , retval , receipt , err )
335
335
return retval , receipt , nil
336
336
}
337
337
@@ -516,13 +516,19 @@ func executeInEVM(ctx context.Context, evmParams *Params, stateDB stateDB) ([]by
516
516
if evmParams .contract == nil {
517
517
// create contract
518
518
var evmContractAddress common.Address
519
- _ , evmContractAddress , remainingGas , evmErr = evm .Create (executor , evmParams .data , remainingGas , amount )
519
+ var createRet []byte
520
+ createRet , evmContractAddress , remainingGas , evmErr = evm .Create (executor , evmParams .data , remainingGas , amount )
520
521
log .T (ctx ).Debug ("evm Create." , log .Hex ("addrHash" , evmContractAddress [:]))
521
522
if evmErr == nil {
522
523
if contractAddress , err := address .FromBytes (evmContractAddress .Bytes ()); err == nil {
523
524
contractRawAddress = contractAddress .String ()
524
525
}
525
526
}
527
+ // ret updates may need hard fork
528
+ // so we change it only when readonly mode now
529
+ if evmParams .actionCtx .ReadOnly {
530
+ ret = createRet
531
+ }
526
532
} else {
527
533
stateDB .SetNonce (evmParams .txCtx .Origin , stateDB .GetNonce (evmParams .txCtx .Origin )+ 1 )
528
534
// process contract
0 commit comments