I'm passing the contract address from a bash script export CONTRACT_ADDRESS
I verified contractAddress has the correct value in my javascript, but I'm getting NotImplementedError: Method 'HardhatEthersProvider.resolveName' is not implemented
Previously if I had it in a .env file, everything was working as expected
Below is my script
require("dotenv").config();
const hre = require("hardhat");
async function main() {
const value = process.env.VALUE;
const contractAddress = process.env.CONTRACT_ADDRESS;
const MyContract = await hre.ethers.getContractFactory("GetterSetter");
const myContract = MyContract.attach(contractAddress);
await myContract.setBytes32(value);
console.log("Set the value to:", value);
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});