We need to calculate the total cost of the transactions. in order to do that we change the state of the EVM, we need a way to calculate this code and simulate this.