Given the inclusion ever-growing for smart contracts to be inter-connected, I wanted to come up with an idea to aid developers in building “smarter” multi-contract systems by being able to apply introspection to the entrypoint of a blockchain transaction.
Put briefly, I have introduced a new EVM instruction that permit introspection to be applied to the original transaction data by being able to access the original
data payload as well as the original recipient of the transaction, the
to address. This would primarily allow more complex types of “basic” contracts to be created, such as ERC-20 tokens that are aware of exactly what type of action (i.e. “buy” or “sell”) is performed on a DEX like Uniswap.
To properly function, it relies on EIP-3508 which still in a Draft phase.
Let me know your thoughts.