# IERC721 Interfaces

**URL:** https://forum.openzeppelin.com/t/ierc721-interfaces/5204
**Category:** Contracts
**Created:** [December 28, 2020, 11:33pm UTC](https://forum.openzeppelin.com/t/ierc721-interfaces/5204 "2020-12-28T23:33:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![JF0001](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@JF0001](https://forum.openzeppelin.com/u/JF0001)
#### Post date: [December 28, 2020, 11:33pm UTC](https://forum.openzeppelin.com/t/ierc721-interfaces/5204/1 "2020-12-28T23:33:36Z")

</div>

If I import the IERC721 Interfaces in my Smart Contract, do I need to define the signature of all the functions found in the said Interfaces in order for them to be available, or the simple import statement is sufficient?

Thank you J

---

<div class="post-metadata">

### Author: ![martriay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/martriay/32/20_2.png) [@martriay](https://forum.openzeppelin.com/u/martriay)
#### Post date: [December 29, 2020, 12:26am UTC](https://forum.openzeppelin.com/t/ierc721-interfaces/5204/2 "2020-12-29T00:26:55Z")

</div>

Importing it only brings it to context for solc to resolve references to it, for example you can use it to make calls from a contract that handles ERC721 without the contract being one nor implementing its functions.

If you’re inheriting from it (`Contract is IERC721`), then you have to either implement all of the functions in the interface or to [mark the contract as abstract](https://docs.soliditylang.org/en/v0.6.2/contracts.html#abstract-contracts).

---

<div class="post-metadata">

### Author: ![JF0001](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@JF0001](https://forum.openzeppelin.com/u/JF0001)
#### Post date: [December 29, 2020, 3:02am UTC](https://forum.openzeppelin.com/t/ierc721-interfaces/5204/3 "2020-12-29T03:02:26Z")

</div>

Thank you for your answer martriay!

---

<div class="post-metadata">

### Author: ![JF0001](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@JF0001](https://forum.openzeppelin.com/u/JF0001)
#### Post date: [December 29, 2020, 10:22pm UTC](https://forum.openzeppelin.com/t/ierc721-interfaces/5204/4 "2020-12-29T22:22:09Z")

</div>

Sorry martriay, I am still a little confused regarding Interfaces. When you mention “implement all of the functions in the interface”, do you mean actually defining their respective body? My intent, based on my understanding of interfaces, was to declare an Interface (with the Interface keyword), and include in the interface the signature of all the functions found in the interface in question as the following:

```auto
interface IERC721 {
      function balanceOf(address owner) external view returns (uint256 balance);
      // (list of all events and functions...)
      .
      .
      .
}

```

Is this how it should be done? Since I am already importing and inheriting the interface, shouldn’t all the functions from the interface be immediately available without having to enumerate them?

Thank you again. JF

---

<div class="post-metadata">

### Author: ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)
#### Post date: [December 31, 2020, 1:07am UTC](https://forum.openzeppelin.com/t/ierc721-interfaces/5204/5 "2020-12-31T01:07:36Z")

</div>

Hi @JF0001,

If you are trying to create your own ERC721, then you can inherit from IERC721 and implement all the functions or extend from OpenZeppelin Contracts ERC721 implementation.

See the documentation for details:

- [https://docs.openzeppelin.com/contracts/3.x/extending-contracts](https://docs.openzeppelin.com/contracts/3.x/extending-contracts)
- [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721)

If you are wanting to interact with an ERC721 from your contract, then you can create a variable of type IERC721 and call the functions in IERC721.

---

<div class="post-metadata">

### Author: ![JF0001](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@JF0001](https://forum.openzeppelin.com/u/JF0001)
#### Post date: [December 31, 2020, 1:58am UTC](https://forum.openzeppelin.com/t/ierc721-interfaces/5204/6 "2020-12-31T01:58:25Z")

</div>

Thank you @abcoathup.
