无效帐户:#0 网络:ropsten - 私钥太短,预期为 32 字节
发布时间:2022-08-28 19:45:27 310
相关标签: # html5
require("@nomiclabs/hardhat-waffle");
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const INFURA_PROJECT_ID = "3dxxxx";
const ROPSTEN_PRIVATE_KEY = "e6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
module.exports = {
networks: {
ropsten: {
url: `https://ropsten.infura.io/v3/${INFURA_PROJECT_ID}`,
accounts: [`0x${ROPSTEN_PRIVATE_KEY}`]
}
}
};
根据网站上的示例,我将合同部署到了ropsten,但报告了一个错误。私钥大于32位
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报