Sfoglia il codice sorgente

fix: address eslint warnings in contract_manager package

Co-Authored-By: Connor Prussin <connor@dourolabs.xyz>
Devin AI 8 mesi fa
parent
commit
55cb71b700

+ 1 - 2
contract_manager/scripts/load_test_entropy.ts

@@ -2,7 +2,6 @@ import yargs from "yargs";
 import { hideBin } from "yargs/helpers";
 import { DefaultStore, EvmChain, toPrivateKey } from "../src";
 import { COMMON_DEPLOY_OPTIONS, findEntropyContract } from "./common";
-import Web3 from "web3";
 
 const parser = yargs(hideBin(process.argv))
   .usage(
@@ -58,7 +57,7 @@ const ABI = [
     stateMutability: "nonpayable",
     type: "function",
   },
-] as any;
+] as any; // eslint-disable-line @typescript-eslint/no-explicit-any
 
 async function main() {
   const argv = await parser.argv;

+ 3 - 1
contract_manager/src/chains.ts

@@ -174,10 +174,12 @@ export class GlobalChain extends Chain {
     );
   }
 
+  // eslint-disable-next-line @typescript-eslint/no-unused-vars
   async getAccountAddress(_privateKey: PrivateKey): Promise<string> {
     throw new Error("Can not get account for GlobalChain.");
   }
 
+  // eslint-disable-next-line @typescript-eslint/no-unused-vars
   async getAccountBalance(_privateKey: PrivateKey): Promise<number> {
     throw new Error("Can not get account balance for GlobalChain.");
   }
@@ -439,7 +441,7 @@ export class EvmChain extends Chain {
   }
 
   async estiamteAndSendTransaction(
-    transactionObject: any,
+    transactionObject: any, // eslint-disable-line @typescript-eslint/no-explicit-any
     txParams: { from?: string; value?: string }
   ) {
     const GAS_ESTIMATE_MULTIPLIER = 2;

+ 1 - 1
contract_manager/src/contracts/sui.ts

@@ -527,7 +527,7 @@ export class SuiWormholeContract extends WormholeContract {
     return { id: result.digest, info: result };
   }
 
-  private async getStateFields(): Promise<any> {
+  private async getStateFields(): Promise<any> { // eslint-disable-line @typescript-eslint/no-explicit-any
     const provider = this.chain.getProvider();
     const result = await provider.getObject({
       id: this.stateId,

+ 1 - 1
contract_manager/src/store.ts

@@ -234,7 +234,7 @@ export class Store {
    */
   getChainOrThrow<T extends Chain>(
     chainId: string,
-    ChainClass?: { new (...args: any[]): T; type: string }
+    ChainClass?: { new (...args: any[]): T; type: string } // eslint-disable-line @typescript-eslint/no-explicit-any
   ): T {
     const chain = this.chains[chainId];
     if (!chain) {