OpenSea came very strong last week with their new announcement: anyone can now mint gas free on mainnet, through their platform. And this is huge in the current market with Ether at more than $1,000 and gas fees that sometimes go to 450 gwei for a low speed transaction.

As a developer, my first thought was "Oh they probably did a Minting Order that user sign, the same way users can sell their NFTs by just signing an order, proving they agree with this".

But then I read this from their announcement post:

Note: Even before they exist on-chain, these NFTs can be sold on any platform. The smart contract returns the correct results for your balance of each NFT you make, publicly. Some reasons for selling them on OpenSea can be found here.

This means that it's in no way a simple "Minting order", or not as I thought, because other platforms can already see your NFT as living.

To do that:

there are not a millions ways to do this using only the ID and no prior data: the content must be encoded in the token ID.

Inspecting the Token

So I went on OpenSea and found the first lazy minted item I could find:

https://lh3.googleusercontent.com/7lM0xq6jVRFEELZQTBDaZE_TDOuHwiDXdF-yD5s_pyzvcY9ZjwPThaYfMMkbVdE6pfOVlBOO4teKAUYlUJQPGQyFfMkEYW8Snam1=s992

Icarus - The Gates of Ivory and Horn

The URI is https://opensea.io/assets/0x495f947276749ce646f68ac8c248420045cb7b5e/1788392794142082299474395154228341798295959244742526973140279771545724780545

From which we can deduct

-The contract address 0x495f947276749ce646f68ac8c248420045cb7b5e

Seeing the length of the token id, I thought about transforming it into hexadecimal:

3F431C784CE076361278F9D88DD12526D6F082F000000000000070000000001

This looks good. We can see that the token id is composed of several values. **3F431C784CE076361278F9D88DD12526D6F082F0**0000000000007**0000000001**

First the creator's Ethereum address *0x3F431C784CE076361278F9D88DD12526D6F082F0* Then the "real" token id: *0000000000007* And after this the tokenSupply: *0000000001*

This, can actually be considered as the Minting Order for all platforms, as long as OpenSea provides a JSON file for this id.

{
    "name": "Icarus",
    "description": "Atop the blooming child there rests a pause.",
    "external_link": null,
    "image": "<https://lh3.googleusercontent.com/7lM0xq6jVRFEELZQTBDaZE_TDOuHwiDXdF-yD5s_pyzvcY9ZjwPThaYfMMkbVdE6pfOVlBOO4teKAUYlUJQPGQyFfMkEYW8Snam1>",
    "animation_url": null
}

Now how does the Smart Contract knows about all this if there is no prior transaction?

For the token metadata, it doesn't. It returns a generic URI with a placeholder for the token id https://api.opensea.io/api/v1/metadata/0x495f947276749Ce646f68AC8c248420045cb7b5e/0x{id}/

Platforms then fetch this JSON (from open sea servers), replacing {id} by the hexadecimal representation of it, and consider this NFT as a real one as long as there is content.

For the user balance, it deducts values from the token ID by decomposing it as I did before.

Now there are at least two ways I see lazy minting possible with this token ID trick: