aakash4dev
aakash4dev

Reputation: 1176

Can we deploy smart contract without publicly giving bytecode?

I'm learning dapp and blockchain development, every time we deploy a smart contract, the bytecode is visible to all at polyscan/etherscan. Can we hide that? Can we deploy smart contract without giving bytecodes ?

Upvotes: 1

Views: 901

Answers (2)

Yilmaz
Yilmaz

Reputation: 49182

Your code gets executed on Ethereum Virtual Machine(EVM) and bytecode gives the instructions to EVM on how to execute the code. The bytecode is what represents the contract and it is deployed in the Ethereum ecosystem. The bytecode is a low-level language that the EVM understands is required during deployment.

when you deploy a contract, bytecode is also sent alongside the transaction in the data:bytecode and once the contract is deployed, that bytecode will be public. and later on, when someone interacts with your contract, interaction will be handled by the instructions specified in the bytecode. there is no way you can hide the bytecode

Upvotes: 3

kelche
kelche

Reputation: 41

I think there is no way to hide that given the open nature of the blockchain because whenever we deploy a contract we update the state of the blockchain which is immutable.

Upvotes: 2

Related Questions