Skip to content

Commit

Permalink
[evm] support opBasefee (#3643)
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinxie committed Sep 22, 2022
1 parent c53ad41 commit a784616
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion action/protocol/execution/evm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,11 @@ func newParams(
Transfer: MakeTransfer,
GetHash: getHashFn,
Coinbase: common.BytesToAddress(blkCtx.Producer.Bytes()),
GasLimit: gasLimit,
BlockNumber: new(big.Int).SetUint64(blkCtx.BlockHeight),
Time: new(big.Int).SetInt64(blkCtx.BlockTimeStamp.Unix()),
Difficulty: new(big.Int).SetUint64(uint64(50)),
GasLimit: gasLimit,
BaseFee: new(big.Int),
}

return &Params{
Expand Down
3 changes: 3 additions & 0 deletions action/protocol/execution/evm/evm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ func TestConstantinople(t *testing.T) {
require.Equal(isOkhotsk, evmChainConfig.IsLondon(evm.Context.BlockNumber))
require.Equal(isOkhotsk, chainRules.IsLondon)
require.False(chainRules.IsMerge)

// test basefee
require.Equal(new(big.Int), evm.Context.BaseFee)
}
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,6 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/iotexproject/go-ethereum v1.7.4-0.20220812094342-dcc10c72d176
replace github.com/ethereum/go-ethereum => github.com/iotexproject/go-ethereum v0.4.1

replace golang.org/x/xerrors => golang.org/x/xerrors v0.0.0-20190212162355-a5947ffaace3
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y
github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE=
github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0=
github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po=
github.com/iotexproject/go-ethereum v1.7.4-0.20220812094342-dcc10c72d176 h1:2OnyJDqqfOjB2lXjIKEgr5aekQ5e4/cEvBl5jB2eXhw=
github.com/iotexproject/go-ethereum v1.7.4-0.20220812094342-dcc10c72d176/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0=
github.com/iotexproject/go-ethereum v0.4.1 h1:8IdCOiMsuJQJl39ipBha0P+NMA60sqxAeYNiQVeshT4=
github.com/iotexproject/go-ethereum v0.4.1/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0=
github.com/iotexproject/go-fsm v1.0.0 h1:Zrg9JnNDUZg4Anpj6oa0Tk4+sXbHTpJzI0v5/Cj5N6A=
github.com/iotexproject/go-fsm v1.0.0/go.mod h1:t3aYXtCCcQxyS7oduQZyuUpPnVI4ddFTwbAagHN7fT0=
github.com/iotexproject/go-p2p v0.3.5 h1:F71XxYQtR25youD+dCXnMgtfiCKGUFh8KDIqU7u5xOk=
Expand Down

0 comments on commit a784616

Please sign in to comment.