diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index eeb0dde7..938fea8d 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -7,7 +7,7 @@ const deployedContracts = { devnet: { YourCollectible: { address: - "0x418f946934444bc3281c8dc919d1d636e64cccb9489600dc26c61cc1a714145", + "0x6cb253ed1b42f3d9103b71c91232d8fc1e9155696ad237fed6350166f4bc659", abi: [ { type: "impl", @@ -74,135 +74,8 @@ const deployedContracts = { }, { type: "impl", - name: "WrappedIERC721MetadataImpl", - interface_name: - "openzeppelin::token::erc721::interface::IERC721Metadata", - }, - { - type: "interface", - name: "openzeppelin::token::erc721::interface::IERC721Metadata", - items: [ - { - type: "function", - name: "name", - inputs: [], - outputs: [ - { - type: "core::byte_array::ByteArray", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "symbol", - inputs: [], - outputs: [ - { - type: "core::byte_array::ByteArray", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "token_uri", - inputs: [ - { - name: "token_id", - type: "core::integer::u256", - }, - ], - outputs: [ - { - type: "core::byte_array::ByteArray", - }, - ], - state_mutability: "view", - }, - ], - }, - { - type: "impl", - name: "OwnableImpl", - interface_name: "openzeppelin::access::ownable::interface::IOwnable", - }, - { - type: "interface", - name: "openzeppelin::access::ownable::interface::IOwnable", - items: [ - { - type: "function", - name: "owner", - inputs: [], - outputs: [ - { - type: "core::starknet::contract_address::ContractAddress", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "transfer_ownership", - inputs: [ - { - name: "new_owner", - type: "core::starknet::contract_address::ContractAddress", - }, - ], - outputs: [], - state_mutability: "external", - }, - { - type: "function", - name: "renounce_ownership", - inputs: [], - outputs: [], - state_mutability: "external", - }, - ], - }, - { - type: "impl", - name: "CounterImpl", - interface_name: "contracts::components::Counter::ICounter", - }, - { - type: "interface", - name: "contracts::components::Counter::ICounter", - items: [ - { - type: "function", - name: "current", - inputs: [], - outputs: [ - { - type: "core::integer::u256", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "increment", - inputs: [], - outputs: [], - state_mutability: "external", - }, - { - type: "function", - name: "decrement", - inputs: [], - outputs: [], - state_mutability: "external", - }, - ], - }, - { - type: "impl", - name: "ERC721Impl", - interface_name: "openzeppelin::token::erc721::interface::IERC721", + name: "CustomIERC721Impl", + interface_name: "openzeppelin::token::erc721::interface::ERC721ABI", }, { type: "struct", @@ -230,7 +103,7 @@ const deployedContracts = { }, { type: "interface", - name: "openzeppelin::token::erc721::interface::IERC721", + name: "openzeppelin::token::erc721::interface::ERC721ABI", items: [ { type: "function", @@ -376,97 +249,372 @@ const deployedContracts = { ], state_mutability: "view", }, - ], - }, - { - type: "impl", - name: "ERC721EnumerableImpl", - interface_name: - "contracts::components::ERC721Enumerable::IERC721Enumerable", - }, - { - type: "interface", - name: "contracts::components::ERC721Enumerable::IERC721Enumerable", - items: [ { type: "function", - name: "token_of_owner_by_index", + name: "supports_interface", inputs: [ { - name: "owner", - type: "core::starknet::contract_address::ContractAddress", - }, - { - name: "index", - type: "core::integer::u256", + name: "interface_id", + type: "core::felt252", }, ], outputs: [ { - type: "core::integer::u256", + type: "core::bool", }, ], state_mutability: "view", }, { type: "function", - name: "total_supply", + name: "name", inputs: [], outputs: [ { - type: "core::integer::u256", + type: "core::byte_array::ByteArray", }, ], state_mutability: "view", }, - ], - }, - { - type: "constructor", - name: "constructor", - inputs: [ - { - name: "owner", - type: "core::starknet::contract_address::ContractAddress", - }, - ], - }, - { - type: "event", - name: "openzeppelin::token::erc721::erc721::ERC721Component::Transfer", - kind: "struct", - members: [ { - name: "from", - type: "core::starknet::contract_address::ContractAddress", - kind: "key", + type: "function", + name: "symbol", + inputs: [], + outputs: [ + { + type: "core::byte_array::ByteArray", + }, + ], + state_mutability: "view", }, { - name: "to", - type: "core::starknet::contract_address::ContractAddress", - kind: "key", + type: "function", + name: "token_uri", + inputs: [ + { + name: "token_id", + type: "core::integer::u256", + }, + ], + outputs: [ + { + type: "core::byte_array::ByteArray", + }, + ], + state_mutability: "view", }, { - name: "token_id", - type: "core::integer::u256", - kind: "key", + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [ + { + type: "core::integer::u256", + }, + ], + state_mutability: "view", }, - ], - }, - { - type: "event", - name: "openzeppelin::token::erc721::erc721::ERC721Component::Approval", - kind: "struct", - members: [ { - name: "owner", - type: "core::starknet::contract_address::ContractAddress", - kind: "key", + type: "function", + name: "ownerOf", + inputs: [ + { + name: "tokenId", + type: "core::integer::u256", + }, + ], + outputs: [ + { + type: "core::starknet::contract_address::ContractAddress", + }, + ], + state_mutability: "view", }, { - name: "approved", - type: "core::starknet::contract_address::ContractAddress", - kind: "key", + type: "function", + name: "safeTransferFrom", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "tokenId", + type: "core::integer::u256", + }, + { + name: "data", + type: "core::array::Span::", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "tokenId", + type: "core::integer::u256", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "setApprovalForAll", + inputs: [ + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "approved", + type: "core::bool", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "getApproved", + inputs: [ + { + name: "tokenId", + type: "core::integer::u256", + }, + ], + outputs: [ + { + type: "core::starknet::contract_address::ContractAddress", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "isApprovedForAll", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [ + { + type: "core::bool", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "tokenURI", + inputs: [ + { + name: "tokenId", + type: "core::integer::u256", + }, + ], + outputs: [ + { + type: "core::byte_array::ByteArray", + }, + ], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "OwnableImpl", + interface_name: "openzeppelin::access::ownable::interface::IOwnable", + }, + { + type: "interface", + name: "openzeppelin::access::ownable::interface::IOwnable", + items: [ + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + type: "core::starknet::contract_address::ContractAddress", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "transfer_ownership", + inputs: [ + { + name: "new_owner", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "renounce_ownership", + inputs: [], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "CounterImpl", + interface_name: "contracts::components::Counter::ICounter", + }, + { + type: "interface", + name: "contracts::components::Counter::ICounter", + items: [ + { + type: "function", + name: "current", + inputs: [], + outputs: [ + { + type: "core::integer::u256", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "increment", + inputs: [], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "decrement", + inputs: [], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "ERC721EnumerableImpl", + interface_name: + "contracts::components::ERC721Enumerable::IERC721Enumerable", + }, + { + type: "interface", + name: "contracts::components::ERC721Enumerable::IERC721Enumerable", + items: [ + { + type: "function", + name: "token_of_owner_by_index", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "index", + type: "core::integer::u256", + }, + ], + outputs: [ + { + type: "core::integer::u256", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "total_supply", + inputs: [], + outputs: [ + { + type: "core::integer::u256", + }, + ], + state_mutability: "view", + }, + ], + }, + { + type: "constructor", + name: "constructor", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Transfer", + kind: "struct", + members: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "token_id", + type: "core::integer::u256", + kind: "key", + }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Approval", + kind: "struct", + members: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "approved", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", }, { name: "token_id", @@ -622,13 +770,13 @@ const deployedContracts = { }, ], classHash: - "0x527200e23a98acbca6116d4ce2366fe27199f78c146fefc921ec9a2c0d77dc", + "0x14720f262181b60f78424d11992dea27f1f93d5b392a0c14017c7b03e0dd66b", }, }, sepolia: { YourCollectible: { address: - "0x45305e8c94f02c8ade9c6df459a1c84e98bbbf2ba9d0ad7047652c310d9f5e8", + "0x685661e5e001915e784beee39530d2d8c59341500e365e26e9fb34b7db0f26a", abi: [ { type: "impl", @@ -695,167 +843,238 @@ const deployedContracts = { }, { type: "impl", - name: "WrappedIERC721MetadataImpl", - interface_name: - "openzeppelin::token::erc721::interface::IERC721Metadata", + name: "CustomIERC721Impl", + interface_name: "openzeppelin::token::erc721::interface::ERC721ABI", }, { - type: "interface", - name: "openzeppelin::token::erc721::interface::IERC721Metadata", - items: [ + type: "struct", + name: "core::array::Span::", + members: [ { - type: "function", - name: "name", - inputs: [], + name: "snapshot", + type: "@core::array::Array::", + }, + ], + }, + { + type: "enum", + name: "core::bool", + variants: [ + { + name: "False", + type: "()", + }, + { + name: "True", + type: "()", + }, + ], + }, + { + type: "interface", + name: "openzeppelin::token::erc721::interface::ERC721ABI", + items: [ + { + type: "function", + name: "balance_of", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], outputs: [ { - type: "core::byte_array::ByteArray", + type: "core::integer::u256", }, ], state_mutability: "view", }, { type: "function", - name: "symbol", - inputs: [], + name: "owner_of", + inputs: [ + { + name: "token_id", + type: "core::integer::u256", + }, + ], outputs: [ { - type: "core::byte_array::ByteArray", + type: "core::starknet::contract_address::ContractAddress", }, ], state_mutability: "view", }, { type: "function", - name: "token_uri", + name: "safe_transfer_from", inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, { name: "token_id", type: "core::integer::u256", }, - ], - outputs: [ { - type: "core::byte_array::ByteArray", + name: "data", + type: "core::array::Span::", }, ], - state_mutability: "view", + outputs: [], + state_mutability: "external", }, - ], - }, - { - type: "impl", - name: "OwnableImpl", - interface_name: "openzeppelin::access::ownable::interface::IOwnable", - }, - { - type: "interface", - name: "openzeppelin::access::ownable::interface::IOwnable", - items: [ { type: "function", - name: "owner", - inputs: [], - outputs: [ + name: "transfer_from", + inputs: [ { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", type: "core::starknet::contract_address::ContractAddress", }, + { + name: "token_id", + type: "core::integer::u256", + }, ], - state_mutability: "view", + outputs: [], + state_mutability: "external", }, { type: "function", - name: "transfer_ownership", + name: "approve", inputs: [ { - name: "new_owner", + name: "to", type: "core::starknet::contract_address::ContractAddress", }, + { + name: "token_id", + type: "core::integer::u256", + }, ], outputs: [], state_mutability: "external", }, { type: "function", - name: "renounce_ownership", - inputs: [], + name: "set_approval_for_all", + inputs: [ + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "approved", + type: "core::bool", + }, + ], outputs: [], state_mutability: "external", }, - ], - }, - { - type: "impl", - name: "CounterImpl", - interface_name: "contracts::components::Counter::ICounter", - }, - { - type: "interface", - name: "contracts::components::Counter::ICounter", - items: [ { type: "function", - name: "current", - inputs: [], - outputs: [ + name: "get_approved", + inputs: [ { + name: "token_id", type: "core::integer::u256", }, ], + outputs: [ + { + type: "core::starknet::contract_address::ContractAddress", + }, + ], state_mutability: "view", }, { type: "function", - name: "increment", - inputs: [], - outputs: [], - state_mutability: "external", + name: "is_approved_for_all", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [ + { + type: "core::bool", + }, + ], + state_mutability: "view", }, { type: "function", - name: "decrement", - inputs: [], - outputs: [], - state_mutability: "external", + name: "supports_interface", + inputs: [ + { + name: "interface_id", + type: "core::felt252", + }, + ], + outputs: [ + { + type: "core::bool", + }, + ], + state_mutability: "view", }, - ], - }, - { - type: "impl", - name: "ERC721Impl", - interface_name: "openzeppelin::token::erc721::interface::IERC721", - }, - { - type: "struct", - name: "core::array::Span::", - members: [ { - name: "snapshot", - type: "@core::array::Array::", + type: "function", + name: "name", + inputs: [], + outputs: [ + { + type: "core::byte_array::ByteArray", + }, + ], + state_mutability: "view", }, - ], - }, - { - type: "enum", - name: "core::bool", - variants: [ { - name: "False", - type: "()", + type: "function", + name: "symbol", + inputs: [], + outputs: [ + { + type: "core::byte_array::ByteArray", + }, + ], + state_mutability: "view", }, { - name: "True", - type: "()", + type: "function", + name: "token_uri", + inputs: [ + { + name: "token_id", + type: "core::integer::u256", + }, + ], + outputs: [ + { + type: "core::byte_array::ByteArray", + }, + ], + state_mutability: "view", }, - ], - }, - { - type: "interface", - name: "openzeppelin::token::erc721::interface::IERC721", - items: [ { type: "function", - name: "balance_of", + name: "balanceOf", inputs: [ { name: "account", @@ -871,10 +1090,10 @@ const deployedContracts = { }, { type: "function", - name: "owner_of", + name: "ownerOf", inputs: [ { - name: "token_id", + name: "tokenId", type: "core::integer::u256", }, ], @@ -887,7 +1106,7 @@ const deployedContracts = { }, { type: "function", - name: "safe_transfer_from", + name: "safeTransferFrom", inputs: [ { name: "from", @@ -898,7 +1117,7 @@ const deployedContracts = { type: "core::starknet::contract_address::ContractAddress", }, { - name: "token_id", + name: "tokenId", type: "core::integer::u256", }, { @@ -911,7 +1130,7 @@ const deployedContracts = { }, { type: "function", - name: "transfer_from", + name: "transferFrom", inputs: [ { name: "from", @@ -922,7 +1141,7 @@ const deployedContracts = { type: "core::starknet::contract_address::ContractAddress", }, { - name: "token_id", + name: "tokenId", type: "core::integer::u256", }, ], @@ -931,15 +1150,15 @@ const deployedContracts = { }, { type: "function", - name: "approve", + name: "setApprovalForAll", inputs: [ { - name: "to", + name: "operator", type: "core::starknet::contract_address::ContractAddress", }, { - name: "token_id", - type: "core::integer::u256", + name: "approved", + type: "core::bool", }, ], outputs: [], @@ -947,56 +1166,133 @@ const deployedContracts = { }, { type: "function", - name: "set_approval_for_all", + name: "getApproved", inputs: [ + { + name: "tokenId", + type: "core::integer::u256", + }, + ], + outputs: [ + { + type: "core::starknet::contract_address::ContractAddress", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "isApprovedForAll", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, { name: "operator", type: "core::starknet::contract_address::ContractAddress", }, + ], + outputs: [ { - name: "approved", type: "core::bool", }, ], - outputs: [], - state_mutability: "external", + state_mutability: "view", }, { type: "function", - name: "get_approved", + name: "tokenURI", inputs: [ { - name: "token_id", + name: "tokenId", type: "core::integer::u256", }, ], outputs: [ { - type: "core::starknet::contract_address::ContractAddress", + type: "core::byte_array::ByteArray", }, ], state_mutability: "view", }, + ], + }, + { + type: "impl", + name: "OwnableImpl", + interface_name: "openzeppelin::access::ownable::interface::IOwnable", + }, + { + type: "interface", + name: "openzeppelin::access::ownable::interface::IOwnable", + items: [ { type: "function", - name: "is_approved_for_all", - inputs: [ + name: "owner", + inputs: [], + outputs: [ { - name: "owner", type: "core::starknet::contract_address::ContractAddress", }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "transfer_ownership", + inputs: [ { - name: "operator", + name: "new_owner", type: "core::starknet::contract_address::ContractAddress", }, ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "renounce_ownership", + inputs: [], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "CounterImpl", + interface_name: "contracts::components::Counter::ICounter", + }, + { + type: "interface", + name: "contracts::components::Counter::ICounter", + items: [ + { + type: "function", + name: "current", + inputs: [], outputs: [ { - type: "core::bool", + type: "core::integer::u256", }, ], state_mutability: "view", }, + { + type: "function", + name: "increment", + inputs: [], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "decrement", + inputs: [], + outputs: [], + state_mutability: "external", + }, ], }, { @@ -1243,7 +1539,7 @@ const deployedContracts = { }, ], classHash: - "0x604a5408288ed85d4220cfa7bddf6db718feec9f79455e7391ea81c063023f5", + "0x14720f262181b60f78424d11992dea27f1f93d5b392a0c14017c7b03e0dd66b", }, }, } as const; diff --git a/packages/nextjs/scaffold.config.ts b/packages/nextjs/scaffold.config.ts index ee79a8fc..fac39e12 100644 --- a/packages/nextjs/scaffold.config.ts +++ b/packages/nextjs/scaffold.config.ts @@ -9,7 +9,7 @@ export type ScaffoldConfig = { }; const scaffoldConfig = { - targetNetworks: [chains.devnet], + targetNetworks: [chains.sepolia], // Only show the Burner Wallet when running on devnet onlyLocalBurnerWallet: false, rpcProviderUrl: process.env.NEXT_PUBLIC_PROVIDER_URL || "", diff --git a/packages/snfoundry/contracts/src/YourCollectible.cairo b/packages/snfoundry/contracts/src/YourCollectible.cairo index ec14a9c2..5a58f3da 100644 --- a/packages/snfoundry/contracts/src/YourCollectible.cairo +++ b/packages/snfoundry/contracts/src/YourCollectible.cairo @@ -13,7 +13,7 @@ mod YourCollectible { use openzeppelin::access::ownable::OwnableComponent; use openzeppelin::introspection::src5::SRC5Component; - use openzeppelin::token::erc721::{ERC721Component, interface::{IERC721Metadata}}; + use openzeppelin::token::erc721::{ERC721Component, interface::{ERC721ABI}}; use super::{IYourCollectible, ContractAddress}; @@ -28,8 +28,6 @@ mod YourCollectible { #[abi(embed_v0)] impl CounterImpl = CounterComponent::CounterImpl; #[abi(embed_v0)] - impl ERC721Impl = ERC721Component::ERC721Impl; - #[abi(embed_v0)] impl ERC721EnumerableImpl = ERC721EnumerableComponent::ERC721EnumerableImpl; @@ -91,7 +89,7 @@ mod YourCollectible { } #[abi(embed_v0)] - impl WrappedIERC721MetadataImpl of IERC721Metadata { + impl CustomIERC721Impl of ERC721ABI { // Override token_uri to use the internal ERC721URIStorage _token_uri function fn token_uri(self: @ContractState, token_id: u256) -> ByteArray { self._token_uri(token_id) @@ -102,6 +100,79 @@ mod YourCollectible { fn symbol(self: @ContractState) -> ByteArray { self.erc721.symbol() } + fn balance_of(self: @ContractState, account: ContractAddress) -> u256 { + self.erc721.balance_of(account) + } + fn owner_of(self: @ContractState, token_id: u256) -> ContractAddress { + self.erc721.owner_of(token_id) + } + fn safe_transfer_from( + ref self: ContractState, + from: ContractAddress, + to: ContractAddress, + token_id: u256, + data: Span + ) { + self.erc721.safe_transfer_from(from, to, token_id, data) + } + fn transfer_from( + ref self: ContractState, from: ContractAddress, to: ContractAddress, token_id: u256 + ) { + self.erc721.transfer_from(from, to, token_id) + } + fn approve(ref self: ContractState, to: ContractAddress, token_id: u256) { + self.erc721.approve(to, token_id) + } + fn set_approval_for_all( + ref self: ContractState, operator: ContractAddress, approved: bool + ) { + self.erc721.set_approval_for_all(operator, approved) + } + fn get_approved(self: @ContractState, token_id: u256) -> ContractAddress { + self.erc721.get_approved(token_id) + } + fn is_approved_for_all( + self: @ContractState, owner: ContractAddress, operator: ContractAddress + ) -> bool { + self.erc721.is_approved_for_all(owner, operator) + } + fn balanceOf(self: @ContractState, account: ContractAddress) -> u256 { + self.erc721.balance_of(account) + } + fn ownerOf(self: @ContractState, tokenId: u256) -> ContractAddress { + self.erc721.owner_of(tokenId) + } + fn safeTransferFrom( + ref self: ContractState, + from: ContractAddress, + to: ContractAddress, + tokenId: u256, + data: Span + ) { + self.erc721.safe_transfer_from(from, to, tokenId, data) + } + fn transferFrom( + ref self: ContractState, from: ContractAddress, to: ContractAddress, tokenId: u256 + ) { + self.erc721.transfer_from(from, to, tokenId) + } + fn setApprovalForAll(ref self: ContractState, operator: ContractAddress, approved: bool) { + self.erc721.set_approval_for_all(operator, approved) + } + fn getApproved(self: @ContractState, tokenId: u256) -> ContractAddress { + self.erc721.get_approved(tokenId) + } + fn isApprovedForAll( + self: @ContractState, owner: ContractAddress, operator: ContractAddress + ) -> bool { + self.erc721.is_approved_for_all(owner, operator) + } + fn tokenURI(self: @ContractState, tokenId: u256) -> ByteArray { + self.token_uri(tokenId) + } + fn supports_interface(self: @ContractState, interface_id: felt252) -> bool { + self.erc721.supports_interface(interface_id) + } } #[generate_trait]