Dapp-a-day 1: ERC20 ===  *Each weekday leading up to devcon2, Nexus will highlight a dapp, library, or package (something with a `dappfile`) as a promotion of our toolchain and as case studies for other developers.* Today's dapp, `erc20`, contains the `ERC20` type definition, a single-contract `ERC20Base` implementation, and a factory for the base. https://github.com/nexusdev/erc20 An instance constructed from the factory is not going to be very useful. The base meant to be extended with extra functionality (issuance, whitelists, etc). Maybe the most interesting lesson from this package is how the factory must `transfer` tokens to the sender in order for `createERC20Base` to give the "creator" the initial balance, as if they constructed it directly. We will see this pattern most of the time there is a `msg.sender` in a constructor. For tokens that can be migrated or upgraded in-place, watch out for a post on `ds-tokens`, formerly part of the `dappsys` package.
author | nikolai |
---|---|
permlink | dapp-a-day-1-erc20 |
category | ethereum |
json_metadata | {"tags":["ethereum","dapp"],"links":["https://avatars3.githubusercontent.com/u/16971904?v=3&s=200"]} |
created | 2016-08-08 18:42:30 |
last_update | 2016-08-08 18:43:42 |
depth | 0 |
children | 2 |
last_payout | 2016-09-08 14:20:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 29.688 HBD |
curator_payout_value | 2.974 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,054 |
author_reputation | 9,571,877,600,096 |
root_title | "Dapp-a-day 1: ERC20" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 687,680 |
net_rshares | 20,350,761,757,360 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
anonymous | 0 | 28,850,811,064 | 1% | ||
summon | 0 | 13,184,700,010,593 | 100% | ||
riverhead | 0 | 6,389,472,799,388 | 100% | ||
boy | 0 | 2,461,146,604 | 100% | ||
bue-witness | 0 | 2,986,695,743 | 100% | ||
bunny | 0 | 571,323,943 | 100% | ||
bue | 0 | 41,012,451,732 | 100% | ||
mini | 0 | 1,319,511,164 | 100% | ||
moon | 0 | 166,917,183 | 100% | ||
healthcare | 0 | 489,688,101 | 100% | ||
daniel.pan | 0 | 704,712,701 | 100% | ||
helen.tan | 0 | 229,570,470 | 100% | ||
nikolai | 0 | 18,882,693,155 | 100% | ||
hbhades | 0 | 0 | 100% | ||
eeks | 0 | 555,439,653,671 | 100% | ||
murh | 0 | 1,449,250,452 | 33.01% | ||
kennyrowe | 0 | 73,596,357,887 | 100% | ||
zebbra2014 | 0 | 3,895,890,260 | 100% | ||
dbrock | 0 | 352,714,385 | 100% | ||
igster | 0 | 0 | 100% | ||
ntomaino | 0 | 39,313,886,468 | 100% | ||
bertrandlarsy | 0 | 239,794,058 | 100% | ||
marius19 | 0 | 144,451,316 | 100% | ||
maraoz | 0 | 273,274,710 | 100% | ||
sisterholics | 0 | 1,966,519,284 | 100% | ||
cryptocylon | 0 | 208,797,394 | 100% | ||
metaflute | 0 | 836,849,409 | 100% | ||
littlekitty | 0 | 831,157,071 | 100% | ||
pipermerriam | 0 | 65,261,747 | 100% | ||
esmit | 0 | 65,122,207 | 100% | ||
napsy | 0 | 64,300,716 | 100% | ||
stevenh512 | 0 | 59,078,190 | 100% | ||
veox | 0 | 55,225,705 | 100% | ||
lentil-soup | 0 | 55,840,589 | 100% | ||
kirozold26 | 0 | 0 | 100% | ||
santteegt | 0 | 0 | 100% |
Dapp a day is an awesome concept! Looking forward to seeing the followups. What are some potential use cases for this?
author | ntomaino |
---|---|
permlink | re-nikolai-dapp-a-day-1-erc20-20160808t204333554z |
category | ethereum |
json_metadata | {"tags":["ethereum"]} |
created | 2016-08-08 20:43:33 |
last_update | 2016-08-08 20:43:33 |
depth | 1 |
children | 1 |
last_payout | 2016-09-08 14:20:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 120 |
author_reputation | 19,085,142,785,364 |
root_title | "Dapp-a-day 1: ERC20" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 690,040 |
net_rshares | 0 |
It's a building block like legos. You could use it for just about anything a token is good for. I think the idea is you can use a token to keep track of any symbolic or tangible thing of value.
author | kennyrowe |
---|---|
permlink | re-ntomaino-re-nikolai-dapp-a-day-1-erc20-20160808t212926316z |
category | ethereum |
json_metadata | {"tags":["ethereum"]} |
created | 2016-08-08 21:29:27 |
last_update | 2016-08-08 21:29:27 |
depth | 2 |
children | 0 |
last_payout | 2016-09-08 14:20:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 194 |
author_reputation | 26,813,467,404,174 |
root_title | "Dapp-a-day 1: ERC20" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 690,866 |
net_rshares | 0 |