Skip to content

Add NFT proposal for soroban (ERC-721)#1405

Closed
vinamogit wants to merge 1 commit intostellar:masterfrom
vinamogit:sep-nft-1
Closed

Add NFT proposal for soroban (ERC-721)#1405
vinamogit wants to merge 1 commit intostellar:masterfrom
vinamogit:sep-nft-1

Conversation

@vinamogit
Copy link

Following #1402 for NFTs.

@namankumar namankumar self-requested a review October 10, 2023 23:24

```rust
pub trait Interface {
fn balance_of(env: Env, owner: Address) -> u32;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not balance for consistency with token interface?

## Specification

```rust
pub trait Interface {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NFTInterface?

```rust
pub trait Interface {
fn balance_of(env: Env, owner: Address) -> u32;
fn transfer_from(env: Env, spender: Address, from: Address, to: Address, token_id: u32);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a transfer function as it's probably the main interface for Soroban.

```rust
pub trait Interface {
fn balance_of(env: Env, owner: Address) -> u32;
fn transfer_from(env: Env, spender: Address, from: Address, to: Address, token_id: u32);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rationale for using the approve for NFTs? For tokens the use case for it is to mostly some edge cases, like subscriptions.

pub trait Interface {
fn balance_of(env: Env, owner: Address) -> u32;
fn transfer_from(env: Env, spender: Address, from: Address, to: Address, token_id: u32);
fn approve(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why operator is optional here?

fn set_approval_for_all(
env: Env,
caller: Address,
owner: Address,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is owner present here?


This proposal defines a standard interface that NFTs on Soroban powered
networks, such as the Stellar network, can implement to interoperate with
contracts that use NFTs, and Stellar assets.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the plan for the Stellar assets interop?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a PR to try to enable SAC interop.
vinamogit#2

@namankumar namankumar changed the title Add NFT proposal for soroban Add NFT proposal for soroban (ERC-721) Oct 19, 2023
@github-actions
Copy link

This pull request is stale because it has been open for 30 days with no activity. It will be closed in 30 days unless the stale label is removed.

@github-actions github-actions bot added the stale label Nov 18, 2023
@github-actions github-actions bot closed this Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants