EnergyGlare Technical Update 01

ENERGYGLARE
6 min readFeb 13, 2022

Hello friends and welcome to our regular update on EnergyGlare’s internal development. As you may have already read our Roadmap for 2022, you know that the first initiative for this year is our NFT Collection Release and we are pretty enthusiastic about it. It combines amazing artwork with educational information and interesting facts about our Net Zero goal. We won’t give you all the details on how and when it is going to happen. Well, not yet! However, in this update we will give you some technical insights of the upcoming NFT Collection.

The NFT has two sides equally beautiful to geeks like us — the artwork and the technology behind it. We know most of you are already aware that an NFT collection is a blockchain-based smart contract that holds the links to its unique assets. Here is a sneak peek of our approach to it and how we are preparing our sale.

1. The Goal

The first and most important step is to define the purpose of the NFT Gallery and how it will be minted, sold and distributed. Giving answers to those initial major questions, is what framed our decisions in the next steps. In our case the purpose of the gallery is to introduce a wider audience with our core environmental initiatives, create a long-term community that will make the change together with us and use all funds raised for EnergyGlare development. Besides uniquely designed artwork, our buyers will gain some environmental education from the images. We also added a number of benefits and promotions as well as a great game for our community.

2. Choosing Blockchain Technology

Once the goal was clear we had to decide which blockchain platform we were going to use. We’d discussed and analyzed a few options internally until we found the balance between reliable technology, cost and environmental impact. Of course, there was one thing we had as a compass, “guiding” us through the technical decisions — helping to achieve Net Zero. At the same time, we wanted to provide our users with integration with popular NFT exchanges and maximum added value. A combination of those considerations let us to our decision.

3. Create a Smart Contract Holding the NFTs

Having the blockchain platform selected, it was time to define the logic behind the smart contract. The pioneer among NFT protocols is ERC-721. ERC-1155 could be also used, depending on how the NFT gallery was to be organized, how many items, what type and so on. In our case, this is a an NFT gallery of artwork, so we focused on ERC-721 and its equivalents on the various different blockchains. Talking about the smart contract, there are few considerations that are taken into account:

  • To be integrated well into the blockchain and be publicly accessible for querying. It must comply with a standard interface, like the mentioned above.
  • To be compatible with existing NFT marketplaces. That requires various approaches during implementation, depending on the marketplace and blockchain platform. For example, to integrate with Opensea a contract needs to comply with its standard and requires passing some proxy address for easier binding.
  • To enable implementing some non-standard functionality such as further future actions after minting.
  • To enable some mechanisms accessible for the owner of the contract, in case of emergency or if you need to fix some unforeseen troubles on the fly, after deployment.

There are usually two options for setting the price of an NFT. Setting the price and royalties via an auction platform/marketplace and setting the price in the smart contract, in case it is minted on a dedicated site. The latter approach is our case and we will discuss the reasons more thoroughly in the next chapter.

4. NFT Storage

As we speak our images are being prepared. As you know, in order for an image to become an NFT, it is necessary to create a JSON metadata schema. It is describing the name and description of the image itself. But most importantly, it says where the image is by setting an URI. In most popular NFT blockchains, like Ethereum, Polygon, Solana, Binance and others, a common way of describing NFTs is used. This is the basic json structure:

{
“name”:”NFT Name”,
“description”:”NFT Description”,
“image”:”
https://somedomain.com/pic/xxxx.jpg",
“external_url”:”
https://originalsite.io/2",
“attributes”:[…]
}

“image” element is the one pointing to the URI of the image and an address where it is hosted. Common way of storing blockchain assets is an IPFS-based service. A common choice is Pinata, which gives additional layer of services on top of IPFS, and has convenient API that is giving tons of possibilities to interact with the stored content.

5. The Minting UI

The Minting UI topic is related to where we want implement the NFT minting and sale. There are a couple of options which are usually considered and it all depends on what the goal is and how NFTs should be presented and interacted with.

  • The first option is using auction platforms/NFT marketplaces and their UI to create a gallery, set prices, and mint NFT. The main advantage of this approach is that it is very quick and easy. You don’t have to implement any smart contract and save yourselves all the technical concerns in that area. The platforms usually have easy and intuitive to use UIs and they guide you along the way of creating a gallery. However, there are a few cons. Although this option provides some variations on the look and feel, easy sorting and filtering, there are very limited flexibility (usually very few) to the Presentation. If you want to create a minting event with bespoke features such as timebound auction, various stages of a sale, or after-minting services, it is hardly possible on such platforms.
  • The second option requires more knowledge, time and efforts, but it provides endless flexibility. This option is creating a dedicated website where the NFTs are minted. It was a no-brainer for us this was the way we wanted to go. And the reason can be found back in the first step described earlier in this article — defining what the NFT Collection goal is. We want to achieve wider public outreach and raise awareness of our activities. This prompts us to stand out from the crowd and not be part of it. We want to design the way our minting event and sale will look like, to allow our buyers to easily mint their NFTs. Additionally, there are tons of unusual utility and gamification elements in our NFTs. That’s why we want it our way. Our designers are preparing a cool UX/UI, which is aligned with our vision and the NFT gallery itself. In terms of technology, we are using React as a frontend library. React is giving us enough flexibility when it comes to implementing business logic, manipulating UI elements and still maintain separations of concerns and reusability of components. At the same time, it is simple enough, with smooth learning curve and it doesn’t come with tons of extra overhead like some of the bigger frameworks.

6. Interaction with Web3

Having the website UI done is just the half work done. The second part is to make the website interact with the blockchain. Regardless of the blockchain, it usually boils down to the following activities:

  • Integrate a web3 provider.
  • Let users input the address registered during the registration period.
  • Implement connection to user wallets and listen for wallet changes. For example, if there is a move to another address, react in the UI accordingly.
  • Interact with the smart contract. Mint the NFTs and transfer NFTs.
  • Fetch info for already minted NFTs.

This was our technical update for the past two weeks. The next thing we will announce this week is the artist we are collaborating with on our first NFT collection. Stay tuned:

--

--