Hacker News new | ask | show | jobs
by nootropicat 1776 days ago
>The biggest challenge is once you leave Solidity entirely, it's hard to do anything but very simple operations.

You don't have to leave solidity, it could all be done in the fallback/default function, no?

For the rest, you described gas tokens, but self destruct refunds were removed with London so they are all worthless now.

1 comments

Good question. I'm 90% sure that fallback function is actually implemented in byte code by comparing the byte code against all the method signatures. Then if none match, the assembly jumps to the fallback. So, what you save in 0s in the input byte code, you pay more than that in the execution gas.

Yeah, for gas tokens you're right. This was all pre-Flashbots, so talking about February or March at the latest. Flashbots kind of wrecked the whole game. Now it's a whole lot simpler, just ship transactions to Flashbots and bid as close as possible to breakeven. Consequently 90%+ of the profits now go to the miners.

>So, what you save in 0s in the input byte code, you pay more than that in the execution gas.

In this case all methods should be internal, so the preamble would have no methods at all to look for.