gifchain-mainnet-1chain id 6464head #4,134,622gas 0.42 ngifblock 5.00sall systems operationalrpcexplorerdocs
GIFCHAIN

GIFCHAIN

the blockchain for NFTs  ·  objects, not just balances

Object standard

GIF-721 and GIF-1155 describe ownership. The object encoding underneath them describes the pixels. Both are part of consensus, which is why a node can reject a malformed object instead of storing garbage.

reference

encoding

An object is a header, a palette of up to 256 colours, and between one and 64 frames of indexed pixel data. Frames are delta encoded against the previous frame, so a mostly-static animation costs little more than a still. The whole payload is capped at 16 KB; a mint that exceeds it fails at validation rather than being truncated.

traits

Traits are derived, not supplied. The mint hash seeds a deterministic function defined by the collection at deploy time, which means anyone can recompute every trait in the collection from public data. Rarity scores are the sum of inverse trait frequencies and are recomputed whenever supply changes, which in practice means only on burns.

ownership

GIF-721 gives each slot a unique leaf. GIF-1155 lets one object leaf carry a balance map, which is how edition collections work without storing the same frames a thousand times. Both expose the same read interface, so an explorer does not need to care which one it is looking at.

royalties

GIF-2981 royalties are enforced by the market module, not by good manners. A fill that does not pay the creator is not a valid fill, so it never reaches a block. Private transfers with no price attached are, of course, still just transfers.

Version 1 objects still exist in history and still render. Nodes accept them on read and reject them on write, which is the only kind of deprecation a chain can actually perform.

at a glance
fieldsizemeaning
magic4 B0x47494658, marks an object payload
version1 Bencoding version, currently 2
dims2 Bwidth and height, max 128 each
frames1 Bframe count, 1 to 64
delay2 Bframe delay in milliseconds
palette3–768 BRGB triples, up to 256 entries
datavariabledelta encoded indexed pixels
checksum4 Bcrc32 over header and data
example
// validate before broadcasting
import { encodeObject, validate } from '@gifchain/sdk'

const payload = encodeObject({
  dims: [64, 64],
  delay: 80,
  palette,
  frames,
})

validate(payload)        // throws if > 16 KB or malformed
payload.byteLength       // 5312