Skip to content

Commit

Permalink
fix impls
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-fleming committed Sep 19, 2023
1 parent 681ef1f commit 15217df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/modules/ROOT/pages/erc721.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Here’s what that looks like:
mod MyNFT {
use starknet::ContractAddress;
use openzeppelin::token::erc721::ERC721;
use openzeppelin::token::erc721::interface;
use openzeppelin::introspection::interface::ISRC5;
#[storage]
Expand Down Expand Up @@ -125,7 +126,7 @@ mod MyNFT {
/// Implement the standard IERC721 interface.
#[external(v0)]
impl MyTokenImpl of IERC721<ContractState> {
impl MyTokenImpl of interface::IERC721<ContractState> {
fn balance_of(self: @ContractState, account: ContractAddress) -> u256 {
let unsafe_state = ERC721::unsafe_new_contract_state();
ERC721::ERC721Impl::balance_of(@unsafe_state, account)
Expand All @@ -136,7 +137,7 @@ mod MyNFT {
/// Implement the IERC721Metadata interface.
#[external(v0)]
impl MyTokenMetadataImpl of IERC721Metadata<ContractState> {
impl MyTokenMetadataImpl of interface::IERC721Metadata<ContractState> {
fn name(self: @ContractState) -> felt252 {
let unsafe_state = ERC721::unsafe_new_contract_state();
ERC721::ERC721Impl::name(@unsafe_state)
Expand Down

0 comments on commit 15217df

Please sign in to comment.