Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Printing a different QR code on every wine label presents an interesting logistical (printing) challenge.

NFT QR code

Each wine bottle should be labeled with a unique QR code. The QR code is essentially an encoded URL in the following format:

NFT.OpenVino.org/TOKENID.serialnumber.uniqueID

For example:

HTTPS://OpenVino.org/MTB18.00075.ABCD1234

The example QR code represents the 75th bottle of wine backed by the MTB18 token and validated by a unique code ABCD1234.

The reason for including the unique code is to reduce the possibility of someone guessing the URL of a particular bottle and fraudulently retrieving the QR code. However, even if someone were to do this, their user registration on “You Drink It, You Know It”, complete with selfie, would reveal their identity.

QR creation workflow

When a token is minted (include in the minting workflow?), we need to generate a complete listing of QR codes that will be potentially used on bottles.

This can be done by simply creating a table with the following fields:

Field

Description

TOKEN_ID:

A unique identifier in the database, representing a singular QR URL, regardless or the token name or serial number

TOKEN_NAME:

The name of the token. For example, MTB18

TOKEN_SERIAL:

The serial representing the bottle number for the token. This is a number between 1 and the total number of minted tokens. For example, there were 16384 MTB18 tokens minted. Therefore, for MTB18, there would be a total of 16384 token serial numbers.

URL_DOMAIN:

The base URL_DOMAIN is:

HTTPS://NFT.OpenVino.org/

or

HTTPS://ó.ar/

Both domains point to the same IP address(es). The second, three-letter TLD is meant to shorten the overall QR-code URL. A shorter URL results in a less complex QR code, and therefore can be printed at a smaller size.

UNIQUE_ID

A random unique number.

QR_URL:

The QR_URL is a concatenation of:

URL_DOMAIN + TOKEN_NAME + TOKEN_SERIAL + UNIQUE_ID

For example:

ALTER TABLE your_table ADD COLUMN new_column TEXT;
ALTER TABLE your_table ADD COLUMN fourth_column TEXT;
ALTER TABLE your_table ADD COLUMN fifth_column TEXT;

UPDATE your_table SET 
  new_column = CONCAT(token_name, '.', LPAD(token_id::text, 5, '0')),
  fourth_column = CONCAT(new_column, '.', SUBSTRING(gen_random_uuid()::text, 1, 5)),
  fifth_column = CONCAT('https://ó.ar/', fourth_column);

Printing QR codes

Printing is currently done using the software Bartender.

  • No labels