How to deploy with alternate account? #2745
Answered
by
joewagner
joewagner
asked this question in
Troubleshooting
-
I am running a local hardhat node for testing. When deploying a contract it defaults to using account 0 which works great most of the time, but I was hoping to be able to deploy a contract from account 17 👇
As an example:
I've been searching for a bit with no results, anyone know how to do this? |
Beta Was this translation helpful? Give feedback.
Answered by
joewagner
May 26, 2022
Replies: 1 comment
-
In case anyone has the same question, I got this to work by using the connect method on the Contract Factory. const accounts = await ethers.getSigners();
const account = accounts[17];
const TT = await ethers.getContractFactory("Contract");
const contract = (await upgrades.deployProxy(
TT.connect(account),
["https://testnet.tableland.network/tables/"],
{
kind: "uups",
}
)); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
joewagner
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In case anyone has the same question, I got this to work by using the connect method on the Contract Factory.