【发布时间】:2019-02-21 12:47:12
【问题描述】:
运行 truffle 测试时,控制台出现以下错误。这可能是什么问题造成的。
错误:tx 没有正确的随机数。帐户的随机数为:7 tx 的随机数为:6
function activateAirline(address airlineAddress) external payable returns(bool) {
require(isOperational(), "Service is not available");
require(msg.sender == airlineAddress, "You can only fund your airline");
require(msg.value == 10 ether, "Please submit 10 ether to activate your airline");
contractOwner.transfer(10 ether);
}
这是我运行合约脚本的松露初始化
这是我的松露迁移文件
这是我的松露测试
这是我的合约函数
【问题讨论】:
-
在此处将代码添加为文本,而不是图像。
-
也添加了代码。
标签: ethereum solidity truffle ganache