Viewing a response to: @maxnachamkin/how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified
Thanks for this post. However I am having difficulty verifying my source code. I keep getting the error Missing Constructor Arguments for function MyToken(uint256 initialSupply, string tokenName, uint8 decimalUnits, string tokenSymbol) Here is my Source Code any help would be greatly appreciated. I'll throw you at least $5 worth of steem if you can help me out. pragma solidity ^0.4.11; contract tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData); } contract MyToken { /* Public variables of the token */ string public standard = 'Token 0.1'; string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; /* This generates a public event on the blockchain that will notify clients */ event Transfer(address indexed from, address indexed to, uint256 value); /* This notifies clients about the amount burnt */ event Burn(address indexed from, uint256 value); /* Initializes contract with initial supply tokens to the creator of the contract */ function MyToken( uint256 initialSupply, string tokenName, uint8 decimalUnits, string tokenSymbol ) { balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens totalSupply = initialSupply; // Update total supply name = tokenName; // Set the name for display purposes symbol = tokenSymbol; // Set the symbol for display purposes decimals = decimalUnits; // Amount of decimals for display purposes } /* Send coins */ function transfer(address _to, uint256 _value) { require(_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require(balanceOf[msg.sender] >= _value); // Check if the sender has enough require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows balanceOf[msg.sender] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place } /* Allow another contract to spend some tokens in your behalf */ function approve(address _spender, uint256 _value) returns (bool success) { allowance[msg.sender][_spender] = _value; return true; } /* Approve and then communicate the approved contract in a single tx */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } } /* A contract attempts to get the coins */ function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { require(_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require(balanceOf[_from] >= _value); // Check if the sender has enough require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient allowance[_from][msg.sender] -= _value; Transfer(_from, _to, _value); return true; } function burn(uint256 _value) returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _value); return true; } function burnFrom(address _from, uint256 _value) returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Subtract from the targeted balance allowance[_from][msg.sender] -= _value; // Subtract from the sender's allowance totalSupply -= _value; // Update totalSupply Burn(_from, _value); return true; } }
author | winglessss |
---|---|
permlink | re-maxnachamkin-how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified-20170726t235801357z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-07-26 23:57:57 |
last_update | 2017-07-26 23:57:57 |
depth | 1 |
children | 6 |
last_payout | 2017-08-02 23:57:57 |
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 | 5,007 |
author_reputation | 208,894,886,989 |
root_title | "How To Create Your Own Ethereum Token In An Hour (ERC20 + Verified)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 9,851,836 |
net_rshares | 0 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
stevy | 0 | 0 | 100% | ||
wombleoftherock | 0 | 0 | 100% | ||
cyrillebtc | 0 | 0 | 100% | ||
xs1l3n7x | 0 | 0 | 100% | ||
myteamsucks | 0 | 0 | 100% | ||
milindraje | 0 | 0 | 100% | ||
lapapanite | 0 | 0 | 100% | ||
anirudhmurali | 0 | 0 | 100% | ||
theoriginal3ddee | 0 | 0 | 100% | ||
theroxat | 0 | 0 | 100% | ||
evilsign | 0 | 0 | 100% |
besides not having inserted throw if your stil having issues check balanceOf[_from] -= _value; // Subtract from the sender's allowance allowance[_from][msg.sender] -= _value; // Subtract from the targeted balance totalSupply -= _value; // Update totalSupply i also believe you can delete allowance[_from] line completly
author | ccmut |
---|---|
permlink | re-winglessss-re-maxnachamkin-how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified-20170729t070128911z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-07-29 07:01:36 |
last_update | 2017-07-29 07:01:36 |
depth | 2 |
children | 0 |
last_payout | 2017-08-05 07:01:36 |
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 | 433 |
author_reputation | 70,425,903,947 |
root_title | "How To Create Your Own Ethereum Token In An Hour (ERC20 + Verified)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 10,092,999 |
net_rshares | 0 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
winglessss | 0 | 0 | 100% |
Good article with worthwhile information. meanwhile, try this link to know about step by step process of creating erc20 token, erc223 token creation, erc721 token creation-https://www.cryptoexchangescript.com/erc20-token-creation
author | coinjokerscript |
---|---|
permlink | re-winglessss-re-maxnachamkin-how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified-20180828t074809188z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1","links":["https://www.cryptoexchangescript.com/erc20-token-creation"]} |
created | 2018-08-28 07:48:03 |
last_update | 2018-08-28 07:48:39 |
depth | 2 |
children | 0 |
last_payout | 2018-09-04 07:48:03 |
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 | 230 |
author_reputation | 2,808,208,518 |
root_title | "How To Create Your Own Ethereum Token In An Hour (ERC20 + Verified)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 69,578,309 |
net_rshares | 0 |
Thank you so much! One of the best posts on steemit!!! Can I just paste this in windows 7 notepad?
author | theoriginal3ddee |
---|---|
permlink | re-winglessss-re-maxnachamkin-how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified-20180207t235313784z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-02-07 23:53:24 |
last_update | 2018-02-07 23:53:24 |
depth | 2 |
children | 0 |
last_payout | 2018-02-14 23:53:24 |
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 | 98 |
author_reputation | 580,827,569 |
root_title | "How To Create Your Own Ethereum Token In An Hour (ERC20 + Verified)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 35,777,951 |
net_rshares | 615,035,572 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
theoriginal3ddee | 0 | 615,035,572 | 100% | ||
communisttea | 0 | 0 | 100% |
HI - I can see from here that you havent completed the following: 
author | tombola |
---|---|
permlink | re-winglessss-re-maxnachamkin-how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified-20180213t134750805z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"image":["https://steemitimages.com/DQmUMHFTiqpYeKvTEDk35kq4hiYwr1ESMU4D1ymDaRkyJnD/image.png"],"app":"steemit/0.1"} |
created | 2018-02-13 13:47:51 |
last_update | 2018-02-13 13:47:51 |
depth | 2 |
children | 1 |
last_payout | 2018-02-20 13:47:51 |
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 | 155 |
author_reputation | 0 |
root_title | "How To Create Your Own Ethereum Token In An Hour (ERC20 + Verified)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 37,219,966 |
net_rshares | 0 |
Sorry - see you have fixed it!
author | tombola |
---|---|
permlink | re-tombola-re-winglessss-re-maxnachamkin-how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified-20180213t134822096z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-02-13 13:48:21 |
last_update | 2018-02-13 13:48:21 |
depth | 3 |
children | 0 |
last_payout | 2018-02-20 13:48:21 |
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 | 30 |
author_reputation | 0 |
root_title | "How To Create Your Own Ethereum Token In An Hour (ERC20 + Verified)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 37,220,058 |
net_rshares | 0 |
I looked at this again today I think I figured it out
author | winglessss |
---|---|
permlink | re-winglessss-re-maxnachamkin-how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified-20170727t231833643z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-07-27 23:18:27 |
last_update | 2017-07-27 23:18:27 |
depth | 2 |
children | 0 |
last_payout | 2017-08-03 23:18:27 |
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 | 54 |
author_reputation | 208,894,886,989 |
root_title | "How To Create Your Own Ethereum Token In An Hour (ERC20 + Verified)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 9,961,698 |
net_rshares | 0 |