Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed VERBOSE and replaced with LOG_LEVEL #560

Merged
merged 3 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/check-PRs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ jobs:
- name: Run integration test
run: |
npm ci
VERBOSE=true npm run test-e2e-protocol
VERBOSE=true npm run test-e2e-tokens
docker wait nightfall_3_deployer_1
npm run test-e2e-protocol
npm run test-e2e-tokens

- name: Debug logs - after integration test run
if: always()
Expand Down
216 changes: 168 additions & 48 deletions README.md

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions cli/lib/nf3.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { approve } from './tokens.mjs';
import erc20 from './abis/ERC20.mjs';
import erc721 from './abis/ERC721.mjs';
import erc1155 from './abis/ERC1155.mjs';

import { DEFAULT_BLOCK_STAKE, DEFAULT_PROPOSER_BOND, DEFAULT_FEE } from './constants.mjs';

/**
Expand Down Expand Up @@ -220,18 +221,17 @@ class Nf3 {
// then return the receipt.
// TODO does this still work if there is a chain reorg or do we have to handle that?
return new Promise((resolve, reject) => {
if (process.env.VERBOSE) console.log(`Confirming transaction ${signed.transactionHash}`);
logger.debug(`Confirming transaction ${signed.transactionHash}`);
this.notConfirmed++;
this.web3.eth
.sendSignedTransaction(signed.rawTransaction)
.on('confirmation', (number, receipt) => {
if (number === 12) {
this.notConfirmed--;
if (process.env.VERBOSE)
console.log(
`Transaction ${receipt.transactionHash} has been confirmed ${number} times.`,
`Number of unconfirmed transactions is ${this.notConfirmed}`,
);
logger.debug(
`Transaction ${receipt.transactionHash} has been confirmed ${number} times.`,
`Number of unconfirmed transactions is ${this.notConfirmed}`,
);
resolve(receipt);
}
})
Expand Down
3 changes: 3 additions & 0 deletions cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading