mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-20 01:18:52 +00:00
Addressing feedback and fix bug that contracts can't be deployed
This commit is contained in:
parent
5a98f2d03a
commit
680e01c268
@ -2,7 +2,7 @@ import Web3 from "web3";
|
||||
|
||||
const TARGET = 0x7FFFFFFFFFFFFFFF;
|
||||
|
||||
export default async function fundAccount(web3: Web3, accountAddress: string, coinbaseAddress: string, hexBalance: string | number | undefined) {
|
||||
export default async function fundAccount(web3: Web3, accountAddress: string, coinbaseAddress: string, hexBalance?: string | number) {
|
||||
if (!hexBalance) {
|
||||
hexBalance = TARGET;
|
||||
}
|
||||
|
@ -53,11 +53,9 @@ export default class AccountsManager {
|
||||
}
|
||||
try {
|
||||
const coinbase = await web3.eth.getCoinbase();
|
||||
const accts = accounts
|
||||
.filter((account) => account && account.address);
|
||||
|
||||
async.eachLimit(accts, 1, (acct, eachCb) => {
|
||||
fundAccount(web3, acct.address, coinbase, acct.hexBalance)
|
||||
async.eachLimit(accounts, 1, (acct, eachCb) => {
|
||||
fundAccount(web3, acct, coinbase)
|
||||
.then(() => {
|
||||
eachCb();
|
||||
})
|
||||
|
@ -30,11 +30,14 @@
|
||||
"_build": "npm run solo -- build",
|
||||
"ci": "npm run qa",
|
||||
"clean": "npm run reset",
|
||||
"lint": "eslint src/",
|
||||
"qa": "npm-run-all lint _build test",
|
||||
"lint": "npm-run-all lint:*",
|
||||
"lint:js": "eslint src/",
|
||||
"lint:ts": "tslint -c tslint.json \"src/**/*.ts\"",
|
||||
"qa": "npm-run-all lint typecheck _build test",
|
||||
"reset": "npx rimraf .nyc_output coverage dist embark-*.tgz package",
|
||||
"solo": "embark-solo",
|
||||
"test": "nyc --reporter=html --reporter=json mocha \"dist/test/**/*.js\" --exit --no-timeouts --require source-map-support/register"
|
||||
"test": "nyc --reporter=html --reporter=json mocha \"dist/test/**/*.js\" --exit --no-timeouts --require source-map-support/register",
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "../../../.eslintrc.json"
|
||||
@ -54,7 +57,9 @@
|
||||
"eslint": "5.7.0",
|
||||
"mocha": "6.2.0",
|
||||
"npm-run-all": "4.1.5",
|
||||
"rimraf": "3.0.0"
|
||||
"rimraf": "3.0.0",
|
||||
"tslint": "5.16.0",
|
||||
"typescript": "3.6.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.17.0 <12.0.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user