Deploying a uERC721 in any EVM chain

Once a sibling collection has been created, its assigned contractAddress in LAOS can be used to deploy an ERC721 collection, in any EVM blockchain of choice (such as Ethereum or Polygon), which will be paired with the sibling collection.

The pairing is established by using the Universal Location, a feature of Polkadot's Cross-Consensus Messaging version 3. Check the videos linked in the References section for a deeper understanding of the Universal Location.

The uERC721 contract

The open-source uERC721 template contract may be used as a starting point to deploy a collection in any EVM of choice. This contract minimally extends the default, audited and widely used ERC721 implementation by OpenZeppelin; the u prefix in uERC721 stands for such a Universal extension.

The extension follows the specification detailed in this Github issue, which will soon be submitted as an ERC proposal.

The template contract requires a key parameter in its constructor: baseURI. This string specifies the Universal Location of the sibling collection in LAOS. As explained here, the baseURI that would point to a sibling collection in K-LAOS at a given contractAddress is:

https://uloc.io/GlobalConsensus(3)/Parachain(3336)/PalletInstance(51)/AccountKey20(contractAddress)/

Warning: do not forget the trailing slash / at the end of the string

In this particular implementation, the baseURI can be changed by the owner of the contract, which is an address provided in the constructor too, by calling the updateBaseURI method.

The contract also allows the owner to relinquish this privilege and permanently lock the current baseURI by calling the lockBaseURI method.

Please consider this implementation as a template. Feel free to modify and extend its logic to suit your particular needs.

Two simple examples

The following NFT on Ethereum was bridgelessly minted in K-LAOS, and can be traded, for example, in Opensea for MATIC and ETH:

The following NFT on Polygon was bridgelessly minted in K-LAOS, and can be traded, for example, in Opensea for MATIC and ETH:

Last updated