Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
misc: some adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Ermolin committed Mar 15, 2021
1 parent d0a432a commit e888b58
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
19 changes: 19 additions & 0 deletions scripts/run-blockchain.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

start_testrpc() {
npm run testrpc
}

start_blockchain() {
cd $PWD/test-blockchain
bash run-docker.sh
cd ..
}

echo "Starting our own geth instance"
start_blockchain

echo "Starting our own testrpc instance"
start_testrpc


2 changes: 0 additions & 2 deletions scripts/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ start_testrpc
echo "Starting our own geth instance"
start_blockchain

npm run truffle:migrate "$@"

if [ "$SOLIDITY_COVERAGE" = true ]; then
npm run truffle:coverage "$@"
else
Expand Down
6 changes: 2 additions & 4 deletions scripts/stake.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ async function stake() {
const maticToken = await RootToken.at(contracts.root.tokens.MaticToken)
console.log({ stakeManager: stakeManager.address, maticToken: maticToken.address, stakeToken: await stakeManager.token() })
console.log('Sender accounts has a balanceOf', (await maticToken.balanceOf(accounts[0])).toString())
maticToken.approve(stakeManager.address, web3.utils.toWei('1000000'))
await delay(5)
await maticToken.approve(stakeManager.address, web3.utils.toWei('1000000'))
console.log('sent approve tx, staking now...')
// Remember to change the 4th parameter to false if delegation is not required
stakeManager.stakeFor(validatorAccount, stakeAmount, heimdallFee, true, pubkey)
return delay(5)
await stakeManager.stakeFor(validatorAccount, stakeAmount, heimdallFee, true, pubkey)
}

async function topUpForFee() {
Expand Down

0 comments on commit e888b58

Please sign in to comment.