Skip to content

Commit e5a7d08

Browse files
committed
fix lint
1 parent f96e92f commit e5a7d08

File tree

5 files changed

+10
-34
lines changed

5 files changed

+10
-34
lines changed

packages/cli/src/command-helpers/abi.test.ts

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ const TEST_CONTRACT_START_BLOCKS = {
1313
bsc: {
1414
'0xc35DADB65012eC5796536bD9864eD8773aBc74C4': 5_205_069,
1515
},
16-
fantom: {
17-
'0xf731202A3cf7EfA9368C2d7bD613926f7A144dB5': 28_771_200,
18-
},
1916
mainnet: {
2017
'0xc2EdaD668740f1aA35E4D8f227fB8E17dcA888Cd': 10_736_242,
2118
},
@@ -32,31 +29,10 @@ const TEST_CONTRACT_START_BLOCKS = {
3229
'0xc35DADB65012eC5796536bD9864eD8773aBc74C4': 7_019_815,
3330
},
3431
celo: {
35-
'0x8084936982D089130e001b470eDf58faCA445008': 10186627,
36-
},
37-
'celo-alfajores': {
38-
'0xc857ea98ab2dae9877c9fd23971152cd2776d0e4': 9_142_263,
39-
},
40-
chapel: {
41-
'0x549fb5626025237351446ac502decdf2f3a4c570': 25_509_955,
42-
},
43-
'fantom-testnet': {
44-
'0xa40f1c7cc67180aa941e9ef66ee32f704e9600a6': 13_679_941,
45-
},
46-
fuji: {
47-
'0x7a2b3f2ca3e0b5867d44ef8bc5ba316f98e05f05': 18_710_858,
32+
'0x8084936982D089130e001b470eDf58faCA445008': 10_186_627,
4833
},
4934
gnosis: {
50-
'0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3': 16655565,
51-
},
52-
aurora: {
53-
'0x76FA7f90D3900eB95Cfc58AB12c916984AeC50c8': 77431034,
54-
},
55-
'aurora-testnet': {
56-
'0x76FA7f90D3900eB95Cfc58AB12c916984AeC50c8': 77431034,
57-
},
58-
fuse: {
59-
'0x3dB01570D97631f69bbb0ba39796865456Cf89A5': 1000000,
35+
'0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3': 16_655_565,
6036
},
6137

6238
// Skipping these networks for now because they do not support the latest etherscan contracts API or is blockScout based
@@ -121,7 +97,7 @@ describe.sequential('getStartBlockForContract', async () => {
12197
const startBlock = await contractService.getStartBlock(network, contract);
12298
expect(parseInt(startBlock)).toBe(startBlockExp);
12399
},
124-
{ timeout: 10000 },
100+
{ timeout: 10_000 },
125101
);
126102
}
127103
}

packages/cli/src/command-helpers/contracts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class ContractService {
7171

7272
async getABI(ABICtor: typeof ABI, networkId: string, address: string) {
7373
const urls = this.getEtherscanUrls(networkId);
74-
let errors: string[] = [];
74+
const errors: string[] = [];
7575
if (!urls.length) {
7676
throw new Error(`No contract API available for ${networkId} in the registry`);
7777
}
@@ -87,7 +87,7 @@ export class ContractService {
8787
throw new Error(`no result: ${JSON.stringify(json)}`);
8888
} catch (error) {
8989
logger(`Failed to fetch from ${url}: ${error}`);
90-
errors.push(`${error}`);
90+
errors.push(String(error));
9191
}
9292
}
9393

packages/cli/src/command-helpers/file-resolver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import os from 'os';
2-
import path from 'path';
1+
import os from 'node:os';
2+
import path from 'node:path';
33
import fs from 'fs-extra';
44
import fetch from '../fetch.js';
55
import { DEFAULT_IPFS_URL } from './ipfs.js';

packages/cli/src/commands/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export default class InitCommand extends Command {
141141

142142
initDebugger('Flags: %O', flags);
143143

144-
let { node } = chooseNodeUrl({
144+
const { node } = chooseNodeUrl({
145145
node: nodeFlag,
146146
});
147147

@@ -422,7 +422,7 @@ async function processInitForm(
422422
name: n.id,
423423
value: `${n.id}:${n.shortName}:${n.fullName}`.toLowerCase(),
424424
hint: n.id,
425-
message: `${n.fullName}`,
425+
message: n.fullName,
426426
});
427427

428428
const formatChoices = (choices: ReturnType<typeof networkToChoice>[]) => {

packages/cli/src/protocols/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default class Protocol {
9292
near: ['near'],
9393
cosmos: ['cosmos'],
9494
substreams: ['substreams'],
95-
// subgraph: ['subgraph'],
95+
subgraph: ['subgraph'],
9696
}) as immutable.Collection<ProtocolName, immutable.List<string>>;
9797
}
9898

0 commit comments

Comments
 (0)