Skip to content

Commit

Permalink
basefee, blobbasefee now uses BytesValueToBigInt
Browse files Browse the repository at this point in the history
  • Loading branch information
rpl-ffl committed Sep 19, 2024
1 parent 8891cdb commit 8850e6c
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions protobuf/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,26 +120,16 @@ func (env *Substate_BlockEnv) decode() (*substate.Env, error) {
}
}

var baseFee *big.Int = nil
if env.GetBaseFee() != nil {
baseFee = types.BytesToBigInt(env.GetBaseFee().GetValue())
}

var blobBaseFee *big.Int = nil
if env.GetBlobBaseFee() != nil {
blobBaseFee = types.BytesToBigInt(env.GetBlobBaseFee().GetValue())
}

return &substate.Env{
Coinbase: types.BytesToAddress(env.GetCoinbase()),
Difficulty: types.BytesToBigInt(env.GetDifficulty()),
GasLimit: env.GetGasLimit(),
Number: env.GetNumber(),
Timestamp: env.GetTimestamp(),
BlockHashes: blockHashes,
BaseFee: baseFee,
BaseFee: BytesValueToBigInt(env.GetBaseFee()),
Random: BytesValueToHash(env.GetRandom()),
BlobBaseFee: blobBaseFee,
BlobBaseFee: BytesValueToBigInt(env.GetBlobBaseFee()),
}, nil
}

Expand Down

0 comments on commit 8850e6c

Please sign in to comment.