# Yoki Origins - Contract Requirements ![yoki-logo](https://hackmd.io/_uploads/H1dbHndT6.jpg) In order to participate in Yoki Origins your NFT smart contract needs to follow certain rules. These rules are needed to smoothly integrate your contract in the minting process. Please join this [Telegram group](https://t.me/+Rv3f4GyE6JJjYTFk) if you need more clarifications. ## Smart Contract Requirements 1. Your smart contract must be deployed and verified Astar zkEVM mainnet. Use this [block Explorer](https://astar-zkevm.explorer.startale.com/stats). 1. Only verified contracts can be included in Yoki campaign. 1. Both ERC-721 or ERC-1155 contracts are acceptable. 1. Implement support for [Access Control](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol) library, since we will need you to grant MINTER_ROLE to the YokiDispatch contract address. See the addresses at the end of this doc. 1. Implement support for `tokenURI` or `uri()` [ERC721URIStorage](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721URIStorage.sol), since we will fetch the IPFS link to the image art. 1. The `mint()` function in your contract needs to look like (depending if it is payable or not): ```bash function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {} function mint(address to, uint256 amount) public payable onlyRole(MINTER_ROLE) {}  ``` 7. Some marketlaces require to have function `owner()` and event `OwnershipTransferred(address indexed previousOwner, address indexed newOwner)`. The easiest way for you is to implement [Ownable](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol). You will need it in order to claim the ownership, verify the contract with the marketplace and being able to fill out the collection information at the marketplace. 7. If you are preparing ERC1155, it is still recommended that you support `name()` and `symbol()`. Otherwise on the block explorer you will not see name and symbol 8. Use variable name `mintLimit` if you are limiting number of mints per wallet address. Make it public variable. 9. It's your projects duty to implement the function withdraw() in case you use the payable mint() function and you want to withdraw the funds after the project is completed." 10. Please make sure that function/variable `totalSupply()` is public. 11. Yoki frontend will have only one mint button for each project. If you are providing 5 images, the frontend can't know which token_id to use. It is entirely up to you how you want these 5 images to be minted. it can be sequential 1,2,3,4,5,1,2,3,4,5,1... or it can be random between 1-5. Pseudo random should be fine in this case as well. --- ## Testing your contract compatibility (still a Work in Progress) * We prepared a simple test template for you to use and check compatibility with Yoki Origins. It is a Foundry project. After you install Foundry, clone the repo, replace the template contract with you project and run the tests. More info in the [Yoki template test README](https://github.com/AstarNetwork/yoki-template-test) * You can test you contract and metadata on [Bluez testnet (zKyoto)](https://dev.bluez.app/?network=zkyoto) --- ## List your Collections on Marketplaces * [Dew](https://dew.gg/) * For Dew Collection listing/updates, you need to talk to Dew team directly. Connect with `@Akitogg` on the Telegram. * [Bluez](https://www.bluez.app/?network=astar-zkevm) * [Rarible marketplace](https://rarible.com/) * [Rarible Instructions](https://help.rarible.com/hc/en-us/articles/14370508618253-How-to-get-your-collection-verified) for verification --- ## Contract addresses ### M A I N N E T [YokiDispatch](https://astar-zkevm.explorer.startale.com/address/0xCB1095416b6A8e0C3ea39F8fe6Df84f4179C93C2?tab=contract) contract > 0xCB1095416b6A8e0C3ea39F8fe6Df84f4179C93C2 --- ## Usefull links * [Quick Start Astar docs](https://docs.astar.network/docs/build/zkEVM/quickstart) for RPC, block explorers, bridging assets... * [Bluez testnet](https://dev.bluez.app/) * [Telegram group for Yoki developers](https://t.me/+Rv3f4GyE6JJjYTFk) * Yoki English [site](https://yoki.astar.network/en) * Yoki Japanese [site](https://yoki.astar.network/ja) * Yoki Korean [site](https://yoki.astar.network/ko)