This https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#InventoryOpened says:
unit: Object - Object the event handler is assigned to
container: Object - connected container or weaponholder
But InventoryOpened event handler receives only unit, but not container.