diff --git a/src/sell-contract/src/app.rs b/src/sell-contract/src/app.rs index 3557165..bde16e3 100644 --- a/src/sell-contract/src/app.rs +++ b/src/sell-contract/src/app.rs @@ -8,6 +8,12 @@ mod storage; use candid::Principal; use configuration::Configuration; +use dip721::{ + Dip721, GenericValue, Metadata, NftError, Stats, SupportedInterface, TokenIdentifier, + TokenMetadata, TxEvent, +}; + +use self::storage::TxHistory; #[derive(Default)] /// Sell contract canister API @@ -19,3 +25,137 @@ impl SellContract { Configuration::is_custodian(caller) } } + +impl Dip721 for SellContract { + fn metadata() -> Metadata { + todo!() + } + + fn stats() -> Stats { + todo!() + } + + fn logo() -> Option { + todo!() + } + + fn set_logo(logo: String) { + todo!() + } + + fn name() -> Option { + todo!() + } + + fn set_name(name: String) { + todo!() + } + + fn symbol() -> Option { + todo!() + } + + fn custodians() -> Vec { + todo!() + } + + fn set_custodians(custodians: Vec) { + todo!() + } + + fn cycles() -> candid::Nat { + todo!() + } + + fn total_unique_holders() -> candid::Nat { + todo!() + } + + fn token_metadata(token_identifier: TokenIdentifier) -> Result { + todo!() + } + + fn balance_of(owner: Principal) -> Result { + todo!() + } + + fn owner_of(token_identifier: TokenIdentifier) -> Result { + todo!() + } + + fn owner_token_identifiers(owner: Principal) -> Result, NftError> { + todo!() + } + + fn owner_token_metadata(owner: Principal) -> Result, NftError> { + todo!() + } + + fn operator_of(token_identifier: TokenIdentifier) -> Result { + todo!() + } + + fn operator_token_identifiers(operator: Principal) -> Result, NftError> { + todo!() + } + + fn operator_token_metadata(operator: Principal) -> Result, NftError> { + todo!() + } + + fn supported_interfaces() -> Vec { + vec![ + SupportedInterface::Approval, + SupportedInterface::Burn, + SupportedInterface::Mint, + SupportedInterface::TransactionHistory, + ] + } + + fn total_supply() -> candid::Nat { + todo!() + } + + fn approve( + operator: Principal, + token_identifier: TokenIdentifier, + ) -> Result { + todo!() + } + + fn set_approval_for_all(operator: Principal, approved: bool) -> Result { + todo!() + } + + fn is_approved_for_all(owner: Principal, operator: Principal) -> Result { + todo!() + } + + fn transfer_from( + owner: Principal, + to: Principal, + token_identifier: TokenIdentifier, + ) -> Result { + todo!() + } + + fn mint( + to: Principal, + token_identifier: TokenIdentifier, + properties: Vec<(String, GenericValue)>, + ) -> Result { + todo!() + } + + fn burn(token_identifier: TokenIdentifier) -> Result { + todo!() + } + + fn transaction(tx_id: candid::Nat) -> Result, NftError> { + todo!() + } + + fn total_transactions() -> candid::Nat { + TxHistory::count().into() + } +}