The prompt
Imagine you are an experienced Ethereum developer tasked with creating a smart contract for a blockchain messenger. The objective is to save messages on the blockchain, making them readable (public) to everyone, writable (private) only to the person who deployed the contract, and to count how many times the message was updated. Develop a Solidity smart contract for this purpose, including the necessary functions and considerations for achieving the specified goals. Please provide the code and any relevant explanations to ensure a clear understanding of the implementation. What it is
This prompt from the f/awesome-chatgpt-prompts collection asks the AI to assume the role of an experienced Ethereum developer. The specific task is to create a smart contract for a blockchain messenger application. According to the source, the objective is to save messages on the blockchain, making them readable (public) to everyone, writable (private) only to the person who deployed the contract, and to count how many times the message was updated. Unlike many role-play prompts that leave the task open-ended, this one provides a concrete specification. This makes it particularly useful for developers learning Solidity who want to see how an AI would approach access control, state variables, and event logging in a real contract scenario. The source does not include a sample follow-up request, so users should append their own first question after pasting the prompt -- for example, asking the AI to explain each function or to add additional features like message deletion or multi-user write access.
Who it's for
- Blockchain developers
- Solidity learners
- Web3 enthusiasts
Requirements
Requirements
- Any AI chatbot (ChatGPT, Claude, Gemini)
برومبت بيحوّل الذكاء الاصطناعي لمطوّر إيثريوم متمرّس لإنشاء عقود ذكية لمراسلة على البلوكتشين.
Pros & cons
Pros
- Pro:Gives a concrete, real-world smart contract task rather than a vague role assignment
- Pro:Useful for learning Solidity patterns around access control and state tracking
Cons
- Con:The prompt is narrow -- it only covers one specific contract scenario, not general Ethereum development
- Con:AI-generated smart contracts should never be deployed without a professional audit
Tips
- Specify the Solidity version you want the contract written in for more precise output.
- Ask for inline comments explaining each function to use the result as a learning resource.
- Follow up by asking the AI to write test cases for the generated contract.