Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [\#811](https://github.com/cosmos/evm/pull/811) Use sdk's DefaultBondDenom for default evm denom in genesis.
- [\#823](https://github.com/cosmos/evm/pull/823) Remove authz dependency from test suite and EvmApp interface
- [\#829](https://github.com/cosmos/evm/pull/829) Seperate test app interface
- [\#833]() Use normal gas config in ibc transfer to prevent potential DoS attack

Check failure on line 14 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / markdownlint (cli2, minimal)

No empty links

CHANGELOG.md:14 MD042/no-empty-links No empty links [Context: "[#833]"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md042.md

### FEATURES

Expand Down
17 changes: 0 additions & 17 deletions x/ibc/transfer/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
erc20types "github.com/cosmos/evm/x/erc20/types"
"github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"

storetypes "cosmossdk.io/store/types"

"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand All @@ -27,21 +25,6 @@ var _ types.MsgServer = Keeper{}
func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types.MsgTransferResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// Temporarily save the KV and transient KV gas config. To avoid extra costs for relayers
// these two gas config are replaced with empty one and should be restored before exiting this function.
kvGasCfg := ctx.KVGasConfig()
transientKVGasCfg := ctx.TransientKVGasConfig()
ctx = ctx.
WithKVGasConfig(storetypes.GasConfig{}).
WithTransientKVGasConfig(storetypes.GasConfig{})

defer func() {
// Return the KV gas config to initial values
ctx = ctx.
WithKVGasConfig(kvGasCfg).
WithTransientKVGasConfig(transientKVGasCfg)
}()

// use native denom or contract address
denom := strings.TrimPrefix(msg.Token.Denom, erc20types.Erc20NativeCoinDenomPrefix)

Expand Down
Loading