core: turn gas into a vector <regularGas, stateGas>

This commit is contained in:
Marius van der Wijden 2026-04-09 09:48:52 +02:00
parent eb124a4fec
commit aa0489ae87

17
core/vm/gascosts.go Normal file
View file

@ -0,0 +1,17 @@
package vm
import "fmt"
type GasCosts struct {
RegularGas uint64
StateGas uint64
}
// Sum returns the total gas (regular + state).
func (g GasCosts) Sum() uint64 {
return g.RegularGas + g.StateGas
}
func (g GasCosts) String() string {
return fmt.Sprintf("<%v,%v>", g.RegularGas, g.StateGas)
}