> 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/contract-wizard-code.md).

# Contract Wizard Code

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

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

## Events

There are 2 events in ContractWizard.sol and 1 event from IContractWizard, making 3 total:

* **NewContract** - from [IContractWizard](/contract-wizard/create/smart-contracts/interface-contracts/icontractwizard.sol.md)
* ***TokenPriceSet*** - Emits when a price changes for an ERC20 token
* ***ContractURIChange*** - Emits when the contractURI is changed with setContractURI

## Functions

There are 16 public functions in the ContractWizard.sol contract. I will do my best to organize the public functions in an understandable order here.

### Public Write Functions

* ***ownerCreateClone*** - Lets the owner of the wizard create a clone for free.
* ***ownerAddContract*** - Lets the owner of the wizard add any contract to the library. This is a powerful tool that needs to be wielded carefully. Should only be used to add 721J compatible contracts.
* ***setContractURI*** - Sets the contractURI
* ***setMintPrice*** - Sets the mint price in ETH
* ***setTokenMintPrice*** - Sets the mint price for a particular ERC20 contract address
* ***withdraw*** - Withdraws the ETH that was sent to the contract

### From IContractWizard

#### Write Functions [here](/contract-wizard/create/smart-contracts/interface-contracts/icontractwizard.sol.md#write-functions)

* createClone
* createCloneToken

#### Read Functions [here](/contract-wizard/create/smart-contracts/interface-contracts/icontractwizard.sol.md#read-functions)

* contractURI
* contractByIndex
* inCollection
* name
* mintPrice
* tokenMintPrice
* totalSupply

### From IERC165

* supportsInterface - [here](https://contract-wizard.gitbook.io/contract-wizard/create/smart-contracts/the-code/pages/w3oYNs6KcAnNIlIlA3aj#ierc165.sol)
