Smart contracts have transformed how legal agreements are managed and carried out, but they come with their own share of potential flaws and security risks. These shortcomings make smart contracts susceptible to hacking, which can lead to substantial financial losses. For instance, security weaknesses in smart contracts can be manipulated to illicitly extract funds. A