Merge tag 'v2.1.1' of github.com:OpenZeppelin/openzeppelin-solidity
v2.1.1
This commit is contained in:
@ -1,33 +1,27 @@
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.0;
|
||||
|
||||
import "zos-lib/contracts/Initializable.sol";
|
||||
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 Initializable, IERC20 {
|
||||
function tokenURI() external view returns (string);
|
||||
function tokenURI() external view returns (string memory);
|
||||
|
||||
uint256[50] private ______gap;
|
||||
}
|
||||
|
||||
|
||||
contract ERC20WithMetadata is Initializable, ERC20TokenMetadata {
|
||||
string private _tokenURI = "";
|
||||
string private _tokenURI;
|
||||
|
||||
function initialize(string tokenURI)
|
||||
public
|
||||
initializer
|
||||
{
|
||||
function initialize(string memory tokenURI) public {
|
||||
_tokenURI = tokenURI;
|
||||
}
|
||||
|
||||
function tokenURI() external view returns (string) {
|
||||
function tokenURI() external view returns (string memory) {
|
||||
return _tokenURI;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user