The E3 ubiquitin ligase TRIM31 attenuates NLRP3 inflammasome activation in Helicobacter pylori-associated gastritis by regulating ROS and autophagy. Here, NLRP3 is linked to gastritis.