accounts[0] returns 字符串中的网络名称
accounts[0] returns network name in string
我是运行一组处于测试模式的智能合约,以便执行一些初始测试。然而,非常奇怪的是,当 运行 truffle migrate --network testrpc
并在我的迁移文件中使用 accounts[0]
时,我收到以下错误:
Error: Provided address "t" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted.
在这个字符串中,"t"其实就是testrpc的首字母。如果我使用帐户[1],我会得到 "e",等等...
我之前使用的是testrpc命令行环境,后来切换到ganache-cli来尝试解决问题。不幸的是,一切都没有像我预期的那样有效,我仍然被这个问题所困扰。
我 运行 在 Ubuntu 上,所以这可能会导致问题?
编辑 1:迁移文件:
// Starting deployment of asset
module.exports = async function(deployer, network, accounts) {
// owner wallet
var wallet = accounts[0];
};
我没有找到为什么它不能与 testrpc
一起使用,所以我切换到 ganache-cli
也提供了同样的问题......我终于辞职使用 Ganache 客户端应用程序, 它奏效了...
我是运行一组处于测试模式的智能合约,以便执行一些初始测试。然而,非常奇怪的是,当 运行 truffle migrate --network testrpc
并在我的迁移文件中使用 accounts[0]
时,我收到以下错误:
Error: Provided address "t" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted.
在这个字符串中,"t"其实就是testrpc的首字母。如果我使用帐户[1],我会得到 "e",等等...
我之前使用的是testrpc命令行环境,后来切换到ganache-cli来尝试解决问题。不幸的是,一切都没有像我预期的那样有效,我仍然被这个问题所困扰。
我 运行 在 Ubuntu 上,所以这可能会导致问题?
编辑 1:迁移文件:
// Starting deployment of asset
module.exports = async function(deployer, network, accounts) {
// owner wallet
var wallet = accounts[0];
};
我没有找到为什么它不能与 testrpc
一起使用,所以我切换到 ganache-cli
也提供了同样的问题......我终于辞职使用 Ganache 客户端应用程序, 它奏效了...