Magic Number

Provide a contract that returns the magic number 42 from its `whatIsTheMeaningOfLife()` function using minimal runtime bytecode.

Vulnerable Code
Analyze the Solidity code below to find the vulnerability.
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ISolver { function whatIsTheMeaningOfLife() external view returns (uint256); } contract MagicNum { // Ethernaut main contract address public solver; // Address of the user's solver contract constructor() {} function setSolver(address _solver) public { solver = _solver; } // The user needs to provide a contract address for 'solver' // such that calling whatIsTheMeaningOfLife() on it returns 42. // Minimal bytecode is the challenge. }
Submit Explanation
Explain the vulnerability and how to exploit it.
Hints (7)
Just a little peak
Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Hint 6
Hint 7
Explanation
Discomfort = Learning