1

I'm trying to deploy a contract with REMIX but it throw an error "smart contract too large, not enough gas".

Is REMIX hardcoded for contract size ?

Do smart contract size increase with blocksize ? For example if we have 18M gas per block, a contract may be 18M gas cost to deploy ?

0

No. The contract size mainly depends on the source code. There are other factors like compiler version used, the EVM's opcode pricings, but they are minor variations.

Remix in the "Deploy & Run transaction" tab has a "Gas Limit" input, with a default value of 3M gas.

2
  • Thanks you but what is the gas limit for a smart contract ? If we have 15M gas per block I can go up to 15M gas for a smart contract ? – GrindCode May 30 at 11:02
  • @GrindCode For a contract to execute its cost has to be equal or lower than the block gas limit. Currently mainnet has a 15M block gas limit, so that's the maximum a contract can use. For deployment there's another limit the transaction size: ethereum.stackexchange.com/questions/1106/…. – Ismael May 30 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.