GSoC’22 Week 3 & 4: Contractual Configurations

Sadashay Kanungo
SCoRe Lab

--

This is the third in a series of blogs covering my journey as a contributor in GSoC ’22 at SCoRe Lab. Here, I share the progress of the project and just think out loud.

Follow me here… | Linkedin | Github |

Progress Update

In the third and fourth week two new functionalities have been added to NFT Toolbox. Users can now draft a customized Solidity Smart Contract from scratch and deploy it to any Ethereum compatible blockchain network. A brief overview of the implementation of these functionalities is as follows.

Draft Functionality

Smart Contracts are the bedrock of any NFT ecosystem. After numerous iterations the Open Zeppelin Contracts have now been accepted as a standard in the NFT community. The objective of this functionality in NFT Toolbox was to provide an interface for users to simply choose from the various customizations possible in an NFT smart contract and then generate the corresponding solidity code programmatically. Given the wide applicability, it wasn’t surprising to find out that Open Zeppelin was already working on the exact same functionality and launched the Open Zeppelin Wizard just two weeks before I was supposed to start working on it.

NFT Toolbox has the Contract Class for representing a Smart Contract. The Draft method included in Contract Class now uses the Open Zeppelin Wizard as a dependency and generates ERC721 and ERC1155 contracts with various user specified customizations. The contracts generated are stored in solidity files and can be further customized by the user for specific use cases.

Deploy Functionality

Once a Contract has been finalized, it is made operational by deploying to a blockchain. The Ethers library enables us to connect to Ethereum compatible blockchain networks and interact with them. Due to it’s simplicity and light weight as compared to other libraries, Ethers is becoming more and more popular in the community.

The initialization of a Contract Object in NFT Toolbox includes setting up a connection to blockchain using Ethers. As of now connections to Ethereum, Polygon and their test nets are supported. The Deploy method in the Contract class provides the deployment functionality for smart contracts.

What’s Next?

In the coming weeks, I will continue adding more functionalities to NFT Toolbox. With a deployed smart contract, the framework of an NFT collection is complete. Now, we will develop ways to interact with this smart contract to mint NFTs to an address and put them up for sales and auctions.

That’s all for now. See you in the next blog!

--

--