npm package: @infinity-ecosystem/asset-integration-standard
Description: Standard created for integration of NFTs from one gaming studio to another. Main purpose of the standard is to forbid the change of royalty receiver from the initial owner of the asset.
Author: Infinity Games Ltd.
Latest version: 1.0.4

# Infinity Ecosystem Asset Store NFT Standard

Upgradeable ERC1155 base contract for Web3 gaming studios, implementing EIP-2981 royalties with a built-in royalty lock for assets minted via the Interoperable Asset Store.
- Author: Infinity Games Ltd.
- License: MIT
- Version: 1.0.4

## Overview

AbstractGamingStudioAsset is an upgradeable ERC1155 base designed for gaming studios integrating the Infinity Games Interoperable Asset Store protocol.
It provides royalty enforcement to ensure that once an external asset is minted through the Asset Store, its royalty configuration cannot be changed by the collection owner.

## Key Features

- ERC1155Upgradeable with URI storage
- EIP-2981 royalties (ERC2981Upgradeable)
- Royalty lock for tokens minted via the Asset Store
- Authorization via onlyAssetStore modifier
- exists() helper for checking minted token IDs
- Upgradeable initializer pattern for proxy deployments

## Royalty Locking

Tokens minted by the Asset Store are automatically locked against royalty modification.
The function setTokenRoyalty() will revert for any token ID flagged as assetStoreMinted.
Tokens not minted via the Asset Store remain fully configurable.

## Requirements

Solidity compiler version: ^0.8.28
Dependencies:
- @openzeppelin/contracts-upgradeable/token/ERC1155/*
- @openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol
- @openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol
The Asset Store contract must exist and be authorized to call mintAsset().

## Installation

- npm i @openzeppelin/contracts-upgradeable
- npm i @infinity-ecosystem/asset-integration-standard

## Usage

To use this package, inherit the AbstractGamingStudioAsset contract in your collection and implement a function that returns your studio name.
During initialization, provide both a base URI and the Asset Store contract address.
Always ensure that the correct Asset Store address is passed to the initializer, as only that contract will be allowed to mint assets in your collection.

## Minting via the Asset Store

The Asset Store contract is the only entity permitted to mint assets through the mintAsset() function.
Collection owners or external addresses cannot call this function directly.

## Initializer Parameters

Function: __AbstractGamingStudioAsset_init(string uri, address assetStore_)
- uri_ Base URI for the ERC1155 collection
- assetStore_ Address of the authorized Asset Store contract
Passing address(0) or an incorrect address will prevent integration with the Interoperable Asset Store protocol.

## Upgradeability Notes

- Uses the OpenZeppelin upgradeable initializer pattern
- Follow upgrade-safe rules when extending storage
- Add storage gaps in future versions if extending
- Verify storage layout before upgrades
- Works with both UUPS and Transparent proxy setups

## Security Considerations

- Only the Asset Store can call mintAsset()
- Royalties for Asset Store minted tokens are permanently locked
- Use secure access control for administrative functions
- Review upgrade governance before deploying to mainnet

## Function Reference
- __AbstractGamingStudioAsset_init(string uri, address assetStore_)
    - Initializes the ERC1155 base URI, URI storage, and royalties.
- mintAsset(...)
    - Mints a new token, sets royalty, assigns URI, and locks royalties for Asset Store minted tokens.
- setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator)
    - Updates royalty only for non-Asset Store minted tokens.
- getStudioName()
    - Must be implemented by inheriting contracts. Returns the studio name.
- getAssetStoreAddress()
    - Returns the authorized Asset Store address.
- exists(uint256 tokenId)
    - Returns true if the tokenId has been minted.
- supportsInterface(bytes4)
    - Supports ERC1155 and ERC2981 interface detection.

## Changelog

- v1.0.0 – Initial release
- v1.0.1 - Changed Description

## License

MIT

## Important notes

In order to be able to integrate assets, _assetStore parameter value in __AbstractGamingStudioAsset_init should be set to an address: **0x165F79d307CbB9861bB5a080DA757B368CE57395**