2021
Smart Contract and ERC-721 Non-fungible Token collection
Simple Message Interface:
Write a Message:
Which Message NFT, as in 1 or 235 :
Send an SVG Drawing (what's this?):
Note: drawings will over-write any text in a Message
Which Message NFT, as in 1 or 235 :
Direct Contract Interaction Guide:
You can also interact directly with the smart contract. Connect your MetaMask wallet and then call a function. When you're done, refresh the metadata on OpenSea or your market of choice and wait for the changes to appear.
There are owner and public versions of many functions. Only the token owner can call the owner functions. Anyone with an Ethereum wallet can call the public functions if the token owner has not disabled them.
ownerTogglePublicWrite
- tokenID: The message number you want to edit, ie: 3 or 223.
- toggle: False will turn off public writing and True will enable it.
WriteSingleLine
- tokenID: The message number you want to edit, ie: 3 or 223.
- message: Write your message here, the max length is about 30 characters. Try to avoid special characters like < and > as these will be interpreted as code and break the image of your Message. If this happens, just write a new simple message and refresh the metadata.
WriteTwoLines
- tokenID: The message number you want to edit, ie: 3 or 223.
- message: Type your two line message as:
["text on line one","text on line two"]
WriteMultiLines
- tokenID: The message number you want to edit, ie: 3 or 223.
- message: Type your five line message as
["text on line one","text on line two","text on line three","text on line four","text on line five"]
. If you want to leave some lines blank, you can enter " " and the line will be blank. Each line holds about 30 characters, or 4-5 words. When in doubt, use a new line. Remember, you are writing this data to the block chain, so the longer the message, the more gas.
upgradeMessage
- tokenID:The message number you own that you want to upgrade with a generative drawing, ie: 3 or 223.
You may have to edit the suggested gas limit up to 600,000 just to make sure it goes through. Most upgrades are in the 250k-400k used gas range, so you might want to wait for the cost of gas to be low.
WriteDrawing
- tokenID: The message number you want to edit, ie: 3 or 223.
- svgCommand: You can write SVG commands here and they will be displayed within the message. For example,
<circle cx="150" cy="200" r="90" fill="blue"/>
The WriteDrawing command will replace any previous text message.
You can download a template file for the ownerWriteDrawing and publicWriteDrawing areas. Just open these SVG files in a text editor like Sublime Text and enter your SVG code in the file where instructed. You can open the file in a web browser to preview how it looks.
If you want to insert complex artwork, I recommend using Inkscape, and saving your file as an "Optimized SVG" with significant digits set to 1 and all the shortening options on. Then you can open your SVG file in a text editor, and send everything between the <svg> and </svg> tags to the WriteDrawing function. I recommend keeping the complexity as low as possible, it's a game to see how small you can make your file size. A good goal is 2-3kb. I've sent drawings up to 10kb on the Rinkeby test network
If you want to experiment without spending ETH on gas fees, you can connect your MetaMask wallet to the Rinkeby test network and interact with the test network version of the contract and view the test-network OpenSea collection.