defuse_nep245/
token.rs

1
2
3
4
5
6
7
8
9
10
11
use near_sdk::{AccountId, near};

pub type TokenId = String;

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
#[near(serializers = [json, borsh])]
pub struct Token {
    pub token_id: TokenId,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub owner_id: Option<AccountId>,
}