1

The assembly for a smart contract looks like there is a single entry point and a series of if/thens or a switch to jump to the entry point of each function.

Is it possible to skip the lookup and jump straight to the function's code if you already know its offset?

1 Answers1

4

The opcodes that exist to call into a contract (call, delegatecall, staticall) take no parameter to jump to a location in the bytecode. All of these calls will begin execution at the very beginning of the bytecode and there is no way to alter this.

natewelch_
  • 12,021
  • 1
  • 29
  • 43