-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
examples: add NEP11 Divisible token example #2333
Conversation
17154bc
to
fe56376
Compare
examples/nft-d/nft.go
Outdated
Package nft_d contains divisible non-fungible NEP-11-compatible token | ||
implementation. This token can be minted with GAS transfer to contract address, | ||
it will retrieve company name from the transfer data and produce NFT which | ||
represents shares of the specified company. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shares are so naturally fungible, that we might consider using something else. Although that might be a problem of divisible NFTs in general, each of them could easily be proper NEP-17, but somehow they're NFTs. Usually I'm thinking of some real estate in this case, each object is unique, there are lots of them (unlike publicly traded companies) and each can be owned by a set of owners. Not sure it makes for a good example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think it's a good example, but possibly it has the same problem as shares, because if you share a part of a flat (e.g. 10m² out of 30m²), then you still can't locate the particular part of this flat and say that it's 10m² of a kitchen or 10m² of a bathroom, you just own 1/3 of a flat which is also naturally fungible.
And also I remember the neo-project/proposals#130 (comment), but looks like it's also a problem of all NEP11-divisible tokens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, just discussed --- imagine a NeoFS object, a perfect NFT. You can theoretically give access to it only to its owner, but what if you want to give access to a number of people? That's where divisible NFTs might be handy, you give 0.00001 part of this NFT to the user and he can access it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
4d1aab8
to
3028471
Compare
Method `ownerOf` returns iterator which should be of the type InteropInterface.
It's possible that overloaded method is marked as `safe` in manifest, so that it must have `save` field set to true after its name was overwritten.
3028471
to
0cfef2e
Compare
0cfef2e
to
d2b62b6
Compare
Codecov Report
@@ Coverage Diff @@
## master #2333 +/- ##
==========================================
+ Coverage 84.72% 84.74% +0.01%
==========================================
Files 286 286
Lines 29890 29894 +4
==========================================
+ Hits 25325 25333 +8
+ Misses 3129 3127 -2
+ Partials 1436 1434 -2
Continue to review full report at Codecov.
|
d2b62b6
to
99c3efd
Compare
0aafe4f
to
9f4e7fd
Compare
9f4e7fd
to
5561b94
Compare
Seems that #2292 is almost ready, so there will be no painful rebases anymore and I can safely open this PR.
Close #1940.