Skip to content

ERC-721

ERC-721 is a token standard that allows for the creation of unique, non-fungible tokens on a blockchain network. In the context of Furtheon, ERC-721 tokens can be used to represent unique assets.

ChildERC721

Developers can use the ChildERC721 token standard to create ERC-721 tokens on the Furtheon-powered chain. To create a new ChildERC721 token, developers can use the ChildERC721 predicate contract as a template and deploy it on the Furtheon-powered chain. The contract requires a name and symbol to determine the unique identity of the token.

Once created, ChildERC721 tokens can be minted and burned on the Furtheon-powered chain through the corresponding ERC721Predicate contract. This ensures that the supply of tokens on the rootchain and the Furtheon-powered chain remains in sync. The ERC721Predicate contract also allows for the transfer of tokens between the two networks using the native bridge.

Predicates

The RootERC721Predicate contract serves as the rootchain token predicate contract, while the ChildERC721Predicate contract serves as the Furtheon-powered chain token predicate contract. When a user wants to deposit an ERC-721 token on the rootchain into the Furtheon-powered chain, they call the deposit function on the RootERC721Predicate contract with the appropriate parameters, including the token ID, sender, and receiver addresses.

When a user deposits a token for the first time, the token mapping between the root and Furtheon-powered chain is created automatically. This mapping allows users to deposit and withdraw tokens between the root and Furtheon-powered chain.

Deposits and Withdrawals

The ChildERC721Predicate contract includes functions for minting and burning child tokens, which are triggered when the deposit and withdrawal functions are called. To withdraw a child token back to the rootchain, a user calls the appropriate function on the ChildERC721Predicate contract with the necessary parameters, including the token ID and receiver address. The ChildERC721Predicate contract then burns the child token and emits a withdrawal event. The RootERC721Predicate contract listens for these events and relays them to the rootchain using the L2StateSender contract.