The stunning eight-year contract Edmonton Oilers general manager Peter Chiarelli lavished yesterday on 21-year-old center Leon Draisaitl — paying $8.5 million dollars per season — hardly was overlooked by Bruins restricted free agent winger David Pastrnak.

Indeed, Pastrnak has been waiting to see how sweet a deal Draisaitl would get — and no doubt it sounded mighty nice to Pastrnak. He’s hoping to land a comparable deal.

Which explains why the B’s have hit a snag in re-signing their young star.

The team hoped to have a new contract for the supremely talented 21-year-old by now, and thought it had made an offer that would get the job done: Six years at $6 million per season.

In the NHL, it’s all about “comparables” in the restricted free agent market. The comparable NHL pact on which the B’s based their offer is that of Nashville Predators star Filip Forsberg, who is entering the second season of a five-year deal paying $6 million per season.

It’s important to note Forsberg’s signing last summer was in the wake of two strong seasons: 26 goals, 37 assists in 2014-15 and 33 goals and 31 assists in ’15-16.

Pastrnak had a breakout campaign last season, when he was second on the B’s with 34 goals and 36 assists.

He has shown glimpses of excellence in his first three NHL seasons but is arguing his salary case based on one.

Forsberg seems like a more deserving player for that contract than Pastrnak, though the B’s apparently are willing to match it.

And it’s a different kind of comparable, but who can blame the B’s brass if it is reluctant to pay Pastrnak more than Brad Marchand, who this season begins an eight-year deal with an average cap hit of $6.125 million?

This is Marchand’s fourth contract, after eight seasons in the league and an overall body of work that far exceeds Pastrnak’s. How would the All-Star winger feel if before he even cashes his first paycheck on this deal, he’s passed on the salary scale by a kid with one good season?

Neither can you blame Pastrnak for aiming high. It’s believed he’s been waiting for the Draisaitl price tag — which seems outrageously high.

While the B’s are understandably sensitive about how they treat young stars, would it really make sense for them to re-write their salary structure? Don’t forget, they’re only required under the CBA to offer Pastrnak 105 percent of last year’s contract — which would be about $1.2 million.

The days when GMs like Harry Sinden used their CBA leverage in that frugal manner — leading almost annually to training camp no-shows by key restricted free agents — are long gone. Now teams want happy players, and they believe locking up young stars to long-term deals will prove economical.

These second contracts are a major problem for the NHL — although, of course, the players love them.

It’s a new reality that GMs are willing to be generous and pay far more in post-entry level pacts than they have to.

The trend has gone too far, contributing to the salary cap woes teams have experienced in recent years. The B’s went through it three years ago when they were forced to jettison key defenseman Johnny Boychuk.

Indeed, the message of the first decade of the salary cap era is that NHL front offices have to save money on their payroll wherever they can. Even cutting $100,000-$200,000 off several multi-year contracts might give a team the cap room to hang on to a useful player.

So Chiarelli, who lost his job in Boston largely because of cap problems, could rue the day he gave Draisaitl this megadeal.

The big German center had a very big season, with 28 goals and 48 assists, plus six goals and 10 assists in 13 playoff games. But his two previous NHL seasons were nothing special, with a total of 21 goals and 39 assists 104 games.

Young players used to have to prove how good they were for several years to jump to the top of the payroll. Now they get paid based just on what teams hope they’re going to be.

Critics shouldn’t jump on B’s general manager Don Sweeney for trying, just a little bit, to pay a fair wage and not wildly overpay.