Sync from fork #74

Merged
0xmuralik merged 232 commits from murali/update-fork into main 2023-01-10 04:50:57 +00:00
3 changed files with 6 additions and 1 deletions
Showing only changes of commit 6cf2b9fdd3 - Show all commits

View File

@ -40,7 +40,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
### State Machine Breaking
* (evm) [tharsis#1124](https://github.com/evmos/ethermint/pull/1124) Reject non-replay-protected tx in ante handler to prevent replay attack
* (evm) [\#1128](https://github.com/tharsis/ethermint/pull/1128) Clear tx logs if tx failed in post processing hooks
* (evm) [tharsis#1124](https://github.com/tharsis/ethermint/pull/1124) Reject non-replay-protected tx in `AnteHandler` to prevent replay attack
### API Breaking

View File

@ -599,6 +599,7 @@ func (suite *EvmTestSuite) TestERC20TransferReverted() {
suite.Require().True(res.Failed())
suite.Require().Equal(tc.expErr, res.VmError)
suite.Require().Empty(res.Logs)
after := k.GetBalance(suite.ctx, suite.from)

View File

@ -268,6 +268,9 @@ func (k *Keeper) ApplyTransaction(ctx sdk.Context, tx *ethtypes.Transaction) (*t
// If hooks return error, revert the whole tx.
res.VmError = types.ErrPostTxProcessing.Error()
k.Logger(ctx).Error("tx post processing failed", "error", err)
// If the tx failed in post processing hooks, we should clear the logs
res.Logs = nil
} else if commit != nil {
// PostTxProcessing is successful, commit the tmpCtx
commit()