new: add eslint camelcase rule
MODIFY
.eslintrc.js
.eslintrc.js
@@ -24,12 +24,13 @@ module.exports = {
// trailing comma
'comma-dangle': ['error', 'always-multiline'],
quotes: ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }],
+ camelcase: ['error', {'properties': 'always'}]
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
- '@typescript-eslint/no-unused-vars': [2, { args: 'none' }]
+ '@typescript-eslint/no-unused-vars': ['error', { args: 'none' }]
}
}
]

MODIFY
src/common/ExitManager.ts
src/common/ExitManager.ts
@@ -86,17 +86,17 @@ export default class ExitManager extends ContractsBase {
new BN(lastChildBlock).gte(new BN(receipt.blockNumber)),
'Burn transaction has not been checkpointed as yet'
)
- let blockIncluded_response = await fetch(this.networkApiUrl + '/block-included/' + receipt.blockNumber)
- let headerBlock = await blockIncluded_response.json()
+ let blockIncludedResponse = await fetch(this.networkApiUrl + '/block-included/' + receipt.blockNumber)
+ let headerBlock = await blockIncludedResponse.json()
// build block proof
const start = parseInt(headerBlock.start, 10)
const end = parseInt(headerBlock.end, 10)
const number = parseInt(receipt.blockNumber + '', 10)
- let blockProof_response = await fetch(
+ let blockProofResponse = await fetch(
`${this.networkApiUrl}/block-proof?start=${start}&end=${end}&number=${number}`
)
- const blockProof = (await blockProof_response.json()).proof
+ const blockProof = (await blockProofResponse.json()).proof
const receiptProof: any = await Proofs.getReceiptProof(receipt, block, this.web3Client.getMaticWeb3())
const logIndex = receipt.logs.findIndex(log => log.topics[0].toLowerCase() == logEventSig.toLowerCase())

MODIFY
src/libs/ProofsUtil.ts
src/libs/ProofsUtil.ts
@@ -45,8 +45,8 @@ export default class ProofsUtil {
static async buildBlockHeaderMerkleHermoine(start, end, networkApiUrl) {
let response = await fetch(networkApiUrl + '/generate-proof?start=' + start + '&end=' + end)
- let log_details = await response.json()
- let logs = log_details.merkle_headerblocks
+ let logDetails = await response.json()
+ let logs = logDetails.merkle_headerblocks
const headers = new Array(end - start + 1)
for (let i = 0; i < end - start + 1; i++) {
headers[i] = ProofsUtil.getBlockHeader(logs[i])

new: add eslint camelcase rule