我正在研究坚固性。
测试网上TT3代币生成没问题,但TT3Token_Test失败。(TT3Token和TT3Token_Test已经部署到同一个钱包地址)
https://ropsten.etherscan.io/tx/0x4099019ecc47640dc7d3ceb3de3d50759f4e5ebc6d730410cda992c97d78ea10
我不知道为什么不。
(我使用 remix 将它部署到 ropsten)
pragma solidity ^0.4.23;
import "./StandardToken.sol"; // openzeppelin
contract TT3Token is StandardToken {
string public constant name = "TT3Token";
string public constant symbol = "TT3";
uint8 public constant decimals = 18;
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));
constructor() public {
totalSupply_ = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;
emit Transfer(0x0, msg.sender, INITIAL_SUPPLY);
}
function sendTest(address _to, uint256 _value) public {
transfer(_to, _value);
}
}
contract TT3Token_Test {
constructor() public {
address r = 0xEcA254594c5bBCCEBc321e9252cc886cE37Be914;
TT3Token token = TT3Token(msg.sender);
token.sendTest(r, 99 * (10 ** uint256(18)));
}
}