A new opcode, SUDO
, is introduced with the same parameters as CALL
, plus another parameter to specify the sender address.
There are many use cases for being able to set the sender.
Many tokens are stuck irretrievably because nobody has the key for the owner address.
In particular, at address zero there is approximately 17 billion USD in tokens and ether, according to etherscan.
With SUDO
, anyone could free that value, leading to an economic boom that would end poverty and world hunger.
Instead it is sitting there idle like the gold in Fort Knox.
SUDO
fixes this.
It is a common mistake to send ERC-20 tokens to the token address instead of the intended recipient.
This happens because users paste the token address into the recipient fields.
Currently there is no way to recover these tokens.
SUDO
fixes this.
Many scammers have fraudulently received tokens and ETH via trust-trading.
Their victims currently have no way to recover their funds.
SUDO
fixes this.
Large amounts of users have accidentally locked up tokens and ether by losing their private keys.
This is inefficient and provides a bad user experience.
To accommodate new and inexperienced users, there needs to be a way to recover funds after the private key has been lost.
SUDO
fixes this.
Finally, there are many tokens and ether sitting in smart contracts locked due to a bug.
We could finally close EIP issue #156.
We cannot currently reclaim ether from stuck accounts.
SUDO
fixes this.
Adds a new opcode (SUDO
) at 0xf8
.
SUDO
pops 8 parameters from the stack.
Besides the sender parameter, the parameters shall match CALL
.
CALLER
inside the call frameADDRESS
CALLVALUE
CALLDATA
CALLDATA
RETURNDATA
RETURNDATA
to place in memoryFollowing execution, SUDO
pushes a result value to the stack, indicating success or failure.
If the call ended with STOP
, RETURN
, or SELFDESTRUCT
, 1
is pushed.
If the call ended with REVERT
, INVALID
, or an EVM assertion, 0
is pushed.
The GAS
parameter is first so that callers can tediously compute how much of their remaining gas to send at the last possible moment.
The remaining parameters inherited from CALL
are in the same order, with sender inserted between.
It will be fine.
Copyright and related rights waived via CC0.