-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ERC20 token template using OpenZeppelin ERC20 implementation #164
Comments
This tutorial was intentionally designed to follow the example in the Solidity docs - https://solidity.readthedocs.io/en/v0.5.13/introduction-to-smart-contracts.html#subcurrency-example which is in turn a simplified version of the open zeppelin ERC-20, which we also did intentionally to keep it simpler for new developers. I also think that for this "first step" covering imports and inheritance etc is way to complex, which is why we saved it for the later tutorials. We are going to update all the tutorials soon, so maybe we'll think about the connections between them a little better in that review (#162) PS. There were Zeppelin people involved in this project from early days. |
I like the progression starting with Hello World. I was thinking that an ERC20 template could sit between Coin and NFTPizza. |
Yeah, that's a fair point, and I think was always at the back of my mind anyway. And nice to meet a fellow Melburnian 🇦🇺 |
Let me know if you need a simple ERC20 token that inherits from the OpenZeppelin implementation: Also 👋 from the Melbourne suburbs. 🇦🇺 |
@abcoathup @ChrisChinchilla imo this is really needed. People might have no idea what ERC-20 might be though, so maybe we can find a better name for it? P.S: Together with the Hellow World, the ERC-20 template was the most used template in Superblocks Lab in the past (by far). |
@samajammin what about including some template to demonstrate this case? It is an easy way to demonstrate how do you actually can create a tradable token/coin/asset or whatever we consider naming it. |
Was always on the list. When I've updated the existing ones, I'll get to it. And probably make a video to match this tutorial too as it's still "beginner" |
@javier-tarazaga does Studio support the ability to inspect the contracts it's inheriting from? If it's not possible, I agree with Chris that adding imports & inheritance risks creating too much confusion for new developers. There'd be no obvious/easy way to view the source code. That said, I'm a proponent of updating the Coin example to be a full ERC-20 implementation. It's clear by the search volume it yields, there's a ton of buzz around ERC-20 as a concept & for me personally, seeing the code of the ERC-20 was one of my major "magic" moments with Ethereum. "Oh, an ERC-20 token is really this simple!?". Small anecdotal evidence but I've spoken with several other Ethereum developers who have shared this sentiment. |
@samajammin I would prior then this for the next batch of things to change. And answering your question, yes you can always see the code of the smart contract imported atm. You can't navigate directly from within the editor BUT all dependencies are always part of your file system tree, so they are always available to inspect. In the case of OZ dependencies, they are under the fake "node_modules" folder atm |
Summary
Add ERC20 token template using OpenZeppelin ERC20 implementation
Motivation
https://studio.ethereum.org/ will likely be the entry point for many new developers to the space.
Whilst an example of how to implement a token (currently called coin) is useful for developers to understand that it is primarily a list of addresses and balances, it may be beneficial to show how to appropriately inherit from OpenZeppelin Contracts implementation of ERC20.
Describe alternatives you've considered
The alternative is to provide some guidance in the README for the coin template that developers could inherit from OpenZeppelin Contracts ERC20 implementation.
Additional context
The token could be as simple as pre-assigning all tokens to the creator of the contract.
Disclosure: I am the Community Manager at OpenZeppelin
The text was updated successfully, but these errors were encountered: