Write Contract

Create

This is a function in the smart contract used to create a new Non-Fungible Token (NFT) on the ERC1155 standard

Example transaction:

a. Token Transfered FROM: Address from where the token was created

b. Token Transferred To: Address where the created Token was sent

c. Token Transferred: ERC-1155 standard of the token

d. Token Transferred: Amount of created tokens

e. Token Transferred: Token ID [number of the token ID]

f. Token Transferred: Token Contract Address

CreateReserved

The method is used to create special NFT tokens with IDs less than 1000. These tokens are reserved for specific purposes or special use cases done by Smart Contract Owner.

Migrate

The Migrate method is a special function available only to the contract creator, allowing the migration of Meta Assets to a new contract, specifically NFT Meta Asset V2. It is important to note that this function has been included temporarily to facilitate the migration process while the next iteration of the standard (V2) is being developed. The planned release of Meta Asset V2 is set for Q1 2024. This function serves as a transitional measure and will be removed in the final version (V2) of the standard to ensure decentralization and avoid centralization concerns.

Pause

The method aims to suspend the functionality of the contract. It is accessible only to the contract's owner.

RenounceOwnership

This method allows the contract's owner to renounce their ownership. This method is accessible only to the contract's owner.

This function enables the current owner to renounce ownership of the contract. Once this method is called, the owner will lose their privileges to manage the contract, and any methods that require owner permissions will no longer be accessible.

safeBatchTransferFrom

The safeBatchTransferFrom function allows for the secure transfer of multiple tokens from the owner's wallet to another specified address. The function takes the following parameters

Example transaction:

safeTransferFrom

The function allows for the secure transfer of a single token from the owner's wallet to another specified address. The function takes the following parameters:

Example transaction:

a. Tokens Transfered FROM: Address from where the token was transferred

b. Tokens Transferred To: Address where the Tokens are sent

c. Tokens Transferred: ERC-1155 standard of the token

d. Tokens Transferred: Amount of tokens

e. Tokens Transferred: Token ID [ID of the transferred token]

f. Tokens Transferred: Token Contract Address

SetApprovalForAll

The method is used to allow or revoke permission for another contract to manage tokens on behalf of the caller. By setting the approval status to ture, we grant the operator the ability to manage the tokens, and by setting it to false, we revoke this permission.

Example transaction:

setFee

This method is used to set the transaction fee in the contract. It is accessible only to the contract's owner.

setTreasuryAddress

The method is used to set the treasury address in the contract. The treasury address is the designated account where funds or tokens are stored for various purposes, such as collecting fees, managing reserves, or distributing rewards.

setUri

The method allows the contract owner to update the URI associated with the NFTs in the contract. The URI points to a metadata file that contains information about the NFT, such as its name, description, image, and other attributes.

transferOwnership

The method is available only to the current owner of the contract and allows changing the ownership of the contract

unpause

The method aims to resume the functionality of the contract. It is accessible only to the contract's owner.

Last updated