LESSON 12: What is user1 & why do we need to use it? #2005
-
Hi, A simple question regarding the How come the test requires we declare I initialliy declared I haven't seen Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@DorianDaSilva : In your hardhat.config.js file, There will be So, the point is you can add as many users as you like, But you have to add them in your We make different Hopefully it will clear your doubt! |
Beta Was this translation helpful? Give feedback.
-
@jeetb @abossofmyself Thank you for the explanation, everything is clear now :) |
Beta Was this translation helpful? Give feedback.
@DorianDaSilva : In your hardhat.config.js file, There will be
user1
declared in your namedAccounts, Thats why it is working,while
user
isn't.You can add other users in there aswell means :
default : 0
isdeployer
, means account "0" in hardhat node isdeployer
,default : 1
isuser1
means account "1" in hardhat node isuser1
.So, the point is you can add as many users as you like, But you have to add them in your
namedAccounts
in yourhardhat.config.js
file.We make different
users
just for the helping purposes in our testing.Hopefully it will clear your doubt!