Both core and starknet resource bounds are modeled as map[Resource]ResourceBounds. Since these keys are effectively fixed, a struct with explicit L1Gas/L2Gas/L1DataGas fields would be clearer and avoid map allocations. The caveat (and the reason this needs care, not a blind swap): the resource set is not constant across versions — historically v3 transactions carried only two resources (L1Gas, L2Gas) before L1DataGas was added — and core.ResourceBounds is a persisted core type written to the DB when storing transactions, so any change must preserve backward compatibility with already-stored data (encoding/migration considerations).
Both
coreandstarknetresource bounds are modeled asmap[Resource]ResourceBounds. Since these keys are effectively fixed, astructwith explicitL1Gas/L2Gas/L1DataGasfields would be clearer and avoid map allocations. The caveat (and the reason this needs care, not a blind swap): the resource set is not constant across versions — historically v3 transactions carried only two resources (L1Gas, L2Gas) before L1DataGas was added — andcore.ResourceBoundsis a persisted core type written to the DB when storing transactions, so any change must preserve backward compatibility with already-stored data (encoding/migration considerations).