File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,13 @@ require('@nomiclabs/hardhat-etherscan')
77/**
88 * @type import('hardhat/config').HardhatUserConfig
99 */
10+
11+ let accounts = [ ]
12+
13+ if ( process . env . PRIVATE_KEY ) {
14+ accounts = [ `0x${ process . env . PRIVATE_KEY } ` , ...accounts ]
15+ }
16+
1017module . exports = {
1118 solidity : {
1219 version : '0.8.0' ,
@@ -20,19 +27,19 @@ module.exports = {
2027 networks : {
2128 mainnet : {
2229 url : process . env . MAINNET_RPC || 'https://main-light.eth.linkpool.io' ,
23- accounts : [ `0x ${ process . env . PRIVATE_KEY } ` ]
30+ accounts
2431 } ,
2532 goerli : {
2633 url : process . env . GOERLI_RPC || 'https://goerli-light.eth.linkpool.io' ,
27- accounts : [ `0x ${ process . env . PRIVATE_KEY } ` ]
34+ accounts
2835 } ,
2936 polygon : {
3037 url : process . env . POLYGON_RPC || 'https://polygon-rpc.com' ,
31- accounts : [ `0x ${ process . env . PRIVATE_KEY } ` ]
38+ accounts
3239 } ,
3340 mumbai : {
3441 url : process . env . MUMBAI_RPC || 'https://rpc-mumbai.maticvigil.com' ,
35- accounts : [ `0x ${ process . env . PRIVATE_KEY } ` ]
42+ accounts
3643 }
3744 } ,
3845 etherscan : {
You can’t perform that action at this time.
0 commit comments