Download third_party/real_code/rc21/sources/src/helpers/VemoWalletCollection.sol from UTSCybeR/nftbench: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/datasets/UTSCybeR/nftbench/resolve/main/third_party/real_code/rc21/sources/src/helpers/VemoWalletCollection.sol
- Command line
-
hf download hf://datasets/UTSCybeR/nftbench/third_party/real_code/rc21/sources/src/helpers/VemoWalletCollection.sol
-
curl -L -o VemoWalletCollection.sol https://huggingface.co/datasets/UTSCybeR/nftbench/resolve/main/third_party/real_code/rc21/sources/src/helpers/VemoWalletCollection.sol
1.07 kB
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.0; | |
| import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
| import "@openzeppelin/contracts/access/Ownable.sol"; | |
| contract VemoWalletCollection is ERC721, Ownable { | |
| uint256 private _nextTokenId; | |
| mapping(uint256 => string) private _tokenURIs; | |
| constructor( | |
| string memory name, | |
| string memory symbol, | |
| address owner | |
| ) ERC721(name, symbol) Ownable(owner) {} | |
| function safeMint(address to, string memory uri) public onlyOwner returns (uint256 tokenId){ | |
| tokenId = _nextTokenId++; | |
| _safeMint(to, tokenId); | |
| _setTokenURI(tokenId, uri); | |
| } | |
| function _setTokenURI(uint256 tokenId, string memory uri) internal { | |
| _tokenURIs[tokenId] = uri; | |
| } | |
| function tokenURI(uint256 tokenId) public view override returns (string memory) { | |
| return _tokenURIs[tokenId]; | |
| } | |
| function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) { | |
| return super.supportsInterface(interfaceId); | |
| } | |
| } | |