Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into begin-block-base-fee
Browse files Browse the repository at this point in the history
  • Loading branch information
fedekunze authored Dec 15, 2021
2 parents eb6f510 + 5d237a5 commit b813245
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 30 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/clean-artifacts.yml

This file was deleted.

3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ Ref: https://keepachangelog.com/en/1.0.0/

### State Machine Breaking

- (feemarket) [tharsis#822](https://github.com/tharsis/ethermint/pull/822) Update base fee in begin blocker
- (evm) [tharsis#840](https://github.com/tharsis/ethermint/pull/840) Store empty topics as empty array rather than nil.
- (feemarket) [tharsis#822](https://github.com/tharsis/ethermint/pull/822) Update EIP1559 base fee in `BeginBlock`.

### Improvements

Expand Down
4 changes: 4 additions & 0 deletions x/evm/keeper/statedb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ func (suite *KeeperTestSuite) TestAddLog() {
&ethtypes.Log{
Address: addr,
TxHash: txHash,
Topics: make([]common.Hash, 0),
},
func() {},
},
Expand All @@ -606,6 +607,7 @@ func (suite *KeeperTestSuite) TestAddLog() {
TxHash: txHash2,
TxIndex: 1,
Index: 1,
Topics: make([]common.Hash, 0),
},
func() {
suite.app.EvmKeeper.SetTxHashTransient(txHash)
Expand All @@ -624,6 +626,7 @@ func (suite *KeeperTestSuite) TestAddLog() {
&ethtypes.Log{
Address: addr,
TxHash: txHash3,
Topics: make([]common.Hash, 0),
},
func() {},
},
Expand All @@ -638,6 +641,7 @@ func (suite *KeeperTestSuite) TestAddLog() {
TxHash: txHash4,
TxIndex: 1,
Index: 1,
Topics: make([]common.Hash, 0),
},
func() {
suite.app.EvmKeeper.SetTxHashTransient(txHash)
Expand Down
12 changes: 6 additions & 6 deletions x/evm/types/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ func (log *Log) Validate() error {

// ToEthereum returns the Ethereum type Log from a Ethermint proto compatible Log.
func (log *Log) ToEthereum() *ethtypes.Log {
var topics []common.Hash // nolint: prealloc
for i := range log.Topics {
topics = append(topics, common.HexToHash(log.Topics[i]))
topics := make([]common.Hash, len(log.Topics))
for i, topic := range log.Topics {
topics[i] = common.HexToHash(topic)
}

return &ethtypes.Log{
Expand Down Expand Up @@ -108,9 +108,9 @@ func LogsToEthereum(logs []*Log) []*ethtypes.Log {

// NewLogFromEth creates a new Log instance from a Ethereum type Log.
func NewLogFromEth(log *ethtypes.Log) *Log {
var topics []string // nolint: prealloc
for _, topic := range log.Topics {
topics = append(topics, topic.String())
topics := make([]string, len(log.Topics))
for i, topic := range log.Topics {
topics[i] = topic.String()
}

return &Log{
Expand Down
4 changes: 0 additions & 4 deletions x/evm/types/tx_args.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ func (args *TransactionArgs) ToTransaction() *MsgEthereumTx {
maxPriorityFeePerGas = sdk.NewIntFromBigInt(args.MaxPriorityFeePerGas.ToInt())
}

if args.GasPrice != nil {
gasPrice = sdk.NewIntFromBigInt(args.GasPrice.ToInt())
}

if args.Value != nil {
value = sdk.NewIntFromBigInt(args.Value.ToInt())
}
Expand Down

0 comments on commit b813245

Please sign in to comment.