@@ -91,7 +91,8 @@ type ExecutionResult struct {
9191 ReturnData []byte // Returned data from evm(function result or data supplied with revert opcode)
9292
9393 // Arbitrum: a tx may yield others that need to run afterward (see retryables)
94- ScheduledTxes types.Transactions
94+ ScheduledTxes types.Transactions
95+ TopLevelDeployed * common.Address
9596}
9697
9798// Unwrap returns the internal evm error which allows us for further
@@ -360,12 +361,14 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
360361 if rules .IsBerlin {
361362 st .state .PrepareAccessList (msg .From (), msg .To (), vm .ActivePrecompiles (rules ), msg .AccessList ())
362363 }
364+ var deployedContract * common.Address
363365 var (
364366 ret []byte
365367 vmerr error // vm errors do not effect consensus and are therefore not assigned to err
366368 )
367369 if contractCreation {
368- ret , _ , st .gas , vmerr = st .evm .Create (sender , st .data , st .gas , st .value )
370+ deployedContract = & common.Address {}
371+ ret , * deployedContract , st .gas , vmerr = st .evm .Create (sender , st .data , st .gas , st .value )
369372 } else {
370373 // Increment the nonce for the next transaction
371374 st .state .SetNonce (msg .From (), st .state .GetNonce (sender .Address ())+ 1 )
@@ -410,10 +413,11 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
410413 }
411414
412415 return & ExecutionResult {
413- UsedGas : st .gasUsed (),
414- Err : vmerr ,
415- ReturnData : ret ,
416- ScheduledTxes : st .evm .ProcessingHook .ScheduledTxes (),
416+ UsedGas : st .gasUsed (),
417+ Err : vmerr ,
418+ ReturnData : ret ,
419+ ScheduledTxes : st .evm .ProcessingHook .ScheduledTxes (),
420+ TopLevelDeployed : deployedContract ,
417421 }, nil
418422}
419423
0 commit comments