-
Notifications
You must be signed in to change notification settings - Fork 146
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
Compressed NFT Standard #126
base: master
Are you sure you want to change the base?
Conversation
Hey @krigga! I like the idea, but I think we should make a standard NFT compressed contract with Merkle proofs instead of Merkle trees. First of all, we should use TON possibilities and TON has a convenient proof verifying technology. Secondly, it should be much cheaper. I started such development in my fork (currently there is no Merkle Updates implementation for updates, its just an example of how the proof can be verified). So if the community like the idea I can continue development. I think wallet developers should support exotic cells sending in wallets, because that's a good technology that can find application in many developments. So maybe its better to wait for wallets to support this feature? For the first time we can use proxy contracts for NFT claiming: User deploys a simple proxy contract and then sends an external message with proof to it which proxy sends to the collection contract. The cost of deployment is offset by the cheapness of proof verification with tvm built-in Merkle Proof validation. |
Hey, @yungwine |
I don't really understand why it is necessary to put all this in a separate standard. As an implementation of NFT together with merkle tree it is very good, but as a standard it does not add anything new. On ethereum they have been doing token drops with merkle tree for a long time. I think that for a new standard it is necessary to add something conceptually new, and this is not worthy of a separate standard |
Hey, @purp1le! In the world of technology, standards play a crucial role in bringing everyone together. It's not just about showcasing the novelty of ideas; rather, the primary objective is to foster consensus among all the players in the ecosystem. These standards serve as a unifying force, ensuring that we all rally behind a common technology that benefits everybody involved. |
This is so long-awaited on TON |
Good |
Change the format of the `items` request Add an optional limit to `count` of the `items` request
Good |
|
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.
Это как
text/0000-compressed-nft-standard.md
Outdated
```json | ||
{ | ||
"metadata": { | ||
"owner": "UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ", // user-friendly url-safe address string |
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.
better to use raw address. it helps to avoid using not normalized address comparsion as a string
{ | ||
"metadata": { | ||
"owner": "UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ", // user-friendly url-safe address string | ||
"individual_content": "te6cckEBAQEAAgAAAEysuc0=" // base64 BoC serialized Cell |
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.
also here you use base64 url-unsafe
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
text/0000-compressed-nft-standard.md
Outdated
NFT Collection smart contract MUST implement: | ||
|
||
#### Get-methods | ||
1. `get_nft_api_info()` returns `(int version, cell uri)`. `version` is the version of the API that augments this contract. This standard covers API version 1, see below for description. `uri` is the API URI in `SnakeText` format **not including the version postfix**, and the final API URI must be formed as follows: `decoded-uri + '/v1'`. |
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.
wtf? what if decoded-uri is 'http://example.com/index.php?page=metadata'? author should switch urls naming scheme in project only for this feature?
text/0000-compressed-nft-standard.md
Outdated
|
||
## Augmenting API version 1 | ||
|
||
Once a user has obtained and decoded the URI using the `get_api_info` get method, verified the version (this standard covers version 1 only) and added the `/v1` postfix, they can use the following methods: |
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.
get_api_info
or get_nft_api_info
?
or maybe it's two independent methods?
text/0000-compressed-nft-standard.md
Outdated
"owner": "UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ", // user-friendly url-safe address string | ||
"individual_content": "te6cckEBAQEAAgAAAEysuc0=" // base64 BoC serialized Cell | ||
}, | ||
"index": 0 |
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.
is index should always be integer? what if index is 256-bit long like in domains?
text/0000-compressed-nft-standard.md
Outdated
|
||
(`:arg` means an argument with name `arg`) | ||
|
||
##### 1. `/item/:index` |
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.
if you are writting REST style than /items/:index
text/0000-compressed-nft-standard.md
Outdated
```json | ||
{ | ||
"last_index": 0, | ||
"address": "UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ" |
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.
same - better to use raw form for avoiding problems. for example nft collection it's 100% a smartcontract but in documentation you used non-bounce form
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
So what about indexes. like tonapi or getgems. should we index compressed collections? if yes it looks like very cheap attack to them. I can make easily collection with 100000 items, deploy it for 0.0001 TON and every index should save all items in db. but attacker even doesn't need to store all this items on his server and easily can generate it on-demand. |
All indexers supporting this standard should come up with their own ways of filtering out malicious compressed NFT collections (for example - whitelists/blacklists, any kind of heuristics, etc) - this standard does not concern itself with that aspect. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
nice |
Hey
how can I update my address and details because I still haven’t gain
…On Sun, Dec 3, 2023 at 2:15 AM Howard Peng ***@***.***> wrote:
Hey @krigga <https://github.com/krigga>! I like the idea, but I think we
should make a standard NFT compressed contract with Merkle proofs instead
of Merkle trees. First of all, we should use TON possibilities and TON has
a convenient proof verifying technology. Secondly, it should be much
cheaper.
I started such development in my fork
<https://github.com/yungwine/compressed-nft-contract/blob/main/contracts/collection_mp.fc>
(currently there is no Merkle Updates implementation for updates, its just
an example of how the proof can be verified). So if the community like the
idea I can continue development.
I think wallet developers should support exotic cells sending in wallets,
because that's a good technology that can find application in many
developments. So maybe its better to wait for wallets to support this
feature?
For the first time we can use proxy contracts for NFT claiming: User
deploys a simple proxy contract and then sends an external message with
proof to it which proxy sends to the collection contract. The cost of
deployment is offset by the cheapness of proof verification with tvm
built-in Merkle Proof validation.
nice
—
Reply to this email directly, view it on GitHub
<#126 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A73LUSSIRWRRMIWAGZ2SEC3YHQRHHAVCNFSM6AAAAAA23NSXUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGM4TENZZGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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.
b5ee9c720101020100aa00019cbfdba08b8daf42b14c14788a25fdd9318cfdc8962ee304d24b99358de5a0558bb41fd17334b5aaedd2d570f016b917bb1870d2446d46126fe8d6b10f3d5fce0329a9a31766a5e9780000000100030100ae4200061ded5b5a9b6a0474f14ac14a3a58f52e31da9cd6f8b94eac3a385bad6acb66224239fb50000000000000000000000000000000000052656365697665203130302c303030204e4f54202b20313030207473544f4e
K |
. |
This comment was marked as spam.
This comment was marked as spam.
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.
- [ ]
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.
get_nft_api_info
{ | ||
"metadata": { | ||
"owner": "UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ", // user-friendly url-safe address string | ||
"individual_content": "te6cckEBAQEAAgAAAEysuc0=" // base64 BoC serialized Cell |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
The |
No description provided.