paint-brush
How to Exploit a Solidity Constructorby@inaeem
4,487 reads
4,487 reads

How to Exploit a Solidity Constructor

by inaeem10mNovember 12th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The constructor has public visibility and doesn’t do anything. When we compile this contract, solidity compiler generates some gibberish characters (bytecode) The bytecode includes everything to successfully deploy/initialize the code, persists state and some sanity checks. It is never meant for EVM and isn't executed by the EVM. To create this contract on-chain, we execute a send transaction (RPC call) where the `“to”` address is null and the “data” `Auxdata` is the hash of the source code used for source verification.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How to Exploit a Solidity Constructor
inaeem HackerNoon profile picture
inaeem

inaeem

@inaeem

live @ PID 1

About @inaeem
LEARN MORE ABOUT @INAEEM'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

inaeem HackerNoon profile picture
inaeem@inaeem
live @ PID 1

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Newsbreak
Moomoo
Learnrepo
Coffee-web
Kryptocurrency
Businesstimenow
Scien
The-rekalibrator
Lzomedia