0

Is it possible to only upload a contracts ABI without including the source code? If so, how?

Curious if Etherscan can still be used to interact with the smart contract, but not make the source code visible.

2 Answers 2

1

Discovered this. Etherscan recommends it for debugging purposes, but it's possible.

https://info.etherscan.com/custom-abi/

3
  • You can upload an ABI and interact with your contract through it, but only if you are logged in with your personal Etherscan account. You cannot “publish” the ABI to the world. Otherwise you could try and scam people by naming a malicious function as innocentFunction(). So since Etherscan cannot vouch for you not trying to misrepresent your function’s behaviour with an innocent name, it doesn’t let you publish the ABI in the first place.
    – dwardu
    Jun 7, 2022 at 22:50
  • @dwardu But there closed source contracts with only the abi on Etherscan. How about them? Nov 23, 2022 at 23:43
  • @user2284570 May you provide the link to one example please?
    – dwardu
    Nov 25, 2022 at 6:50
0

No. 😞 To verify your contract you need the exact bytecode. That can only be deduced from the source code and the input parameters used to deploy the contract

2
  • 1
    But there closed source contracts with only the abi on Etherscan. How about them? Nov 23, 2022 at 23:44
  • I saw that and I wonder the same thing... Kinda breaks the whole concept behind verifying contracts.
    – Roy Toledo
    Dec 1, 2022 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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