Police were warned of plans to murder a man who appeared in the Trainspotting sequel T2 in the month before his death, a court has heard.
Bradley Welsh, 48, was fatally shot at his flat in the west end of Edinburgh on April 17 2019.
Sean Orman, 30, has pleaded not guilty to all 15 charges against him, including murder, attempted murder, firearms and drugs offences, and is on trial at the High Court in Edinburgh.
Dean White told the court in evidence on Thursday that he had seen the accused at his brother Robert’s home in Duddingston Row with a man known as Peem in March 2019. He said they were speaking about carrying out an attack on a man and his son in the Oxgangs area for money.
He said the accused then claimed he was due to murder Mr Welsh, who ran a boxing gym, for £10,000, which prompted the witness to alert Police Scotland around March 18 that year.
Mr White said: “He brought a wad of cash out and it was like thousands and he had told us that he had seriously assaulted someone in Oxgangs and the guy that he’d assaulted got in the way and that he seriously assaulted his son as well.”
The witness then told the court Orman had claimed to have been paid by Dode Baigrie to carry out the attack.
Mr White added: “He said that his next hit he was getting £10,000 to kill Bradley Welsh.
“I went to the police and reported this before it happened.”
The 49-year-old added he had seen Orman at his brother’s property on several subsequent occasions.
He said the accused had turned up there with an “old-styled” shotgun which he was showing off and misfired into the floor of the property.
Mr White said he then told officers about the incident and that they may be able to recover a bullet.
Richard Goddard QC, advocate depute, asked how he had felt about the events in his brother’s property.
Mr White said: “Extremely nervous and I went straight to the police station and told them exactly what happened in my brother’s house.
“I told them what their plans were, that they were going to get Bradley Welsh and this was a month before the guy got murdered.”
Defence counsel Ian Duguid QC put it to the witness that he was withholding information from police by not mentioning a gunshot through the floor.
The court heard Mr White had not alerted officers about the incident during two phone calls on March 18 or in subsequent statements.
He said: “I was in fear of my life.”
The court has previously heard of alleged attacks on David McMillan, 50, and his son David, 25, at their home at Pitcairn Grove, Edinburgh, on March 13.
Orman is also accused of driving at speeds up to 123mph on the Edinburgh bypass on April 22 2019 – where the limit is 70mph – and failing to stop for uniformed police officers.
He faces an accusation of having driven on the opposing side of the carriageway of Clovenstone Road “in excess of 92mph”, where the limit is 30mph.
Another charge alleges he drove without insurance and was in possession of the class A drug diamorphine and class C drug diazepam.
The trial, before judge Lord Beckett, continues on Friday.