Meme Awards 2018 Crypto Collectibles ERC721 Free Airdrop
OMG! For the next 30 days anyone with a few cents worth of ETH in their wallets (to cover tx fees) can claim their very own unique and tradable crypto collectible meme trading card that will probably be used in a small Ethereum based minigame in the near future.
Notice the emphasis on the word “probably”? It means I will most likely do it, but judging how long it took to develop such a simple token airdrop DApp, I’m not overly confident in announcing these types of things any more.
So what is all this?
For those of you who just want the tldr; version of it, well, basically I saw PewDiePie’s Meme Awards 2018 video on new year’s eve and it gave me a brilliant idea. Almost as brilliant as the Bitconnect scam video from February ;)
It took me 2 weeks, but I ended up with a DApp that first checks if you’re subscribed to PewDiePie (naturally) and then lets you claim a free randomly chosen ERC721 crypto token in the form of a special limited edition Meme Awards 2018 trading card.
I said limited edition because the smart contract is built in a way which will block the minting of new tokens after 30 days have passed since its deployment on the MainNet. After that period the total supply of every token will be final.
Consider this my late new year’s gift to you. Maybe in the distant future you can sell it for a fortune on a decentralized marketplace. Who knows, right?
Official Airdrop page: Meme Awards 2018
- The DApp first checks if you have an active subscription to PewDiePie’s Youtube channel. Go subscribe right now if you haven’t yet. There is no other way around it. (devs, shush!)
- Then it will check whether or not you’re connected to an Ethereum node through a Web3 provider. I recommend getting MetaMask, it works flawlessly on up to date Chrome browsers.
- Finally you are presented with a Claim Meme button which will ask you to send a transaction to the Ethereum blockchain. What this does is it tells the smart contract behind Meme Awards to assign a randomly picked trading card to your address.
Note: If you’re not familiar how the Ethereum network works, it basically asks you to send a small amount of ETH (roughly $0.03USD) as fee for the miners that confirm transactions that happen on the blockchain.
None of that money is sent to me, trust me. This is just how the platform works for now. It could be that in the future we can pay the fees in, say, BrofistCoin, but for the time being it is how it is.
I might be persuaded into sending some ETH your way if you choose to promote the airdrop and this article like a crazy person. I don’t guarantee anything, but I might consider it.
After the transaction is confirmed on the blockchain (it can take a minute or two) you will be given your epic style meme trading card. Refresh the window if you don’t see your card.
You cannot claim a new one to the same address, but there’s nothing I can do to stop you from claiming again with a different address.
Here’s the card I got:
I’m not too happy about it… I kind of wanted either Yobama or Bowsette. They’re cool. Or maybe even Bitch Lasagna, that would have been epic.
I can’t wait to hear which card you got!
If you get a Bitch Lasagna card I will trade you my Don’t say the N-word card for sure. Hell, I’ll even pay extra. Name your price boi!
You can read more about Web3 here, but to put it short Web3 is the next generation of internet where data is not stored in centralized servers, money is not transferred through a centralized 3rd party and memes, of course, can live freely without having to worry about getting banned.
Everything from Youtube videos to controversial memes will eventually live on decentralized or partly decentralized platforms. That means there will be no central authority to dictate how you share your data.
I’m totally sold for Web3. I want it right here right now. Today. Unfortunately it will take at least 5 more years until the public will start to notice this quiet revolution. Hell, if we do it right, the public won’t even know the difference.
The Web3 as it is today is still slow and buggy, but as systems mature and documentation is made more readily available, It’s only a matter of time when we will start seeing businesses who wants to stay relevant to take the decentralized path.
Some of the more notable mainstream-friendly projects include the Opera’s new Web3 ready browser for Android devices, the Brave browser which blocks all ads by default and instead lets you reward the websites and authors you genuinely enjoy with the Basic Attention Token, the Global Upload platform that transports your files to the permanent web and PeepEth- the decentralized “Twitter” that promotes meaningful conversations and not senseless drama or clickbait.
The why and the how (sort of)
This is not going to be a tutorial type of read. I’ll just write whatever comes to mind looking back at the whole process. A fair warning to you- it’s probably boring unless you’re a developer like me who is struggling to understand it all.
I knew I had been slacking off way too much over the last few months so I decided it’s about time to learn how to develop my first real DApp. Not some crappy copy and paste DApp like I have done before here and here, but something more unique. Something a little bit more challenging.
Some of you may be aware that I’m working on a memes related trading cards game. I have to admit, it’s not going very well. I thought it would be simple, but man, when you really start to dive into it, you’ll realize just how far the rabbit hole of Ethereum goes.
So instead of focusing on that card game, I thought I should first retrace my steps and back up a little. For one, I didn’t even fully understand the concept behind an ERC721 token. An ERC20 is simple in comparison, but a unique and identifiable non fungible token is something else.
Looking back at it now the process is fairly straightforward and I only ended up doing some minor adjustments to the Meme Awards custom NFT implementation, but it took a lot of trial and error. Thankfully we have Remix and testnets for that.
What I got wrong
The first “official” implementation that I thought would do just fine ended up being a huge Gas waster as I kept all of the token’s metadata inside a Struct on the contract itself. Eww! I later learned that this is absolutely not the way to do it.
Instead I put all of the metadata inside a .json file hosted externally (we can later change the reference to an IPFS resource) which will get called by the tokenURI(); function in the contract as recommended in the finalized ERC721 EIP.
Immediately the Gas costs dropped. If I’m not mistaken the fiat value dropped from $0.17 to $0.03. I might be lying right now, I don’t really remember. I was too hyped to see just how much more efficient this new approach was.
I don’t want to point any fingers, but if you want to make a working and valid ERC721 token then don’t follow the CryptoZombies implementation. It’s simply outdated at the time of writing this.
Now this does not mean I know what I’m talking about. I understand the concept behind ERC721 fully, but I have only just begun to research all the potential security vulnerabilities a rookie developer like me can and will write into their smart contracts.
Like I said, the rabbit hole just keeps going and going.
The ERC721 was the easy part
It took me a week, but I finally managed to pull off an implementation that passes the ERC721 validator with flying colors.
Little did I know that the hard part was building a functional front-end for the smart contract so that people could actually claim their airdrops.
Now you can still claim it the old fashioned way by calling the function claimMeme(); with no arguments, but I really wanted to take it a step further from how the BrofistCoin was airdropped and make it more user friendly-ish.
For example it took me half a day to realize that FireFox wants you to explicitly pass events as the function parameter while Chrome doesn’t seem to care.
To be honest I’m still not quite sure I got everything right. So if you’ve made it this far, perhaps you’d be willing to check out my code and let me know if you find anything odd about it.
Well that wasn’t THAT long, was it?
I don’t think I’ve ever written anything like this here before. All I do is rant about LWIAY winners and more than half of them don’t ever claim their winnings.
Free BrofistCoin for me? Nah. One day they will open their eyes to the truth and come a runnin’ and I’ll be waiting for ’em. It’s all good man. (really good tv show btw, if you got the reference).
If you have won a previous LWIAY episode and haven’t yet claimed your reward, let me know and we’ll figure it out.