I've reviewed several related SE questions on this topic and I haven't seen an answer. In Remix, I've created two separate .sol files. The files are names file1.sol and file2.sol. The code for the two files looks like this:
file1.sol
pragma solidity ^0.4.0;
contract MyFirstContract {
}
file2.sol
pragma solidity ^0.4.0;
contract MyOtherContract {
}
When I review the transaction and execution costs, I'm slightly confused. The part that cons
| transaction cost | execution cost |
file1.sol | 68926 gas | 10862 gas |
file2.sol | 68990 gas | 10862 gas |
Why are the transaction costs different when the contracts are virtually the same? At first, I suspected there was an added space or something else in the contract. However, I verified that wasn't the case. Why are there different transaction costs across these two contracts?