> For the complete documentation index, see [llms.txt](https://contract-wizard.gitbook.io/contract-wizard/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://contract-wizard.gitbook.io/contract-wizard/create/smart-contracts/the-code/721j-code.md).

# 721J Code

The code for ERC721J.sol can be read [here.](https://github.com/jasondesante/721J-Token/blob/master/721J%20Contracts/ERC721J.sol)

{% embed url="<https://github.com/jasondesante/721J-Token/blob/master/721J%20Contracts/ERC721J.sol>" %}

## Events

There are 10 new events in ERC721J.sol and 3 events imported from interfaces, making 13 total:

* **Copy** - from [IERC721J](/contract-wizard/create/smart-contracts/interface-contracts/ierc721j.sol.md#new-event)
* **Recycle** - from [IERC721JFull](/contract-wizard/create/smart-contracts/interface-contracts/ierc721jfull.sol.md#new-event)
* **SetPromo** - from [IERC721JPromo](/contract-wizard/create/smart-contracts/interface-contracts/ierc721jpromo.sol.md#new-event)
* ***TokenPriceSet*** - Emits when a price changes for an ERC20 token.
* ***TogglePublic*** - Emits when a tokenId is staked or unstaked.
* ***NewSongURI*** - Emits when a piece of song metadata is added or changed.
* ***NewMax*** - Emits when setMaxEditions is called to change the max supply of copies for a song.
* ***NewSplit*** - Emits when a split address is set to a song.
* ***NewMultiplier*** - Emits when setRarityMultiplier is called and a generation's rarity multiplier is updated.
* ***BaseURIChange*** - Emits when setBaseURI is called and the baseURI is changed.
* ***ContractURIChange*** - Emits when setContractURI is called and the contractURI is changed.
* ***NameChange*** - Emits when setName is called and the contract name is changed.
* ***SymbolChange*** - Emits when setSymbol is called and the symbol is changed.
* **Transfer** - from [IERC721](https://contract-wizard.gitbook.io/contract-wizard/create/smart-contracts/the-code/pages/w3oYNs6KcAnNIlIlA3aj#ierc721.sol)
* **Approval** - from [IERC721](https://contract-wizard.gitbook.io/contract-wizard/create/smart-contracts/the-code/pages/w3oYNs6KcAnNIlIlA3aj#ierc721.sol)
* **ApprovalForAll** - from [IERC721](https://contract-wizard.gitbook.io/contract-wizard/create/smart-contracts/the-code/pages/w3oYNs6KcAnNIlIlA3aj#ierc721.sol)

## Functions

There are lots of functions in ERC721J.sol. 72 public functions, and a bunch of private functions too! I'll do my best to organize the public functions in an understandable order here.

Functions are separated into categories because there are so many. Every function that isn't from an interface is properly noted.

### Categories

#### [Metadata Functions](/contract-wizard/create/smart-contracts/the-code/721j-code/metadata-functions.md)

There are 4 read and 5 write functions related to metadata. Read more [here.](/contract-wizard/create/smart-contracts/the-code/721j-code/metadata-functions.md)

#### [Minting Functions](/contract-wizard/create/smart-contracts/the-code/721j-code/minting-functions.md)

There are 10 write functions related to minting. Read more [here.](/contract-wizard/create/smart-contracts/the-code/721j-code/minting-functions.md)

#### [Feature Functions](/contract-wizard/create/smart-contracts/the-code/721j-code/feature-functions.md)

There are 7 features that have their 19 functions detailed [here.](/contract-wizard/create/smart-contracts/the-code/721j-code/feature-functions.md)

#### [Promo System Functions](/contract-wizard/create/smart-contracts/the-code/721j-code/promo-system-functions.md)

There are 4 read and 6 write functions related to the promo system. Read more [here.](/contract-wizard/create/smart-contracts/the-code/721j-code/promo-system-functions.md)

#### [Other Functions](/contract-wizard/create/smart-contracts/the-code/721j-code/other-functions.md)

The misfit unsorted functions that are still important. Read more [here.](/contract-wizard/create/smart-contracts/the-code/721j-code/other-functions.md)

## Imported Interface Contracts

All the imported interface contracts have their corresponding functions implemented into ERC721J.sol. The new interface contracts are:

* IERC721J - See functions [here.](/contract-wizard/create/smart-contracts/interface-contracts/ierc721j.sol.md)
* IERC721JEnumerable - See functions [here.](/contract-wizard/create/smart-contracts/interface-contracts/ierc721jenumerable.sol.md)
* IERC721JFull - See functions [here.](/contract-wizard/create/smart-contracts/interface-contracts/ierc721jfull.sol.md)
* IERC721JPromo - See functions [here.](/contract-wizard/create/smart-contracts/interface-contracts/ierc721jpromo.sol.md)

The interface contracts from existing standards are:

* IERC2981 - See function [here.](https://contract-wizard.gitbook.io/contract-wizard/create/smart-contracts/the-code/pages/w3oYNs6KcAnNIlIlA3aj#ierc2981.sol)
* IERC721 - See functions [here.](https://contract-wizard.gitbook.io/contract-wizard/create/smart-contracts/the-code/pages/w3oYNs6KcAnNIlIlA3aj#ierc721.sol)
* IERC721Metadata - See functions [here.](https://contract-wizard.gitbook.io/contract-wizard/create/smart-contracts/the-code/pages/w3oYNs6KcAnNIlIlA3aj#ierc721metadata.sol)
* IERC721Enumerable - See functions [here.](https://contract-wizard.gitbook.io/contract-wizard/create/smart-contracts/the-code/pages/w3oYNs6KcAnNIlIlA3aj#ierc721enumerable.sol)
* IERC165 - See function [here.](https://contract-wizard.gitbook.io/contract-wizard/create/smart-contracts/the-code/pages/w3oYNs6KcAnNIlIlA3aj#ierc165.sol)
