#Soroban NFT
21 messages · Page 1 of 1 (latest)
I published a draft interface for nfts at
https://github.com/stellar/stellar-protocol/pull/1406 (erc1155 like)
Or
https://github.com/vinamogit/stellar-protocol/pull/2 (721 like)
No guarantees these stay in their current format though since theyre draft prs.
Also there is a more traditional erc721 interface at https://github.com/vinamogit/stellar-protocol/pull/1
Hope it helps
This draft proposal aims to align with the ERC-1155 standard by allowing for the creation and management of both fungible and non-fungible tokens within a single contract, and by providing function...
Following up stellar#1402 for NFTs.
So it isn't launched officially?
These are still in review
The standards haven't been formalized yet but one of the authors @zenith fractalalso wrote this implementation:
https://github.com/candela-network/millionlumenhomepage.art/tree/main/erc721
@crude heron simplest way to create an NFT would be to include @zenith fractal 's WASM in your code and specify name and symbol before hitting deploy.
pub fn initialize(env: Env, admin: Address) {
let name = String::from_slice(&env, "Non-Fungible Token");
let sym = String::from_slice(&env, "NFT");
erc721::ERC721Contract::initialize(env, admin, name, sym);
}
Can we add this nft in wallet?
okay, so when we can officially use this?
I am using @zenith fractal erc721 as a base contract for one nft project I am working on. Even if the review ends up in something completely different I guess it is a good starting point
In that contract, I'm not able to get token_uri using token_id. Can you help with that?
have you checked the example? https://github.com/candela-network/millionlumenhomepage.art/blob/main/erc721-example/src/lib.rs
It uses a storage entry to map a token id to an uri (written during mint)
Yeah but maybe he is talking about the million lummens contract where you are creating a url based off the token. But when he tries to invoke that url it will be returning 404 because the contract is not saving anything in the url right?
I've gone through that but still not able to get uri using token_id.
I think the problem is that the example stores the value here
// set the uri for the token id
env.storage()
.persistent()
.set(&DatakeyMetadata::Uri(token_id), &uri);
But the getter gets from
erc721::ERC721Contract::token_uri(env, token_id)
Yes right, it should be instance and not persistent it seems, or change the getter to get from persistent...
Hey guys steve from the blue marble has open sourced the token contract compatible nft implementation they have made that i helped with. Here is a link
Cool so is this a proposed standard? Will look more into the details of it later
That implementation is what I had wrote a standard off of but there is discussion about whetther a NFT standard should even be defined if it's just a like incrimental token interface contract.
I don't think that one has the URI metadata in it though
I guess it would make sense so that anyone implementing systems to interact with the nfts knows what all NFTs have in common and in the same way everyone building nft projects know that by respecting the interface they will comply with the rules . So basically it will facilitate any current or future integrations I guess is what I am trying to say ahah