From d977961f61e0545287591c296bf5392d225a5be7 Mon Sep 17 00:00:00 2001 From: Vincent Amouret Date: Wed, 11 Oct 2023 01:14:43 +0200 Subject: [PATCH] Create sep-nft.md --- contract/sep-nft.md | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 contract/sep-nft.md diff --git a/contract/sep-nft.md b/contract/sep-nft.md new file mode 100644 index 000000000..c247418c9 --- /dev/null +++ b/contract/sep-nft.md @@ -0,0 +1,61 @@ +## Preamble + +``` +CIP: +Title: NFT +Author: Stellar Development Foundation <@stellar> +Status: Draft +Discussion: TBD +Created: 2023-10-11 +Version 0.1.0 +``` + +## Summary + +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. + +## Motivation + +A non-fungible asset is ... + +## Abstract + +This proposal introduces a contract interface for NFTs. The interface is ... + +The interface tries to follow an ERC-721 model. + +## Specification + +```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); + fn approve( + env: Env, + caller: Address, + operator: Option
, + token_id: u32, + expiration_ledger: u32, + ); + fn set_approval_for_all( + env: Env, + caller: Address, + owner: Address, + operator: Address, + approved: bool, + expiration_ledger: u32, + ); + fn get_approved(env: Env, token_id: u32) -> Option
; + fn is_approval_for_all(env: Env, owner: Address, operator: Address) -> bool; +} +``` + +## Changelog + +- `v0.1.0` - Initial draft based on CIP-001. + +## Implementations + +TBD