Skip to content

Commit

Permalink
fix(voter-dapp): fix QA script (#2430)
Browse files Browse the repository at this point in the history
* fix(voter-dapp): fix QA script

Signed-off-by: Matt Rice <matthewcrice32@gmail.com>

* WIP

Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
  • Loading branch information
mrice32 committed Jan 19, 2021
1 parent e6a54e6 commit a137482
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
4 changes: 1 addition & 3 deletions packages/core/scripts/mainnet/ProposeAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ async function propose(callback) {
*********************************/
const signingAccount = (await web3.eth.getAccounts())[0];
console.group(`Proposer account: ${signingAccount}`);
if (signingAccount !== "0x2bAaA41d155ad8a4126184950B31F50A1513cE25") {
throw new Error("Cannot propose admin votes from this account");
}
console.groupEnd();

/** *******************************
Expand Down Expand Up @@ -83,6 +80,7 @@ async function propose(callback) {
.propose([
{
to: identifierWhitelist.address,
value: 0,
data: proposedTx
}
])
Expand Down
17 changes: 8 additions & 9 deletions packages/voter-dapp/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ echo '# 0/16. Prerequisites #'
echo '# #'
echo -e '####################################################################\n'
## Will need to run some JS scripts from packages/core
cd ../core

# Prompt user to start Ganache in another window
echo "- Have you started Ganache in a separate window at port 9545? Be sure to use the following mnemonic: \"candy maple cake sugar pudding cream honey rich smooth crumble sweet treat\" "
Expand Down Expand Up @@ -48,9 +47,9 @@ echo '# #'
echo '# 2/16. Submitting price requests #'
echo '# #'
echo -e '####################################################################\n'
yarn run truffle exec ./scripts/local/RequestOraclePrice.js --network test --identifier USDETH-Commit+Reveal --time 1570000000
yarn run truffle exec ./scripts/local/RequestOraclePrice.js --network test --identifier USDETH-2key-Commit+Reveal --time 1570000000
yarn run truffle exec ./scripts/local/ProposeAdmin.js --network test
yarn run truffle exec ../core/scripts/local/RequestOraclePrice.js --network test --identifier USDETH-Commit+Reveal --time 1570000000
yarn run truffle exec ../core/scripts/local/RequestOraclePrice.js --network test --identifier USDETH-2key-Commit+Reveal --time 1570000000
yarn run truffle exec ../core/scripts/mainnet/ProposeAdmin.js --network test --prod
echo "- ✅ Price requests submitted!"

# Advance to next commit phase
Expand All @@ -59,7 +58,7 @@ echo '# #'
echo '# 3/16. Advancing to start of next voting round #'
echo '# #'
echo -e '####################################################################\n'
yarn run truffle exec ./scripts/local/AdvanceToCommitPhase.js --network test
yarn run truffle exec ../core/scripts/local/AdvanceToCommitPhase.js --network test
echo "- ✅ Advanced to next commit phase!"

# Prompt user to import account[0] from Ganache into Metamask
Expand Down Expand Up @@ -107,7 +106,7 @@ select yn in "Continue" "Help" "Exit"; do
esac
done
echo "- Advancing to the Reveal phase of the current voting round"
yarn run truffle exec ./scripts/local/AdvanceToNextVotingPhase.js --network test
yarn run truffle exec ../core/scripts/local/AdvanceToNextVotingPhase.js --network test

# Snapshot the current round
echo -e '\n####################################################################'
Expand Down Expand Up @@ -139,7 +138,7 @@ select yn in "Continue" "Help" "Exit"; do
esac
done
echo "- Advancing to the next Voting round"
yarn run truffle exec ./scripts/local/AdvanceToNextVotingPhase.js --network test
yarn run truffle exec ../core/scripts/local/AdvanceToNextVotingPhase.js --network test

# Claim rewards
echo -e '\n####################################################################'
Expand Down Expand Up @@ -201,7 +200,7 @@ select yn in "Continue" "Help" "Exit"; do
esac
done
echo "- Advancing to the Reveal phase of the current voting round"
yarn run truffle exec ./scripts/local/AdvanceToNextVotingPhase.js --network test
yarn run truffle exec ../core/scripts/local/AdvanceToNextVotingPhase.js --network test

# Snapshot the current round
echo -e '\n####################################################################'
Expand Down Expand Up @@ -233,7 +232,7 @@ select yn in "Continue" "Help" "Exit"; do
esac
done
echo "- Advancing to the next Voting round"
yarn run truffle exec ./scripts/local/AdvanceToNextVotingPhase.js --network test
yarn run truffle exec ../core/scripts/local/AdvanceToNextVotingPhase.js --network test

# Claim rewards
echo -e '\n####################################################################'
Expand Down

0 comments on commit a137482

Please sign in to comment.