简体   繁体   中英

How to encode input data on etherscan when trigger a non open source smart contract?

I have deployed a smart contract on Ethereum. When I triggered it, function name and params were displayed on etherscan. How can I hidden these infomation? enter image description here

Etherscan uses a dictionary that translates the function signature to a function name (in your case 0x38ed1739 to swapExactTokensForTokens(uint256,uint256,address[],address,uint256) ).

If you don't want them to translate the function name, you'll need to rename your contract functions (it's definition and all places that call them) to some gibberish such as kdjgklfdjiwefw(uint256,uint256,address[],address,uint256) .

Be aware that external contracts might want to call your functions by their name that they expect (such as swapExactTokensForTokens ) and they will not be able to if a function with this name doesn't exist.

If you want to prohibit Etherscan showing the translations but NOT rename your functions - there's currently no way to do that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM