I have a question, what if I have a simple contract that has a public function "give something to this adress" and that will be called from a website

I will put it on-chain but will not verify it nor publish the abi or source code...

So, is there a way someone can decode the bytecode generated for my contract? Is there any way they can generate their own abi? And the last question: Can someone access the abi that I use on my webpage?

  • Nobody knows? I think the problem will be when they actually come to the webpage and download it since there will be the ABI. But I can be wrong so please I'll apreciate if you help me. Jul 13 '18 at 17:03
  • Thx for edit 😉 @chenmunka Jul 13 '18 at 17:10

Solidity code is compiled into EVM bytecode. All compiled code can, at least in theory, be reverse-engineered.

Reverse-engineering any compiled code gives us the basic functionality in a very unreadable format (it's optimized, minimized and whatnot). Some more info can be found here: How can you decompile a smart contract?

Having spent a minute googling the issue, it looks like you can't get the ABI from just the bytecode: Can you obtain the ABI of a smart contract using the contract address and contract code? and How do you get a json file (ABI) from a known contract address?

Anyway, as a rule of thumb, don't assume ANY information you put into Ethereum blockchain to remain secret (unless it's encrypted in client-side and not decryptable in the blockchain).

  • Thanks a lot! I'll be careful. Do you know if someone can get the ABI if he downloads my website? Assuming I use Web3.is i.e I put the ABI on the website? Jul 13 '18 at 19:41
  • Well if the ABI is on the website publicly then they can get it. But you cuold hide it somewhere within your backend I guess. Jul 13 '18 at 20:10
  • Yeah I'll try, however, thanks man, I appreciate it! Jul 13 '18 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.