In Solidity, I want users to provide the Solidity type of a response upfront, and when the response arrives, I want to decode it based on the type that the user provided - basically dynamic decoding of sorts.
You can imagine something like:
abi.decode(responseData, (userProvidedType));
Is there an elegant way of doing this?