In this Open Kitchen article, we chat with our Lead Developer about our Smart Contract, and we introduce a very exciting facet — an upgradable contract. We’ll take a deeper look at what this means and why this unique choice is so exciting.
Here at Pieland HQ, we appieciate that some community members may be a bit intimidated or even disinterested in the intricate details of the coding side of NFT projects. However, we think it’s super impiertant to be transparent about this aspect of our project and explain what we have planned for our Smart Contract. We’ll start by quickly going over what a Smart Contract is and what it means for Pieland before jumping into some more in depth details. We also recommend this quick video guide if you are completely new to the concept of Smart Contracts or the NFT space in general.
Let’s get Smart
In a literal sense, a Smart Contract is computer code that resides and runs on a blockchain network. In the context of NFTs, it’s code that governs a range of aspects related to the project. We let our Lead Developer, Bonfire, go over some of the areas the Smart Contract is responsible for. As a note, if it’s a little hard to follow, you can think of “a token” as a Pieland Octopie NFT. Here’s what Bonfire had to say:
“The Pieland Smart Contract, like other NFT Smart Contracts, is code that has multiple functions. For example:
1. It governs the minting process. This means it determines whether minting is enabled or not, the price of the mint, what wallet addresses are on the whitelist, the limits in terms of number of tokens per transaction, tokens per wallet, tokens in pre-sale, etc.
2. It keeps track of ownership of each NFT, meaning it shows who minted which token, the ownership of an NFT whenever it’s transferred (i.e. in a sale, a gift, an airdrop, etc.). And the total supply of them.
3. It provides the metadata of each token. Things like the name of the NFT, the description, the name of the traits, etc.”
As you can see, the Smart Contract is an integral part of any NFT project, which is why we’re so excited to share how we plan to make sure our Smart Contract is on the cutting edge in this space. Like our Pies, we want everything to be baked with the highest quality ingredients possible.
An Upgradable Smart Contract
The previous “industry standard” in the NFT space has been that Smart Contracts are made in a way that once they go live, they can’t be updated. The code used on the day of launch is the same code for all time. This is how a large majority of NFT Smart Contracts have been set up so far. However, at Pieland, we are always looking to be ahead of the game, which is why Bonfire has dedicated time to creating an innovative approach to coding the contract — by making a Smart Contract that can be upgraded even after launch. Our team expects this to become more and more common in future NFT projects in the coming months/years, so we’re excited to be one of the few projects rolling it out already.
To really drive home how big this is, Bonfire wanted to share what the implications of this are for the Pieland NFTs:
“There are some very key things that an upgradable contract allows for. In brief; it future-proofs our contract, we can upgrade the contract post-mint, it allows for the correction of bugs or oversights, and it does all of this while still being verified on the blockchain and continuing to be 100% transparent. To really emphasize the importance of these different features, we can address them in more detail.
It Future-Proofs our Contract
When we say future-proof our contract, what we mean is that the Smart Contract can be adjusted in the future to keep up with any changes to the blockchain technology that it’s built on. It is inevitable that overtime, the Ethereum blockchain will go through adjustments and upgrades. As this happens, new features for NFTs and their Smart Contracts may be unlocked. At Pieland, we want to ensure that our Smart Contract can be upgraded to stay on top of any new innovations in the Crypto space. The vast majority of NFT projects lack the ability to upgrade their contract. In other words — the technology behind the Pieland Octopies can always be cutting edge and won’t become outdated years down the line, because we can keep upgrading the contract.
Upgrading Post-Mint
One unfortunate truth of Smart Contracts is they have a size limit for the coding, meaning that there is a hard limit for how much code can live on it. This limit varies depending on the blockchain, and for the large majority of projects built on Ethereum, the part of the code relating to the minting process takes up a large % of the contract, meaning there is less coding space available for other features. With this approach to our Smart Contract, once the Octopies drop is finished — and so the minting part of the code is no longer needed — we can quite literally take that part out of our Smart Contract, meaning we can replace it for code for other features, such as forging, evolution, burning, etc. We are then, quite literally, only limited by our imagination.
Oversight Correction
As we triple-check all of our work and make sure everything runs smoothly with test mints and pre-launch checks, having upgradable contracts means we can correct mistakes. In the NFT space, projects can be ruined before they even properly begin due to a Smart Contract mistake. The sort of mistakes we’re talking about are things like Metadata leaks, Metadata errors, contract-to-contract minting abuse, RNG problems, etc. While we are not anticipating any bugs, if we were to have one, it would be correctable via the upgradable contract AND it would not require owners to pay additional gas fees to re-mint on a new, corrected contract, meaning that we are not at risk of any project-ending mistakes.
All of the above aspects exist with a Smart Contract that is still verifiable on the Blockchain and viewable to all. I am confident that in the future, this will be the norm for projects, but as of right now, we are one of the few NFT projects that are doing this - and that is very exciting.”
As you can see from Bonfire’s detailed explanation, there are a lot of benefits to taking this approach. Of course, it meant development of the Smart Contract took longer than it “needed” to, but as we showed in our previous Open Kitchen Series article about the artwork for the Rainbow Trait, we value getting things done correctly over getting them done quickly. To that end, the Smart Contract has been in development longer than the minimum time needed to functionally be able to mint our Octopies, going through multiple iterations and improvements to get it to a place where the entire team is happy with it. So in the future if we decide it isn’t good enough, we can upgrade it!
We know these technical topics can get a bit confusing, so here’s a summary of the benefits of an upgradable contract:
- The contract is future-proofed for any upgrades to the blockchain.
- It can have features and extra tools added to it down the line.
- Oversights or bugs can be corrected at no cost to owners.
- It is still 100% transparent and verifiable on the blockchain.
Very exciting stuff! If you have any questions about what we’ve shared here today, you are welcome to jump into our Discord to ask our team. We will always provide as much transparency and information as possible, whether about a specific feature or the reasoning behind our decisions. Oh, and there’s also a lot of giveaways and fun community events already started and coming soon for our Discord community — so make sure you’re in there if you aren’t already!