only getting value 255 from EEPROM

int val = Wire.read();
EEPROM.write(addr, val);

EEPROM.write() only writes 1 byte. An int is 2 bytes.
Do you see a problem ?

Have a look at the EEPROM.put() and EEPROM.get() functions