Blockchain and smart contracts enable the development of Decentralized Autonomous Systems (DASs), such as Decentralized Autonomous Applications (DAAs) and Decentralized Finance (DeFi). This paper addresses the challenge of automating smart contract generation for DASs by leveraging the Code LLaMA – Instruct model. A dataset of 6,003 human instruction and source code pairs is used for fine-tuning, employing Quantized Low-Rank Adaptation (QLORA) to optimize the model’s seven billion parameters. The study focuses on generating Solidity-based smart contracts for Ethereum, evaluating the model across four scenarios: cryptocurrency token creation, ownership management, DAO wallet whitelisting, and company information contracts. Results indicate that the fine-tuned model successfully generates functional and efficient smart contracts, demonstrating correctness and optimized gas usage.