diff --git a/x/evm/txs/base/base.go b/x/evm/txs/base/base.go index d353242c6c..7df8147a43 100644 --- a/x/evm/txs/base/base.go +++ b/x/evm/txs/base/base.go @@ -52,6 +52,12 @@ func (tx *Tx) GetChainConfig() (types.ChainConfig, bool) { // Transition execute evm tx func (tx *Tx) Transition(config types.ChainConfig) (result Result, err error) { result.ExecResult, result.ResultData, err, result.InnerTxs, result.Erc20Contracts = tx.StateTransition.TransitionDb(tx.Ctx, config) + if result.InnerTxs != nil { + tx.Keeper.AddInnerTx(tx.StateTransition.TxHash.Hex(), result.InnerTxs) + } + if result.Erc20Contracts != nil { + tx.Keeper.AddContract(result.Erc20Contracts) + } // async mod goes immediately if tx.Ctx.IsAsync() { tx.Keeper.LogsManages.Set(string(tx.Ctx.TxBytes()), keeper.TxResult{ diff --git a/x/evm/txs/deliver/deliver.go b/x/evm/txs/deliver/deliver.go index 175e693c4b..20e8837b97 100644 --- a/x/evm/txs/deliver/deliver.go +++ b/x/evm/txs/deliver/deliver.go @@ -75,13 +75,6 @@ func (tx *Tx) RestoreWatcherTransactionReceipt(msg *types.MsgEthereumTx) { } func (tx *Tx) Commit(msg *types.MsgEthereumTx, result *base.Result) { - if result.InnerTxs != nil { - tx.Keeper.AddInnerTx(tx.StateTransition.TxHash.Hex(), result.InnerTxs) - } - if result.Erc20Contracts != nil { - tx.Keeper.AddContract(result.Erc20Contracts) - } - // update block bloom filter if !tx.Ctx.IsAsync() { tx.Keeper.Bloom.Or(tx.Keeper.Bloom, result.ExecResult.Bloom)