def size
      @size ||= if dims.empty?
                  if %w(string bytes).include?(base) && sub.empty?
                    nil
                  else
                    32
                  end
                else
                  if dims.last == 0 # 0 for dynamic array []
                    nil
                  else
                    subtype.dynamic? ? nil : dims.last * subtype.size
                  end
                end
    end
def size
      @size ||= if dims.empty?
                  if %w(string bytes).include?(base) && sub.empty?
                    nil
                  else
                    32
                  end
                else
                  if dims.last == 0 # 0 for dynamic array []
                    nil
                  else
                    subtype.dynamic? ? nil : dims.last * subtype.size
                  end
                end
    end
@param base [String] base name of type, e.g. uint for uint256[4]
 @param sub  [String] subscript of type, e.g. 256 for uint256[4]
 @param dims [Array[Integer]] dimensions of array type, e.g. [1,2,0]
   for uint256[1][2][], [] for non-array type


 Get the static size of a type, or nil if dynamic.

 @return [Integer, NilClass]  size of static type, or nil for dynamic
   type