This repository has been archived by the owner on Mar 17, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scripts to run geth in CI (not enabled)
- Loading branch information
Showing
6 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ module.exports = { | |
} | ||
}, | ||
mocha: { | ||
reporter: 'eth-gas-reporter' | ||
reporter: 'eth-gas-reporter', | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* @author cpurta <cpurta@gmail.com> | ||
* @github https://github.com/cpurta/geth-devnet | ||
* This code comes from Christopher Purta's `geth-devnet` project. | ||
* geth --dev seeds with a single account so we need to spin | ||
* up more accounts and short-circuit account auto-locking to get multi-account | ||
* tests passing. | ||
*/ | ||
|
||
function createAccounts() { | ||
for (var i = 0; i < 10; i++) { | ||
acc = personal.newAccount(""); | ||
personal.unlockAccount(acc, ""); | ||
eth.sendTransaction({from: eth.accounts[0], to: acc, value: web3.toWei(1000, "ether")}); | ||
} | ||
} | ||
|
||
function unlockAccounts() { | ||
eth.accounts.forEach(function (account) { | ||
console.log('Unlocking ' + account + '...'); | ||
personal.unlockAccount(account, '', 86400); | ||
}); | ||
} | ||
|
||
function setupDevNode() { | ||
// keep accounts unlocked | ||
while (true) { | ||
unlockAccounts() | ||
} | ||
} | ||
|
||
createAccounts(); | ||
setupDevNode(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
docker run \ | ||
-v /$PWD/scripts:/scripts \ | ||
-p 8545:8545 \ | ||
-p 30303:30303 \ | ||
ethereum/client-go:latest \ | ||
--rpc \ | ||
--rpcaddr '0.0.0.0' \ | ||
--rpcport 8545 \ | ||
--rpccorsdomain '*' \ | ||
--nodiscover \ | ||
--dev \ | ||
--dev.period 1 \ | ||
--targetgaslimit '9000000' \ | ||
js ./scripts/geth-accounts.js \ | ||
> /dev/null & |