开发提示词链上消息 Solidity 合约
提示词主题

Text

以太坊链上公开消息合约设计

引导模型设计一个 Solidity 区块链消息合约,实现公开读取、仅部署者可写以及消息更新次数统计,并说明关键实现考虑。

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.

How to use

使用建议:将此提示词用于具备 Solidity 与以太坊开发知识的模型;部署前补充目标 Solidity 版本、网络、访问控制方案和测试要求,并对生成的合约进行安全审计、单元测试与 gas 评估。

Details

Type
Text
License
CC0-1.0

Report this content