Elevator

Reach the top floor of the building by exploiting the interface.

Vulnerable Code
Analyze the Solidity code below to find the vulnerability.
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface Building { function isLastFloor(uint) external returns (bool); } contract Elevator { bool public top; uint public floor; function goTo(uint _floor) public { Building building = Building(msg.sender); // Treats caller as the Building if (! building.isLastFloor(_floor)) { floor = _floor; top = building.isLastFloor(floor); } } }
Submit Explanation
Explain the vulnerability and how to exploit it.
Hints (3)
Just a little peak
Hint 1
Hint 2
Hint 3
Explanation
Discomfort = Learning