-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathYash_coin.sol
69 lines (47 loc) · 1.58 KB
/
Yash_coin.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
pragma solidity >=0.4.22 <0.7.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol";
/**
* @title MyERC721Token
* @author
*/
contract MyERC721Token is ERC721 {
/**
* @dev Create the Token by Passing the Name and Symbol to the ERC721 Cconstructor
*/
constructor() ERC721("YashCoin","YASH") public {}
function namedecl() public view returns (string memory) {
return name();
}
function symboldecl() public view returns (string memory) {
return symbol();
}
function totalSupplycount() public view returns (uint256) {
return totalSupply();
}
/**
* @dev Function to Mint a new ERC721 Token
* @param tokenId Unique Token ID
*/
function mintMyToken(uint256 tokenId) public {
//Calling the Built-in function in ERC721
_mint(msg.sender,tokenId);
}
/**
* @dev Function to Transfer a ERC721 token
* @param from Owner address
* @param to Receiver address
* @param tokenId ERC721 Token ID
*/
function transferMyToken(address from, address to, uint256 tokenId) public {
//Calling the Built-in function in ERC721
_transfer(from, to, tokenId);
}
/**
* @dev Function to Burn a ERC721 token
* @param tokenId ERC721 Token ID
*/
function burnMyToken(uint256 tokenId) public {
//Calling the Built-in function in ERC721
_burn( tokenId);
}
}