Skip to main content

Solidity API

ERC721PresetL1

This module is supposed to be used in layer 1 (settlement layer).

_totalBurned

uint256 _totalBurned

_baseTokenURI

string _baseTokenURI

PAUSER_ROLE

bytes32 PAUSER_ROLE

constructor

constructor(address bridgeAddress, string name, string symbol, string baseURI) public

disableSettlement

function disableSettlement() external

Disables state settlement.

Requirements:

  • It must be called by only admin.

Emits a {SettlementDisabled} event.

enableSettlement

function enableSettlement() external

Enables state settlement.

Requirements:

  • It must be called by only admin.

Emits a {SettlementEnabled} event.

burn

function burn(uint256 tokenId) external virtual

pause

function pause() external

unpause

function unpause() external

isSettleable

function isSettleable() external view returns (bool)

totalMinted

function totalMinted() external view returns (uint256)

totalSupply

function totalSupply() external view returns (uint256)

_beforeTokenTransfer

function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual

_Hook that is called before any token transfer. This includes minting and burning.

Calling conditions:

  • When from and to are both non-zero, from's tokenId will be transferred to to.
  • When from is zero, tokenId will be minted for to.
  • When to is zero, from's tokenId will be burned.
  • from and to are never both zero.

To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]._

_baseURI

function _baseURI() internal view returns (string)

Base URI for computing {tokenURI}. If set, the resulting URI for each token will be the concatenation of the baseURI and the tokenId. Empty by default, can be overridden in child contracts.