_allowances[from][msg.sender] = _allowances[from][msg.sender].sub(value);
(master)$ git submodule init
return mod(a, b, “SafeMath: modulo by zero”);
_balances[to] = _balances[to].add(value);
2.2.2 查察账户余额
本实践案例中,我们首先会搭建和启动一条substrate链,再通过MetaMask这款著名的钱包欣赏器插件,通过自界说RPC的方法,接入我们搭建好的substrate链。}
return sub(a, b, “SafeMath: subtraction overflow”);
(master)$ git submodule update
2020-07-18 22:59:30 Prepared block for proposing at 1 [hash: 0xd3558be2df939b94ba94d82ded332216b0b06a55596d0a61a858aeaf7acc16c4; parent_hash: 0xa26e…22df; extrinsics (1): [0xead1…ac1b]]
_totalSupply = myTotalSupply;
emit Transfer(from, to, value);
string symbol = “xyc”;
然后我们会在remix这款智能合约在线IDE上的完成ERC20智能合约的开拓、编译、陈设、调试。remix将通过Injected Web3的方法接入我们的MetaMask钱包,借助MetaMask实现和substrate链的交互。
子模组 ‘vendor/ethereum’ (https://github.com/rust-blockchain/ethereum) 已为路径 ‘vendor/ethereum’ 注册
}
2020-07-18 22:59:28 Loading GRANDPA authority set from genesis on what appears to be first startup.
_allowances[msg.sender][spender] = value;
uint256 private _totalSupply;
郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。