Create ERC20 social token for online community

Hi I’m trying to create an ERC20 social token for our online community, surprisingly I think I have found a somewhat beginner-friendly solution in OpenZepplin, Remix, and MetaMask

I’m just wondering if anybody is willing to help me create it, I’ve managed so far to create a ERC20 Detailed on the TestNet and successfully sent to another wallet and check Etherscan and all looked good

Now wanting to add more functionality to the token but have become stuck with the guide I have found so far, I know they are great guide im just not at the level to follow them

I would like to add a Hard Cap to the Contract, as well as a burnable feature

Really hope someone can spare the time to help, not doing this to shill it’s going to be a utility token

This is the ERC20 Contract I created

pragma solidity ^0.5.0;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20Detailed.sol";

contract Tweedies is ERC20, ERC20Detailed {

    constructor () public ERC20Detailed("Tweedies", "TWD", 18) {
        _mint(msg.sender, 10000000 * (10 ** uint256(decimals())));
    }
}
1 Like

I used this guide initially to create the test token:

https://forum.openzeppelin.com/t/importing-openzeppelin-contracts-in-remix/1420

(New member, so only allowed 2 links in each post)

1 Like

As for burnable feature, maybe you can check this answer:

2 Likes

Hi @Josh_Read,

Welcome to the community :wave:

If you want a token with a fixed supply (minted when deployed) you could start with the following:

What type of burning functionality are you thinking of?

I suggest reading: Points to consider when creating a fungible token (ERC20, ERC777)

You could also look at: Create an ERC20 using Remix, without writing Solidity

1 Like

Thanks for the replies guys, I kind of hoping you could provide something like…

pragma solidity ^0.5.0;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20Detailed.sol";



contract **"insert contract name"** is ERC20, ERC20Detailed {

    constructor () public ERC20Detailed(**"insert token name"**, **"insert token sym"**, 18) {
        _mint(msg.sender, **"insert number of tokens"** * (10 ** uint256(decimals())));

but one that is relevant for a ‘burnable’ and ‘hard capped’ token

1 Like

its adding the file path for ‘burnable’ and ‘hardcap’ tokens and then how to setup the correct Constructor that I don’t understand

1 Like

Hi @Josh_Read,

The simple ERC20 you provided has a fixed supply. There is no public function to allow minting of additional tokens which means there is no need for a cap.

When you say burnable, what do you mean?
Do you mean functionality for a token holder to burn their tokens (or someone with an allowance to burn them on their behalf).