0

I am using hardhat + ethers + infura for my contract development and testing, and all has been fine so far. On my local computer, when I run

const [deployer, d2] = await ethers.getSigners();

in my javascript environment, I get two signers with a distinct address and with some power of ten of ETH stored on these addresses.

I am now moving to the Kovan testnet, because my contracts appeal to the Chainlink price feed. I use Infura to connect to the net. However, when I run

const [deployer, d2] = await ethers.getSigners();

console.log("deployer.address:", deployer.address);
console.log("deployer.balance:", (await deployer.getBalance()).toString());
console.log("d2.type", typeof d2);

I get

deployer.address: 0xE1**************************************
deployer.balance: 5******************
d2.type undefined

(Numerical values are partially hidden for privacy.)

How can I get multiple signers on the Kovan testnet? This is obviously necessary for proper testing for more complex contracts with multiple individuals involved. Thanks a lot!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.