Oscar Piastri has locked in his Formula One future with the McLaren team, securing a new multi-year deal ahead of his home grand prix on Sunday.