AnswerBun.com

Deployed bytecode size seems to mismatch contract code size

Ethereum Asked by Ilan Dshare on October 6, 2020

I See some very weird solc behaviour with regards to compiled bytecode size.
A much shorter contract compiles to bigger byte code.

short contract: compiles into 439 bytes.
while this longer one compiles into 129 bytes.
note that the longer contract includes the code of the shorter one plus some extra code.

not sure what am I missing.

One Answer

Thank to Kamil Śliwak that replied to me on the solidity gitter channel.

reason is the longer contract has only internal functions which the optimizer will remove out of the deployed bytecode. must call the functions of switch to external in order to check bytecode size effects.

Answered by Ilan Dshare on October 6, 2020

Add your own answers!

Related Questions

part of private blockchain disapear

1  Asked on January 5, 2022 by tomas-batrla

       

web3 erroneously returning error

2  Asked on January 5, 2022 by bitsanity

   

How can I distribute funds to present stakers efficiently?

1  Asked on January 3, 2022 by fariha-abbasi

     

It is possible to register a name in ENS (Ethereum Name Service) from Mist Wallet?

1  Asked on January 1, 2022 by moiss-briseo-estrello

   

Viewing transaction events by using web3 on geth console

1  Asked on January 1, 2022 by juan-ignacio-prez-sacristn

         

.toml stream did not contain valid UTF-8

1  Asked on December 30, 2021 by chaitanya-bapat

   

Acceptable Gas Usage of Smart Contract functions

3  Asked on December 30, 2021 by wbt_

 

Use Values Returned from One Function in Another

1  Asked on December 27, 2021 by kevin-phillips

         

What is the v part of transaction signature?

1  Asked on December 27, 2021 by anh-dng-l

   

How to convert hashed result into readable format?

1  Asked on December 25, 2021 by sowmay-jain

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP