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

1.3k Views Asked by At

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

1

There are 1 best solutions below

4
On

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.