# nft_ptr - std::unique_ptr 의 이더리움 NFT기반 구현체

> Clean Markdown view of GeekNews topic #4061. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=4061](https://news.hada.io/topic?id=4061)
- GeekNews Markdown: [https://news.hada.io/topic/4061.md](https://news.hada.io/topic/4061.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2021-04-13T09:42:02+09:00
- Updated: 2021-04-13T09:42:02+09:00
- Original source: [github.com](https://github.com/zhuowei/nft_ptr)
- Points: 5
- Comments: 2

## Topic Body

- C++ 의 스마트 포인터가 이더리움 블록체인 상의 NFT 객체를 처리하게 만든 코드

ㅤ→ auto ptr1 = make_nft<Cow>();

ㅤ→ nft_ptr<Animal> ptr2;

ㅤ→ ptr2 = std::move(ptr1);

- NFT와 unique_ptr은 정확히 같은 Semantic을 가짐

ㅤ→ 각 토큰/객체는 유일하고, 다른 토큰/개체와 대체 불가

ㅤ→ 각 토큰/객체는 한개의 owner/unique_ptr이 소유

ㅤ→ 다른 사람은 NFT를 보거나/객체를 사용하거나 할수 있지만, owner 만이 NFT/객체를 전송/파괴 할수 있음

ㅤ→ NFT로 표시된 이미지를 불법 복제하거나, unique_ptr에서 포인터를 복사하는 것에 대한 보호가 전혀 없음

- 힙스터를 위해 Rust로 개발

- 성능비교

ㅤ→ std_unique_ptr : 0.0005초

ㅤ→ nft_ptr : 3분

## Comments



### Comment 4853

- Author: xguru
- Created: 2021-04-13T09:42:08+09:00
- Points: 4

너무 진지해서 이게 뭔가 했는데.. Whitepaper 에서 빵터졌네요

- https://github.com/zhuowei/nft_ptr/blob/main/white_paper.pdf

### Comment 4861

- Author: bbulbum
- Created: 2021-04-13T13:16:10+09:00
- Points: 1
- Parent comment: 4853
- Depth: 1

ㅋㅋㅋ 아... 말그대로 ㅋㅋㅋㅋ
