The project development is suspended, parsers will fail to launch on current data
Hic et nunc is a new eco-friendly NFT marketplace, built on top of Tezos blockchain.
It is especially popular in generative graphics and data viz community, so I've decided to share data and all scripts that I've made for https://hashquine.github.io/hicetnunc rating.
It is published under CC BY license, so that it is even possible to sell NFTs that use that data (or modified scripts) as long as there is the following phrase somewhere in the token description: based on @hashquine dataset.
Since hicetnunc servers are already under an extreme load due to quick growth, I've reorganized code, so that all data is taken from Tezos blockchain and IPFS without any calls to the hicetnunc.xyz website or API.
Data sources
Blockchain transactions by TzStats API (better-call.dev was not used in order not to interfere with hicetnunc backend).
Token transfers: list of changes of tokens owners including burns and direct transfers.
All metadata available for tokens.
Swaps and mints.
Data not available:
Everything connected with hDAO tokens and hDAO feed. Although all related transactions are already being collected, they are not analysed yet.
Twitter statistics like the number of followers.
Direct money transfers between users, when NFT tokens are not transferred in the same transaction.
Dataset schema
The goal was to simplify data analysis and visualization with a wide range of existing tools, so there are lots of redundant fields, which contain precalculated aggregations and different representations of the same data.
All files have two equivalent versions: JSON and CSV.
JSON files are dictionary of dictionaries with rows of CSV files are indexed by the *_id field.
CSV files have commas as delimiters.
Fields values are ether numbers or strings, empty values represented by -1 or "".
All identifiers are strings.
Any field, which references some event in the blockchain (for example, mint time) have 4 representations:
mint_iso_date — string with UTC date and time: "2021-03-01T15:00:00Z",
mint_stamp — integer Unix timestamp in seconds: 1614610800,
mint_hash — string with transaction hash, where event occurred: "oom5Ju6X9nYpBCi...",
mint_row_id — integer with global unique operation id (internal to TzStats) with that event: 42181049
Any field, which references a set of values (like the set of prices of sold works), have following aggregations:
sold_count — values count,
sold_nonzero_count — number of positive values,
sold_zero_count — number of zeros,
sold_price_min — minimum value (excl. zeros),
sold_price_max — maximum value,
sold_price_sum — sum of values,
sold_price_avg — average value (sum divided by count excl. zeros).
There is a confusing fact, that in hicetnunc each NFT can have multiple identical instances, which are fungible.
In this document term "token" refers to the set of all that instances.
If empty - author is ok, banned - user is banned, some_tokens_banned - user is not banned, but it minted banned tokens. Ban status is taken from hicetnunc repository
String, which characterizes transfer in following terms: author, swap, user, burn, ext. This division is a convention used in this repository only.
token_id
string
"207"
Numeric string with token identifier.
price
float
1.5
Price per item in XTZ or 0 for direct transfers. For external swaps price is guessed heuristically as half of sum of abolute values of transaction money transers (since each money transaction is counted twice both as incoming and outcoming).
count
integer
5
Number of token instances transferred.
swap_id
string
"523"
Numeric string with swap identifier or empty string if it is a direct transfer.
sender
string
"tz1UBZUk..."
Sender address or empty string in case of mint
receiver
string
"tz1MwvWa..."
Receiver address
method
string
"mint_OBJKT"
Called method of hicetnunc or external contract, otherwise empty string
This is the registry of all owners of all NFT tokens.
This is the typical way how most of NFTs works on Ethereum or on Tezos.
Click on "Bigmap #511" tab in Tezos explorer to see registry of token owners.
This contract is the single "source of truth" about current owners of all NFT tokens issued by hicetnunc.
If there is no information about token owner in the registry, than that person doesn't own any tokens.
This contract also the registry of tokens infos (metadata).
Token info is a small JSON structure stored on on IPFS.
It contains link to IPFS with NFT binary contents (some image, for example).
It also contains title, description, creator and tags.
It does not contain price or related information.
Only link to IPFS is stored on the blockchain.
Note, that, however, there is no way to alter token metadata after minting.
Click on "Bigmap #514" tab in Tezos explorer to see mapping from tokens to IPFS urls.
Every token owner can call "transfer" method of the contract to send tokens to other address.
This contract can't do any money related operations.
Money logic should be implemented in other contracts, which call "NFT" contract as a part of transaction operation.
There is also a "mint" method in this contract, but it can only be called by the "Art house" contract.
2.5% of every purchase via "Art house" contract swaps is sent to this wallet.
There are several other contracts related to curation and hDAO mechanisms, which are independent from the contracts mentioned above.
Actually, hicetnunc was not created just as another NFT marketplace, it has much broader mission as hDAO (hicetnunc DAO). You can get the idea of the creators vision on hicetnunc blog. As a result, only a small subset of contract's logic is actually used during hicetnunc website operation.
Official and external swap mechanisms
Official swap mechanism by hicetnunc "Art house" contract.
Any token bought on hicetnunc website is a part of some swap.
Swap is just some amount of tokens, which are offered for sale by specific price.
When swap is created, the seller sends all offered tokens to the "Art house" smart contract.
Then anybody can send the required amount of money to the "collect" method of contract and get tokens in return.
2.5% of comission is transferred to hicetnunc comission wallet.
10% of royalties (this parameter is configurable in general) is transferred to token author.
rest of money is sent to swap creator.
proportional amount of hDAO tokens are also sent to buyer, seller, token author and comission wallet.
Seller can cancel swap any time and get unsold tokens back.
Swaps can be created by any token owner any number of times.
In this dataset official swaps are treated as author->swap, other->swap, swap->author, swap->other transfers.
External swap mechanisms.
Since "transfer" method of "NFT" contract can be called by any token owner directly, it is possible to make custom smart contracts, which implement any desired logic.
These custom contracts are not required not pay comission or royalties to hicetnunc.
In general, swap contracts can be used to exchange any types entities.
In this dataset external swaps are treated as other->other transfers. The related price is guessed heuristically (as half of money transferred in all operations) and may not be always correct.
Token lifecycle
In contrast to NFT definition, each NFT artwork in hicetnunc can have multiple copies, which are fungible. The NFT contract only tracks the amount of copies owned by each address. This means, that there is no way (even in theory) to track history of single copy like it can be done on OpenSea, for example.
It is possible, however, to track history of token groups to some extent. Here is a list of possible owner types in this dataset:
author — the person, who created the tokens during mint.
user — any other hicetnunc user.
ext — any external contract (external swap mechanism, for example).
burn — reserved address for burning tokens.
swap — when tokens are offered on sale in official swaps.
List of possible transitions:
mint->author, mint->user First, every token should be minted.
For each token type there may exist only single mint operation. It is impossible to mint additional tokens later.
The only way to mint a token is to call "mint_OBJKT" method in "Art house" contract.
Internally it calls "mint" method in "NFT" contract.
In dataset the sender is empty for mint operations.
As result of mint operation, all tokens are transferred to some address. In 99% of cases this is the transaction sender, but sometimes it is different.
Royalties are always sent to the mint transaction sender.
author->swap, user->swap Any token owner can create official swap.
Hicetnunc swap is created by calling "swap" method in "Art house" contract.
Here is a typical swap creation transaction by author.
Internally tokens are transferred to the "Art house" address.
swap->author, swap->other There are two situations, when tokens may be transferred from a swap.
Purchase
When token is purchased on hicetnunc website, it is transferred to the buyer. This is the main operation on hicetnunc.
Buyer should call "collect" method of "Art house" contract and send required amount of money with it.
First 3 internal operations send money to token creator (royalties), hicetnunc wallet (comission) and to the seller (which is the same as token creator in some cases) in that order.
Fourth operation creates hDAO tokens and sends them to the buyer, seller and hicetnunc wallet. These tokens have special meaning and are not tracked in this dataset.
Last internal operation does the actual token transfer.
Note, that case of zero price is handled differently.
Tokens can never be transferred from burn address since it is impossible to retrieve its private key (similar to how it is impossible to reverse hash containing all zeros).
Details about edge cases
How to define the author of the token
mint_sender The address of the sender of the "mint" transaction.
This is the person, who receives royalties in hicetnunc.
In this dataset token author this is equivalent to token author.
issuer The address of the receiver of tokens after the mint transaction.
It is also the first parameter of the "mint" call in "Art house" contract.
Here is an example of mint, where transaction sender and token issuer are different.
info_creator Field "creators" in JSON in token metadata.
Here is an example of mint, where metadata creator field is different from transaction sender and issuer.
As of 4th of April, it always has single entry.
Sometimes it is empty.
Here is an example of mint with empty metadata creator field.
Note, that corresponding token page has a bug, that it shows token owner controls on token page.
Hicetnunc core addresses can own NFTs as regular users
Any user can send any NFT tokens to "NFT" or "Art house contract"
Technically, it has the same effect as sending this tokens to burn address, since contracts were not programmed to send their own NFTs (except from swap mechanism) under any circumstances.
Comission wallet sometimes mint NFTs and buys them from other users.
Since it is not a contract and manipulated by a real person (hicetnunc creator).
请发表评论