EnvelopwNFT1155
This contract is based on the classic ERC-1155 standard token contract. A detailed description of the methods of the standard can be found in the documentation (https://docs.openzeppelin.com/contracts/4.x/api/token/erc1155). The contract is used for minting, burning and wNFT ERC-1155 transfers that the WrapperBaseV1 protocol contract creates for users.
The mint, burn methods are defined in the EnvelopwNFT1155 contract, taking into account the logic of the protocol.
The mint, burn method can only call the WrapperBaseV1 contract. No other address can call these methods.
Method wnftInfo
The method returns all data about wNFT.
Input method call parameters:
A description of the returned data types can be found in the LibEnvelopTypes.sol contact, ETypes library.
Returned values:
ETypes.WNFT
ETypes.AssetItem
ETypes.Asset
ETypes.AssetType:
0 - empty;
1 - native token (coin);
2 - ERC-20;
3 - ERC-1155;
4 - ERC-1155.
ETypes.Fee
ETypes.Lock
ETypes.Royalty
Method URI
Method returns reference to metadata of original NFT for wNFT. If empty, the metadata generated by the EnvelopwNFT1155 contract will be returned.
Input method call parameters:
Returned values:
Method safeTransferFrom
The method works based is based on the ERC-1155 method. Link to documentation (https://docs.openzeppelin.com/contracts/4.x/api/token/erc1155#IERC1155-safeTransferFrom-address-address-uint256-uint256-bytes-).
When a transfer is made, the transfer fee is calculated if the creator of wNFT has made the appropriate settings for it. The fee is held in ERC-20 tokens whose smart-contract address the wNFT creator has specified when he wrapped. The fee can be allocated to royalty beneficiaries, or part or all of the fee can be added to wNFT's Collateral.
The method does not return anything.
Input method call parameters:
Last updated