ERC20Metadata.sol 603 B

123456789101112131415161718192021222324
  1. pragma solidity ^0.5.0;
  2. import "../../token/ERC20/IERC20.sol";
  3. /**
  4. * @title ERC-1047 Token Metadata
  5. * @dev See https://eips.ethereum.org/EIPS/eip-1046
  6. * @dev {tokenURI} must respond with a URI that implements https://eips.ethereum.org/EIPS/eip-1047
  7. */
  8. contract ERC20Metadata {
  9. string private _tokenURI;
  10. constructor (string memory tokenURI_) public {
  11. _setTokenURI(tokenURI_);
  12. }
  13. function tokenURI() external view returns (string memory) {
  14. return _tokenURI;
  15. }
  16. function _setTokenURI(string memory tokenURI_) internal {
  17. _tokenURI = tokenURI_;
  18. }
  19. }