Now there are many ways to write contracts to save Gas, here is a good case found more step-by-step, you can refer to.Case StudyA method to calculate the sum of even numbers in an input array and record the result after the calculation. The inputs are constant [12, 3, 4, 5, 3, 44, 2, 12, 3, 4, 5, 21, 46, 1, 2, 12].1.Initial Code not optimizeduint public total function sumIfEvenAndLessThan99(uint[] memory nums) external { for (uint i = 0; i < nums.length; i += 1) { bool isEven = nums[i] %...