Deployment cost

To deploy the contract, you have to pay for adding bytecode (the runtime bytecode stripped of initialization data) to the blockchain at a cost of 200 gas/byte, plus a fee of 32,000 gas for creating the contract account (create opcode), as indicated in the Ethereum yellow paper. In our case, the contract deployment costs approximately 1,054,247 gas units, and with a gas price of 2 gwei (1 ether = 1000000000 gwei), it will cost a total of 0.002108494 ether. 

To reduce your cost, at this level, you'll need to optimize the code size and get rid of useless code and state variables.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset