LAOS if a fully EVM compliant blockchain. Although the node is written in Rust using the Substrate framework, it exposes a standard Ethereum compatible interface, enabling all DApps already familiar with EVM blockchains to use LAOS by simply connecting to the appropriate RPC endpoints.
Check this section to consult the available public endpoints and the corresponding EVM chainIds.
Leveraging innovations by Moonbeam and Astar, LAOS exposes some of the functionalities that are built in at protocol level via precompile contracts, accessible via a standard Solidity interface.
For example, the creation of collections in LAOS, that can be used as siblings for ERC721 contracts deployed in other chains, such as Ethereum, is done via the precompile at the following hardcoded address:
Creation of sibling collections in LAOS: 0x0000000000000000000000000000000000000403
At this address, the following minimal interface is exposed:
interface EvolutionCollectionFactory {/// @notice Event emitted when a new collection is created/// @param _owner the owner of the newly created collection/// @param _collectionAddress the address of the newly created collectioneventNewCollection(addressindexed _owner, address _collectionAddress);/// @notice Creates a new collection/// @dev Call this function to create a new collection/// @param _owner the owner of the newly created collection/// @return the address of the newly created collectionfunctioncreateCollection(address_owner) externalreturns (address);}
When sibling collections are created, they are assigned a collectionAddress, which can be read from the emitted event, or from the return parameter of createCollection. Only the provided owner can start minting and evolving in the newly created collection.
At each assigned collectionAddress, the following interface is available:
interface EvolutionCollection {/// @notice Emitted when a new token is minted/// @dev Id of the token is concatenation of `slot` and `to`/// @param _to the initial owner of the newly minted token/// @param _slot the slot of the token/// @param _tokenId the resulting id of the newly minted token/// @param _tokenURI the URI of the newly minted tokeneventMintedWithExternalURI(addressindexed _to,uint96 _slot,uint256 _tokenId,string _tokenURI );/// @notice Emitted when a token metadata is updated/// @param _tokenId the id of the token for which the metadata has changed/// @param _tokenURI the new URI of the tokeneventEvolvedWithExternalURI(uint256indexed _tokenId,string _tokenURI );/// @notice Emitted when ownership of the collection changes/// @param _previousOwner the previous owner of the collection/// @param _newOwner the new owner of the collectioneventOwnershipTransferred(addressindexed _previousOwner,addressindexed _newOwner );/// @notice Emitted when public minting is enabled for the collectioneventPublicMintingEnabled();/// @notice Emitted when public minting is disabled for the collectioneventPublicMintingDisabled();/// @notice Owner of the collection/// @dev Call this function to get the owner of a collection/// @return the owner of the collectionfunctionowner() externalviewreturns (address);/// @notice Provides a distinct Uniform Resource Identifier (URI) for a given token within a specified collection. /// @dev Implementations must follow the ERC-721 standard for token URIs, which should point to a JSON file conforming to the "ERC721 Metadata JSON Schema".
/// @param _tokenId The unique identifier of the token within the specified collection./// @return A string representing the URI of the specified token.functiontokenURI(uint256_tokenId) externalviewreturns (stringmemory);/// @notice Mint a new token/// @dev Call this function to mint a new token, the caller must be the owner of the collection/// @param _to the owner of the newly minted token/// @param _slot the slot of the token/// @param _tokenURI the tokenURI of the newly minted token/// @return the id of the newly minted tokenfunctionmintWithExternalURI(address_to,uint96_slot,stringcalldata_tokenURI ) externalreturns (uint256);/// @notice Changes the tokenURI of an existing token/// @dev Call this function to evolve an existing token, the caller must be the owner of the collection/// @param _tokenId the id of the token/// @param _tokenURI the new tokenURI of the tokenfunctionevolveWithExternalURI(uint256_tokenId,stringcalldata_tokenURI ) externalreturns (uint256);/// @notice Transfers ownership of the collection to a new account (`newOwner`)./// @dev Call this function to transfer ownership of the collection, the caller must be the owner of the collection/// @param _newOwner The address to transfer ownership to.functiontransferOwnership(address_newOwner) external;/// @notice Enables public minting for the collection/// When enabled, any address is allowed to mint on this collection/// This does not affect evolution: only the owner of the collection can continue evolving assets /// @dev Call this function to enable public minting for the collection, the caller must be the owner of the collection
functionenablePublicMinting() external;/// @notice Disables public minting for the collection /// @dev Call this function to disable public minting for the collection, the caller must be the owner of the collection
functiondisablePublicMinting() external;/// @notice Checks if public minting is enabled for the collection/// @dev Call this function to check if public minting is enabled for the collection/// @return true if public minting is enabled for the collection, false otherwisefunctionisPublicMintingEnabled() externalviewreturns (bool);}
This interface will continuously extend as new features are added to LAOS.