---
eip: 1129
label: ERC-1129
title: Standardised DAPP announcements
status: Stagnant
type: Standards Track
category: ERC
created: 2018-05-31
official: https://eips.ethereum.org/EIPS/eip-1129
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-1129.md
canonical: https://eips.huatuo.xyz/ko/eip-1129/
lang: ko
tldr: 서비스 공지(장애, 마이그레이션, 동결 등)를 온체인에서 게시하고 삭제하기 위한 간단한 컨트랙트 인터페이스로, dapp 사용자가 프로젝트 상태를 표준적인 방식으로 볼 수 있게 한다.
tags: [dapp, announcements, ux, communication]
---

# ERC-1129: Standardised DAPP announcements

> Standardisation of announcements in DAPPs and services on Ethereum network. This ERC provides proposed mechanics to increase the quality of service provided by DAPP developers and service providers, by setting a framework for announcements.

**TL;DR:** 서비스 공지(장애, 마이그레이션, 동결 등)를 온체인에서 게시하고 삭제하기 위한 간단한 컨트랙트 인터페이스로, dapp 사용자가 프로젝트 상태를 표준적인 방식으로 볼 수 있게 한다.

## 어떤 문제를 해결하나요?

토큰이나 dapp에 문제가 생기거나, 새 컨트랙트로 옮기거나, 점검을 위해 일시 중지할 때 사용자에게 알릴 표준적인 장소가 없습니다. 팀은 소셜 미디어나 웹사이트에 글을 올리지만, 그 메시지를 컨트랙트 자체와 연결해 주는 것은 없습니다.

ERC-1129는 컨트랙트가 자체 공지 게시판을 가지는 방식을 제안합니다. 권한이 있는 계정이 메시지를 게시하고, 누구나 읽을 수 있으며, 삭제할 때는 이유가 기록됩니다. 형식이 공통이므로 지갑과 프런트엔드는 이를 구현한 모든 컨트랙트의 공지를 표시할 수 있고, 이력도 온체인에서 추적할 수 있습니다.

## 어떻게 동작하나요?

컨트랙트는 두 가지 작은 레코드를 보관합니다.

- **Announcer**: 해당 주소가 게시할 수 있는지(`allowedToPost`)와 사람이 알아보기 쉬운 `name`.
- **Announcement**: 작성자의 이름, 작성자의 주소, 그리고 `post` 텍스트.

함수:

| 함수 | 역할 |
| --- | --- |
| `givePostingPermission(addr, bool, name)` | 소유자가 게시 권한을 부여하거나 회수 |
| `postAnnouncement(message)` | 권한 있는 공지자가 메시지를 게시 |
| `removeAnnouncement(id, reason)` | 메시지를 삭제하고 이유(문제 해결, 후속 조치)를 설명 |
| `readPosts(id)` | 작성자 이름과 메시지를 반환 |
| `theNumberOfAnnouncements()` | 유효한 공지의 개수(선택) |

이벤트 `NewAnnouncement(author, message)`와 `RemovedAnnouncement(author, message, reason, remover)`는 반드시(MUST) emit해야 하며, 그래야 오프체인 도구가 스토리지를 폴링하지 않고도 공지를 따라갈 수 있습니다. 공지가 삭제되면 빈 슬롯이 없도록 목록이 압축됩니다.

## 샘플 코드

인터페이스를 현대적인 Solidity로 간결하게 스케치한 것입니다(명세 자체는 0.5 이전 문법을 사용합니다):

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract Announcements {
    struct Announcement { string author; address authorAddress; string post; }

    address public owner = msg.sender;
    mapping(address => bool) public allowedToPost;
    mapping(address => string) public posterName;
    Announcement[] private posts;

    event NewAnnouncement(string author, string message);
    event RemovedAnnouncement(string author, string message, string reason, address remover);

    function givePostingPermission(address who, bool allowed, string calldata name) external {
        require(msg.sender == owner, "owner");
        allowedToPost[who] = allowed;
        posterName[who] = name;
    }

    function postAnnouncement(string calldata message) external {
        require(allowedToPost[msg.sender], "cannot post");
        posts.push(Announcement(posterName[msg.sender], msg.sender, message));
        emit NewAnnouncement(posterName[msg.sender], message);
    }

    function removeAnnouncement(uint256 id, string calldata reason) external {
        require(allowedToPost[msg.sender], "cannot remove");
        Announcement memory a = posts[id];
        posts[id] = posts[posts.length - 1]; // keep the array dense
        posts.pop();
        emit RemovedAnnouncement(a.author, a.post, reason, msg.sender);
    }

    function readPosts(uint256 id) external view returns (string memory, string memory) {
        return (posts[id].author, posts[id].post);
    }

    function theNumberOfAnnouncements() external view returns (uint256) { return posts.length; }
}
```

## 알아둘 점

- 상태: **Stagnant**. 지갑이나 익스플로러에서 널리 채택된 적이 없습니다.
- 명세는 누가 `removeAnnouncement`를 호출할 수 있는지 정하지 않습니다. 위처럼 제한할지는 구현자에게 달려 있습니다.
- 긴 문자열을 온체인에 저장하는 것은 비용이 많이 듭니다. 지금은 많은 프로젝트가 이벤트만 emit하거나 오프체인 콘텐츠를 가리킵니다.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-1129
