Everything works perfectly as expected, contract is getting deployed on hardhat network as expected but Its not working in sepolia.
when I writes
yarn hh deploy --network sepolia
its giving this error
TypeError: Cannot read properties of undefined (reading 'length')
at getFrom (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat-deploy/src/helpers.ts:1640:14)
at fetchIfDifferent (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat-deploy/src/helpers.ts:827:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at _deployOne (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat-deploy/src/helpers.ts:905:24)
at DeploymentsManager.executeDeployScripts (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1214:19)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at DeploymentsManager.runDeploy (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1060:5)
at SimpleTaskDefinition.action (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat-deploy/src/index.ts:444:5)
at Environment._runTaskDefinition (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat/src/internal/core/runtime-environment.ts:358:14)
at Environment.run (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat/src/internal/core/runtime-environment.ts:191:14)
at SimpleTaskDefinition.action (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat-deploy/src/index.ts:595:32)
at Environment._runTaskDefinition (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat/src/internal/core/runtime-environment.ts:358:14)
at Environment.run (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat/src/internal/core/runtime-environment.ts:191:14)
at SimpleTaskDefinition.action (/media/humayou/272F73E63EAB4DD6/hardHat/Decentralize Lottery Platform/node_modules/hardhat-deploy/src/index.ts:684:5)
require("@nomiclabs/hardhat-waffle")
require("@nomiclabs/hardhat-ethers")
require("hardhat-deploy")
require("solidity-coverage")
require("hardhat-gas-reporter")
require("hardhat-contract-sizer")
require("dotenv").config()
const PrivateKey=process.env.PrivateKey
const EtherScanApiKey=process.env.EtherScanApiKey
const Sepolia_Rpc_Url=process.env.Sepolia_Rpc_Url
/**
*
@type import('hardhat/config').HardhatUserConfig
*/
module.exports={
defaultNetwork:"hardhat",
solidity:"0.8.18",
namedAccounts: {
// default:0,
deployer: {
default: 0,
1:0// here this will by default take the first account as deployer
// similarly on mainnet it will take the first account as deployer. Note though that depending on how hardhat network are configured, the account 0 on one network can be different than on another
},
player: {
default: 0,
},
},
networks:{
hardhat:{
chainId:31337,
blockConfirmation:1,
},
sepolia:{
chainId:11155111,
blockConfirmation:6,
url:Sepolia_Rpc_Url||"https://eth-sepolia.g.alchemy.com/v2/ElyVvZi045_6qUvVtN4HagaSbIfr0WQx",
account:PrivateKey!==undefined?[PrivateKey]:[]
}
}
}
somebody help me please, I have got stucked from last two day, its getting insane
Everything works perfectly as expected, contract is getting deployed on hardhat network as expected but Its not working in sepolia. when I writes
its giving this error
My Deploy File:
config file:
somebody help me please, I have got stucked from last two day, its getting insane