diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 0a3b31a3dc..0ce46989fd 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1241,7 +1241,7 @@ func (s *BlockChainAPI) SimulateV1(ctx context.Context, opts simOpts, blockNrOrH if state == nil || err != nil { return nil, err } - sim := &simulator{b: s.b, state: state, base: base, traceTransfers: opts.TraceTransfers, validate: opts.Validation} + sim := &simulator{b: s.b, state: state, base: base, traceTransfers: opts.TraceTransfers, validate: opts.Validation, fullTx: opts.ReturnFullTransactions} return sim.execute(ctx, opts.BlockStateCalls) } diff --git a/internal/ethapi/simulate.go b/internal/ethapi/simulate.go index c0811399ea..79178e8222 100644 --- a/internal/ethapi/simulate.go +++ b/internal/ethapi/simulate.go @@ -68,9 +68,10 @@ func (r *simCallResult) MarshalJSON() ([]byte, error) { } type simOpts struct { - BlockStateCalls []simBlock - TraceTransfers bool - Validation bool + BlockStateCalls []simBlock + TraceTransfers bool + Validation bool + ReturnFullTransactions bool } type simulator struct { @@ -80,6 +81,7 @@ type simulator struct { base *types.Header traceTransfers bool validate bool + fullTx bool } func (sim *simulator) execute(ctx context.Context, blocks []simBlock) ([]map[string]interface{}, error) { @@ -233,7 +235,7 @@ func (sim *simulator) processBlock(ctx context.Context, block *simBlock, header, withdrawals = make([]*types.Withdrawal, 0) } b := types.NewBlockWithWithdrawals(header, txes, nil, receipts, withdrawals, trie.NewStackTrie(nil)) - res := RPCMarshalBlock(b, true, false, config) + res := RPCMarshalBlock(b, true, sim.fullTx, config) repairLogs(callResults, res["hash"].(common.Hash)) res["calls"] = callResults