mirror of openzeppelin-contracts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openzeppelin-contracts/contracts/drafts/ERC1046/TokenMetadata.sol

30 lines
753 B

pragma solidity ^0.4.21;
import "../../token/ERC20/IERC20.sol";
/**
* @title ERC-1047 Token Metadata
* @dev See https://eips.ethereum.org/EIPS/eip-1046
* @dev tokenURI must respond with a URI that implements https://eips.ethereum.org/EIPS/eip-1047
* @dev TODO - update https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC721/IERC721.sol#L17 when 1046 is finalized
*/
contract ERC20TokenMetadata is IERC20 {
function tokenURI() external view returns (string);
}
contract ERC20WithMetadata is ERC20TokenMetadata {
string private tokenURI_ = "";
constructor(string _tokenURI)
public
{
tokenURI_ = _tokenURI;
}
function tokenURI() external view returns (string) {
return tokenURI_;
}
}