Elias Campbell Benyoucef pleaded guilty to a total of six charges on Friday.
Three of the charges related to possession of a controlled drug with intent to supply – namely, MDMA powder, cannabis resin and herbal cannabis.
Benyoucef also admitted two further charges of possession of MDMA powder and tablets, and owning “a utensil for the purposes of committing an offence” after digital scales featuring drug residue were found in his possession.
His lawyer, Advocate Michael Haines, entered guilty pleas to all counts on his behalf.
Crown Advocate Matthew Maletroit said Benyoucef will be sentenced before the Superior Number – a panel of jurats that only assembles for the most serious cases – on Monday 1 July.
He will remain in custody in the meantime.