Skip to content

Instantly share code, notes, and snippets.

@nglglhtr nglglhtr/BasicERC20.sol Secret
Created Oct 25, 2019

Embed
What would you like to do?
Basic Tokens (ERC721/20) - Key Management Strategies Demo
pragma solidity ^0.5.0;
import "github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";
import "github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
contract BasicERC20 is ERC20, ERC20Detailed {
constructor (
string memory _name,
string memory _symbol,
uint8 _decimals
) public
ERC20Detailed(_name, _symbol, _decimals) {
}
// function caller gets specified amount of tokens
function mintTokens (uint256 amount) public {
_mint (msg.sender, amount);
}
}
pragma solidity ^0.5.5;
import 'github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC721/ERC721Full.sol';
contract BasicERC721 is ERC721Full {
constructor(
string memory _name,
string memory _symbol
) public ERC721Full(_name, _symbol) {
}
// function caller gets specified amount of tokens
function mintToken (uint256 tokenId) public {
_mint (msg.sender, tokenId);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.