区块链的核心——分布式和存储不依赖于中心化的硬件或管理机构,在区块链中的所有节点的权限和义务都是对等的,因此,每个结果也能够参与到数据的记录和维护。它区别于传统数据结构中对“中心”的依赖,能够实现点对点的数据传输和实时的数据记录,效率更高、速度更快。
// The next token ID to be minted.
uint256 private _currentIndex;
// The number of tokens burned.
uint256 private _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned.
// See {_packedOwnershipOf} implementation for details.
//
// Bits Layout:
// - [0.159] addr
// - [160.223] startTimestamp
// - [224] burned
// - [225] nextInitialized
// - [232.255] extraData
mapping(uint256 => uint256) private _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0.63] balance
// - [64.127] numberMinted
// - [128.191] numberBurned
// - [192.255] aux
mapping(address => uint256) private _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;