I was scrolling around Ethereum StackExchange and I came across with an interesting thought that I have never read or seen anyone talk about. I'm perfectly aware of how contracts work and are compiled, generating the ABI and Bytecode. I was thinking, is there a way to store the ABI struct and Bytecode (the outputs of the compilation) as variables inside the smart contract itself?
I drew a scheme in a paper, and it seems that I end up on a paradigm of "who comes first, the chicken or the egg?". Because to get the ABI and Bytecode, I need the compilation to occur... and for the compilation to occur, I would need the ABI and bytecode stored in variables previously. So My conclusion is that this ain't possible to do. I searched a bit and couldn't find anything about this. Did anyone ever ask this? Any idea if this is actually achievable?