Instructions
If you have any questions, head to the Discord! Rinkeby deployment is currently enabled for testing out projects before deployment! Scroll down to see the tools. We are continously improving the tools and the smart contract, so stay tuned on Twitter and Discord for updates.
Rinkeby Deployment Instructions
- First, switch to Rinkeby! You'll need some Rinkeby ether, which you can get from this faucet
- Next, click Deploy Proxy. Once this finishes, the Contract Address input will be filled with the address of the contract you deployed. If not, you can fill it in manually.
- You'll want to set all the initialization fields, and then click Initialize
- Next, you'll want to fill in the art code and the art description. A preview of the art will show in the frame to the right. See more about art code, and an example, in the Art Code Guidelines section
- Once that is done, click, approve, and wait for the transactions for each of Set Art Info, Seal Art, Set Token URI, and Unpause Minting. Then you can head to the Testing section below to see how to verify that everything is working.
- 🚨Setting the art code via Set Art Info is a very expensive step, which is why it is so important to test thoroughly. Currently, it costs around $140 per kb of Javascript code. WALTZ is around 5kb, and cost about $800 to upload. We are actively working on solving this problem via contracts that are zero-risk for both the artist and buyers.🚨
Art Code Guidelines
- Your p5js code should use Helper.seed to get the seed. And your code should use Helper.setMetadata?.(<propertyName>, <propertyValue>)) with the question mark, to set traits. A good way to get an integer from the seed is const masterSeed = Number(BigInt(Helper.seed) % BigInt("9007199254740991")
- You can set which frame is used as a preview by calling Helper.setPreviewFrame?.(<frameNum>) in setup. By default, the 60th frame is used as the preview image. frameNum, if set, must be between 0 and 300.
- See the p5js code used for the TestSquares project here
- Only p5js@1.4.0 is allowed, any external resource access will not work.
Testing Your Contract
- Once your Rinkeby contract is deployed, you can test it. Here are some things to test
- First, you will want to head to art.sunflower.industries/project/<contractAddress>. This should show the minting page for your token, and you should be able to mint token #0. Once that is done, you can check the things below.
- Head to art-sandbox-rinkeby.sunflower.industries/tokenFrame/<contractAddress>/0. Your art should fill the whole window, and the token should be consistent across refreshes when the token ID is the same. Your art should also resize when the window is resized. Make sure that this works on Windows, Mac, iOS, and Android across Chrome, Safari, and Edge, etc.
- Head to art-sandbox-rinkeby.sunflower.industries/render/tokenImage/<contractAddress>/0. This should display a preview image of your token.
- Head to art-sandbox-rinkeby.sunflower.industries/render/tokenProperties/<contractAddress>/0. You should see any properties you set.
- Head to art-sandbox-rinkeby.sunflower.industries/token/<contractAddress>/0. You should see the JSON that OpenSea and other platforms will use to display your token.
- Test OpenSea! Go to OpenSea testnets and add your contract, and make sure everything is working and displaying correctly.
Deploying on Mainnet
- For each of the deployment steps top Rinkeby, a hash shows up. Record each of these hashes when deploying to Rinkeby. Then, switch to mainnet and follow the same process again. If the hashes for each step match, that means that you are sending the exact same data to mainnet as you did during testing.
- DM us on Discord so we can double check everything, or if you need help.
Initialize Contract
Name
Name of your collection
Symbol
Symbol for your token, keep it 5 characters or less
Max Tokens
Size of the collection
Token Price in ETH
Either this or Artist Token Royalty must be set to 0. This is the price per token at minting time, in ETH (not wei). We encourage you to do a free mint (price 0) and take a stake via Artist Token Royalty
Artist Address
Address which will receive proceeds from the mint
Artist Token Royalty
Either this or token price must be set to 0. If nonzero, you will receive a portion of the total minted tokens. For example, if you set this to 14, every 14th token will belong to you (~7%). If you set this, we strongly recommend setting the volume royalty on OpenSea to 0. Cannot be a multiple of 31.
Initialize Contract
Set and Seal Art Info
P5JS Code
Code that produces the art using p5js@1.4.0. It will automatically be minified. You can see a preview in the frame above!
Description
Description of your artwork
Set Art Info
Seal Art