美文网首页
2018-06-05Mist死磕(2)

2018-06-05Mist死磕(2)

作者: 战略分析局 | 来源:发表于2018-06-05 05:48 被阅读0次

果然再次遇到问题。在4:20启动了Mist后,这家伙又一次Stuck了。
按照昨晚的经验,此时应该是耐心等待,所以先来写一下记录。

已经经过了多次转载,作者也在注释中声明:没有任何限制权利,转载、复制请随意。
复制如下:
/*This creates a public tradeable fungible token in the Ethereum Blockchain.
https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs (实际上这个网址没有太大作用)
Unmodified this will create a cryptoasset with a fixed market cap
wholly owned by the contract creator. You can create any function
to change this contract, like allowing specific rules for the issuance,
destruction and freezing of any assets. This contract is intended for
educational purposes, you are fully responsible for compliance with
present or future regulations of finance, communications and the
universal rights of digital beings.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to http://unlicense.org /
pragma solidity ^0.4.21;
contract MyToken {
/
Public variables of the token代币的公共变量 */
string public name;
string public symbol;
uint8 public decimals;

/* This creates an array with all balances创建所有账户的数组 */
mapping (address => uint256) public balanceOf;

/* This generates a public event on the blockchain that will notify clients 在区块链上产生一个通知客户的公共事件*/
event Transfer(address indexed from, address indexed to, uint256 value);

/* Initializes contract with initial supply tokens to the creator of the contract /
function MyToken(uint256 _supply, string _name, string _symbol, uint8 _decimals) public {
/
if supply not given then generate 1 million of the smallest unit of the token */
if (_supply == 0) _supply = 1000000;

/* Unless you add other functions these variables will never change */
balanceOf[msg.sender] = _supply;
name = _name;
symbol = _symbol;

/* If you want a divisible token then add the amount of decimals the base unit has */
decimals = _decimals;
}

/* Send coins /
function transfer(address _to, uint256 _value) public {
/
if the sender doenst have enough balance then stop */
if (balanceOf[msg.sender] < value) return;
if (balanceOf[_to] + _value < balanceOf[
to]) return;

/* Add and subtract new balances */
balanceOf[msg.sender] -= value;
balanceOf[
to] += _value;

emit Transfer(msg.sender, _to, _value);
}
}

写到这儿,Mist还在stuck :(
那只能再接着等待了。

相关文章

  • 2018-06-05Mist死磕(2)

    果然再次遇到问题。在4:20启动了Mist后,这家伙又一次Stuck了。按照昨晚的经验,此时应该是耐心等待,所以先...

  • 产品经理的三阶段修炼

    初级产品经理的三项修炼 1、死磕界面 2、死磕流程 3、死磕流畅度 以自我为中心的理念,我是专业人士心态 中级产品...

  • 死磕Handler(2)

    Handler在Thread使用 在子线程中使用handler实例: 可以看到,在子线程中创建handler需要注...

  • “死磕”与学习

    也说“死磕” 死磕到底,死磕精神,死磕侠。互联网的发达,孕育了越来越多的网络词汇,“死磕”现在出现的频率颇高。 那...

  • 这些“死磕成本”的店,却因高体验卖出了惊人销量

    有些店死磕服务,有些死磕产品,还有些死磕成本。可有些品牌除了这些,还死磕别的... 无论何时,店铺的人工成本、租金...

  • 死磕与磕死

    前天晚上,打开百度网盘,准备听梁冬的节目睡睡平安,突然发现所有的音频转哪转哪,就是不出声音。到底哪里出了毛病?听听...

  • 磕,死磕

    疫情期间,你做的最多的是什么? 我啊~大概是反省吧,自省。 我发现反省是扇隐秘的门,一旦打开,就像探险一样,不停的...

  • 2019.01.01

    开始坚持死磕之旅 三人死磕之旅,2018年01月01日 每日3个微习惯: 1.晚上刷牙。《失败》 2.给小帅讲2篇...

  • 死磕别人,不如死磕自己

    【死磕别人,不如死磕自己。】有朋友是干销售的,任凭那股子死磕别人的毅力,一切都是那么不可控,最后只剩毅力。与其死磕...

  • 投稿2:“死磕”弗兰克

    饭团《每周一本书》的“思考”栏里,弗兰克分享的他文章《3个方法把2000块的课听出20000块的效果》,里面写到链...

网友评论

      本文标题:2018-06-05Mist死磕(2)

      本文链接:https://www.haomeiwen.com/subject/paiusftx.html