Complete the code to import ethers from the hardhat package.
const { [1] } = require('hardhat');We import ethers from the hardhat package to interact with Ethereum in tests.
Complete the code to deploy a contract named 'SimpleStorage'.
const SimpleStorage = await ethers.getContractFactory([1]);
const simpleStorage = await SimpleStorage.deploy();The contract factory is created by passing the exact contract name as a string, here 'SimpleStorage'.
Fix the error in the test assertion to check if the stored value equals 42.
expect(await simpleStorage.retrieve()).to.[1](42);
The correct Chai assertion method is equal to compare values.
Fill both blanks to wait for the deployment transaction to be mined.
const tx = await simpleStorage.[1](); await tx.[2]();
We call the store function to send a transaction, then wait to wait for it to be mined.
Fill all three blanks to write a test that checks if the stored value updates correctly.
it('updates stored value', async function() { const tx = await simpleStorage.[1](100); await tx.[2](); const result = await simpleStorage.[3](); expect(result).to.equal(100); });
The test calls store to update, waits for mining with wait, then retrieves the value with retrieve to check it.