fixup automatic staking
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 39s Details

This commit is contained in:
Ladd Hoffman 2024-03-16 14:02:45 -05:00
parent 0fc95f0899
commit c38b4ea2f7
2 changed files with 4 additions and 7 deletions

View File

@ -5,8 +5,8 @@
"main": "index.js",
"scripts": {
"test": "hardhat test",
"automatic-staking-local": "hardhat run --network localhost scripts/automatic-staking.js localhost",
"automatic-staking-sepolia": "hardhat run --network sepolia scripts/automatic-staking.js sepolia"
"automatic-staking-local": "hardhat run --network localhost scripts/automatic-staking.js",
"automatic-staking-sepolia": "hardhat run --network sepolia scripts/automatic-staking.js"
},
"author": "",
"license": "ISC",

View File

@ -33,14 +33,11 @@ const fetchValidationPools = async () => {
};
const initialize = async () => {
const network = process.argv[2];
if (!network) {
throw new Error('please provide network name as first argument');
}
const network = process.env.HARDHAT_NETWORK;
if (!DAOAddress[network]) {
throw new Error(`network '${network}' is unknown`);
}
dao = await ethers.getContractAt('DAO', DAOAddress);
dao = await ethers.getContractAt('DAO', DAOAddress[network]);
[account] = await ethers.getSigners();
const address = await account.getAddress();
console.log(`account: ${address}`);