A Comprehensive Guide To Nifty Gateway’s Creator-Owned Smart Contracts
Nifty Gateway recently supercharged its ERC-721 smart contracts. Here’s everything you need to know about the new features creators get access to when launching a curated drop on the Nifty Gateway platform.
Fixed Gas Cost Minting
Bottom line, minting with the new Nifty Gateway contract is more environmentally friendly and more economical. Savings range from 70% to a 10/10 collection and up to 99.9% for a 10K collection.
This was covered in depth in the following articles:
Deployed via Clone Factory
Nifty Gateway’s contract is duplicated by taking advantage of EIP-1167 clones. Exact replicas of the original contract are deployed inexpensively for each collection, and etherscan automatically verifies the contract code! Unlike other forms of proxy contracts, interacting with a clone feels just as natural as interacting with any other contract, and storage is co-located with the contract implementation. Deploying the contract with a naive factory pattern would cost about 4M gas units, but through the cloning mechanism, it can be deployed for about 300K gas units instead, saving over 90% of contract creation costs.
Artist Control
One of the features we are really excited about is introducing the option for creator’s to take over their contracts. Each artist can choose whether or not they want Nifty Gateway to administer their contracts on their behalf, or if they want to revoke Nifty Gateway’s access and manage the contract on their own. If the artist changes their mind, they can renounce control and return administrator permissions to Nifty Gateway at any time.
Provenance
Artists now have the option to sign their contracts to guarantee their authenticity. Unlike other systems, this can be done with a simple two-step process directly on the token smart contract itself instead of relying on external contracts.
Royalties
The upgraded smart contracts are compliant with EIP-2981 for on-chain royalties. The contracts provision for single-party or multi-party royalties. In the case of single-party royalties, funds are sent directly to the designated recipient. In the case of multi-party royalties, funds may be accumulated and independently claimed by each party from a payment splitter smart contract. Royalties may be configured to differ for each Nifty Type in the contract.
Simplified Token Ids
The mint function has been changed so that it no longer encodes extra data into each token id. Instead, it creates predictable, readable token ids that always start at ‘1’ and increase sequentially.
Token Recovery
Have you ever copy-pasted the wrong address when transferring ETH, ERC20, or ERC721 tokens? It is frustrating to see your hard earned coins and NFTs get locked away forever in a smart contract black hole. The new contracts include administrator-only functions that can be used to withdraw any locked ETH, ERC20, and ERC721 tokens.
Metadata Extensibility
There is no one-size fits all approach to implementing tokenURI. By default, the new contracts return tokenURIs that are simply a base URI with a token id tacked on at the end. This simple approach works for most NFT contracts. But what if you want to return IPFS links unique to each token id instead, or use arweave, or even generate all metadata on-chain? The new contracts have been designed for flexibility to allow the administrator to ‘plug-in’ a custom external metadata contract so that any metadata use case can be supported.
Contract Re-Use
Some artists like to release a new contract for every new collection or drop. Others might prefer to re-use the same contract for future works. Both options are supported by the new contract. A contract can be finalized, in which case no new Nifty Types or tokens may be minted. Or they can be left open for new Nifty Types and tokens to be minted down the road. Artist’s choice.
All of these features are built into the new contracts. A few features such as artist control, provenance, and contract re-use have not been fully integrated into the Nifty Gateway platform yet, but interfaces to take advantage of these features are in the works and will be available soon!
If you want to take advantage of these ground-breaking new NFT smart contracts, apply to do a drop with us! If you are a developer interested in becoming an innovator in the NFT space, join our team!