Lin-Manuel Miranda smelled what the Rock was cooking — and wrote it into the music for Disney's "Moana"!

The "Hamilton" creator is writing songs for the upcoming animated movie, which stars Dwayne Johnson as a tattooed demigod who teams up with a young girl on a magical quest. Miranda revealed to Entertainment Weekly that he got inspiration from Johnson's days in pro wrestling.

"He really sings, and he sings really well. The only thing I had to prep me, because I wrote his big tune, was there was a while in the WWE when he was a bad guy, and he'd go into town and he'd pull out a guitar and he'd sing about how much he hated the town he was in just to get everyone to boo," he said.

"So I watched this supercut on YouTube of him being like, [sings, mimics strumming a guitar] 'Can't wait to get out of Chicago, it's the worst' and they're all going 'Boo!' So I was like, 'Okay, that's his vocal range,' and I wrote within that."

But MIranda didn't necessarily write songs for "The Rock" — Johnson himself was inspiring to the Tony winner.

"He's got such a presence and personality that I really wrote to that, and it's a lot of fun to write to."

"Moana" opens in theaters November 23.

Want more stuff like this? Like us on Facebook.