Cross-chain ERC-1155
Deploying the ERC1155 NFT Contract on the Sender Chain
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract SimpleErc1155 is ERC1155URIStorage, Ownable {
constructor(string memory baseUri) ERC1155(baseUri) {}
function mint(address to, uint256 tokenId, uint256 amount) external {
_mint(to, tokenId, amount, "");
}
function setURI(uint256 tokenId, string calldata tokenURI) external onlyOwner {
_setURI(tokenId, tokenURI);
}
}Deploying the Mapping Contract on the Receiver Chain
Example:
Last updated