forked from cerc-io/plugeth
core: implement BLOBBASEFEE opcode (0x4a) (#28098)
Implements "EIP-7516: BLOBBASEFEE opcode" for cancun, as per spec: https://eips.ethereum.org/EIPS/eip-7516
This commit is contained in:
@@ -37,6 +37,7 @@ func NewEnv(cfg *Config) *vm.EVM {
|
||||
Difficulty: cfg.Difficulty,
|
||||
GasLimit: cfg.GasLimit,
|
||||
BaseFee: cfg.BaseFee,
|
||||
BlobBaseFee: cfg.BlobBaseFee,
|
||||
Random: cfg.Random,
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ type Config struct {
|
||||
Debug bool
|
||||
EVMConfig vm.Config
|
||||
BaseFee *big.Int
|
||||
BlobBaseFee *big.Int
|
||||
BlobHashes []common.Hash
|
||||
Random *common.Hash
|
||||
|
||||
@@ -95,6 +96,9 @@ func setDefaults(cfg *Config) {
|
||||
if cfg.BaseFee == nil {
|
||||
cfg.BaseFee = big.NewInt(params.InitialBaseFee)
|
||||
}
|
||||
if cfg.BlobBaseFee == nil {
|
||||
cfg.BlobBaseFee = new(big.Int)
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the code using the input as call data during the execution.
|
||||
|
||||
Reference in New Issue
Block a user