@subql/node-ethereum 2.6.2-6 → 2.8.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,19 +5,20 @@ import type { Deferrable } from '@ethersproject/properties';
5
5
  export default class SafeEthProvider extends Provider {
6
6
  private baseApi;
7
7
  private blockHeight;
8
+ private network?;
8
9
  constructor(baseApi: Provider, blockHeight: BlockTag | Promise<BlockTag>);
9
10
  getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
10
11
  getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
11
12
  getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
12
13
  getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
13
14
  call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
15
+ getNetwork(): Promise<Network>;
14
16
  getBlockWithTransactions(blockHashOrBlockTag: BlockTag | Promise<BlockTag>): Promise<BlockWithTransactions>;
15
17
  getBlock(blockHashOrBlockTag: BlockTag | Promise<BlockTag>): Promise<Block>;
16
18
  getTransaction(transactionHash: string): Promise<TransactionResponse>;
17
19
  getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
18
20
  getLogs(filter: Filter): Promise<Log[]>;
19
21
  getBlockNumber(): Promise<number>;
20
- getNetwork(): Promise<Network>;
21
22
  getGasPrice(): Promise<BigNumber>;
22
23
  estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
23
24
  sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
@@ -36,6 +36,12 @@ class SafeEthProvider extends abstract_provider_1.Provider {
36
36
  logger.warn(`Provided parameter 'blockTag' will not be used`);
37
37
  return this.baseApi.call(transaction, this.blockHeight);
38
38
  }
39
+ async getNetwork() {
40
+ if (!this.network) {
41
+ this.network = await this.baseApi.getNetwork();
42
+ }
43
+ return this.network;
44
+ }
39
45
  // eslint-disable-next-line @typescript-eslint/promise-function-async
40
46
  getBlockWithTransactions(blockHashOrBlockTag) {
41
47
  throw new Error('Method `getBlockWithTransactions` not supported.');
@@ -61,10 +67,6 @@ class SafeEthProvider extends abstract_provider_1.Provider {
61
67
  throw new Error('Method `getBlockNumber` not supported.');
62
68
  }
63
69
  // eslint-disable-next-line @typescript-eslint/promise-function-async
64
- getNetwork() {
65
- throw new Error('Method `getNetwork` not supported.');
66
- }
67
- // eslint-disable-next-line @typescript-eslint/promise-function-async
68
70
  getGasPrice() {
69
71
  throw new Error('Method `getGasPrice` not supported.');
70
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"safe-api.js","sourceRoot":"","sources":["../../src/ethereum/safe-api.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sCAAsC;;AAEtC,wEAY0C;AAI1C,gDAA6C;AAE7C,MAAM,MAAM,GAAG,IAAA,qBAAS,EAAC,mBAAmB,CAAC,CAAC;AAE9C,MAAqB,eAAgB,SAAQ,4BAAQ;IACnD,YACU,OAAiB,EACjB,WAAyC;QAEjD,KAAK,EAAE,CAAC;QAHA,YAAO,GAAP,OAAO,CAAU;QACjB,gBAAW,GAAX,WAAW,CAA8B;IAGnD,CAAC;IAED,KAAK,CAAC,UAAU,CACd,aAAuC,EACvC,QAAuC;QAEvC,IAAI,QAAQ;YAAE,MAAM,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,mBAAmB,CACvB,aAAuC,EACvC,QAAuC;QAEvC,IAAI,QAAQ;YAAE,MAAM,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC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CAAC,SAAoB,EAAE,QAAmB;QAC3C,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IACD,kBAAkB,CAAC,SAAqB;QACtC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,CAAC;IACD,qEAAqE;IACrE,kBAAkB,CAChB,eAAuB,EACvB,aAAsB,EACtB,OAAgB;QAEhB,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,CAAC;CACF;AApID,kCAoIC","sourcesContent":["// Copyright 2020-2022 OnFinality Limited authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n Block,\n BlockTag,\n BlockWithTransactions,\n EventType,\n Filter,\n Listener,\n Log,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse,\n Provider,\n} from '@ethersproject/abstract-provider';\nimport { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport type { Network } from '@ethersproject/networks';\nimport type { Deferrable } from '@ethersproject/properties';\nimport { getLogger } from '@subql/node-core';\n\nconst logger = getLogger('safe.api.ethereum');\n\nexport default class SafeEthProvider extends Provider {\n constructor(\n private baseApi: Provider,\n private blockHeight: BlockTag | Promise<BlockTag>,\n ) {\n super();\n }\n\n async getBalance(\n addressOrName: string | Promise<string>,\n blockTag?: BlockTag | Promise<BlockTag>,\n ): Promise<BigNumber> {\n if (blockTag) logger.warn(`Provided parameter 'blockTag' will not be used`);\n return this.baseApi.getBalance(addressOrName, this.blockHeight);\n }\n\n async getTransactionCount(\n addressOrName: string | Promise<string>,\n blockTag?: BlockTag | Promise<BlockTag>,\n ): Promise<number> {\n if (blockTag) logger.warn(`Provided parameter 'blockTag' will not be used`);\n return this.baseApi.getTransactionCount(addressOrName, this.blockHeight);\n }\n\n async getCode(\n addressOrName: string | Promise<string>,\n blockTag?: BlockTag | Promise<BlockTag>,\n ): Promise<string> {\n if (blockTag) logger.warn(`Provided parameter 'blockTag' will not be used`);\n return this.baseApi.getCode(addressOrName, this.blockHeight);\n }\n\n async getStorageAt(\n addressOrName: string | Promise<string>,\n position: BigNumberish | Promise<BigNumberish>,\n blockTag?: BlockTag | Promise<BlockTag>,\n ): Promise<string> {\n if (blockTag) logger.warn(`Provided parameter 'blockTag' will not be used`);\n return this.baseApi.getStorageAt(addressOrName, position, this.blockHeight);\n }\n\n async call(\n transaction: Deferrable<TransactionRequest>,\n blockTag?: BlockTag | Promise<BlockTag>,\n ): Promise<string> {\n if (blockTag) logger.warn(`Provided parameter 'blockTag' will not be used`);\n\n return this.baseApi.call(transaction, this.blockHeight);\n }\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getBlockWithTransactions(\n blockHashOrBlockTag: BlockTag | Promise<BlockTag>,\n ): Promise<BlockWithTransactions> {\n throw new Error('Method `getBlockWithTransactions` not supported.');\n }\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getBlock(blockHashOrBlockTag: BlockTag | Promise<BlockTag>): Promise<Block> {\n throw new Error('Method `getBlock` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getTransaction(transactionHash: string): Promise<TransactionResponse> {\n throw new Error('Method `getTransaction` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt> {\n throw new Error('Method `getTransactionReceipt` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getLogs(filter: Filter): Promise<Log[]> {\n throw new Error('Method `getLogs` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getBlockNumber(): Promise<number> {\n throw new Error('Method `getBlockNumber` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getNetwork(): Promise<Network> {\n throw new Error('Method `getNetwork` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getGasPrice(): Promise<BigNumber> {\n throw new Error('Method `getGasPrice` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber> {\n throw new Error('Method `estimateGas` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n sendTransaction(\n signedTransaction: string | Promise<string>,\n ): Promise<TransactionResponse> {\n throw new Error('Method `sendTransaction` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n resolveName(name: string | Promise<string>): Promise<string | null> {\n throw new Error('Method `resolveName` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n lookupAddress(address: string | Promise<string>): Promise<string | null> {\n throw new Error('Method `lookupAddress` not supported.');\n }\n on(eventName: EventType, listener: Listener): Provider {\n throw new Error('Method `on` not supported.');\n }\n once(eventName: EventType, listener: Listener): Provider {\n throw new Error('Method `once` not supported.');\n }\n emit(eventName: EventType, ...args: any[]): boolean {\n throw new Error('Method `emit` not supported.');\n }\n listenerCount(eventName?: EventType): number {\n throw new Error('Method `listenerCount` not supported.');\n }\n listeners(eventName?: EventType): Listener[] {\n throw new Error('Method `listeners` not supported.');\n }\n off(eventName: EventType, listener?: Listener): Provider {\n throw new Error('Method `off` not supported.');\n }\n removeAllListeners(eventName?: EventType): Provider {\n throw new Error('Method `removeAllListeners` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n waitForTransaction(\n transactionHash: string,\n confirmations?: number,\n timeout?: number,\n ): Promise<TransactionReceipt> {\n throw new Error('Method `waitForTransaction` not supported.');\n }\n}\n"]}
1
+ {"version":3,"file":"safe-api.js","sourceRoot":"","sources":["../../src/ethereum/safe-api.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sCAAsC;;AAEtC,wEAY0C;AAI1C,gDAA6C;AAE7C,MAAM,MAAM,GAAG,IAAA,qBAAS,EAAC,mBAAmB,CAAC,CAAC;AAE9C,MAAqB,eAAgB,SAAQ,4BAAQ;IAEnD,YACU,OAAiB,EACjB,WAAyC;QAEjD,KAAK,EAAE,CAAC;QAHA,YAAO,GAAP,OAAO,CAA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uCAAuC,CAAC,CAAC;IAC3D,CAAC;IACD,EAAE,CAAC,SAAoB,EAAE,QAAkB;QACzC,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,CAAC,SAAoB,EAAE,QAAkB;QAC3C,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;IACD,IAAI,CAAC,SAAoB,EAAE,GAAG,IAAW;QACvC,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;IACD,aAAa,CAAC,SAAqB;QACjC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IACD,SAAS,CAAC,SAAqB;QAC7B,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;IACD,GAAG,CAAC,SAAoB,EAAE,QAAmB;QAC3C,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IACD,kBAAkB,CAAC,SAAqB;QACtC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,CAAC;IACD,qEAAqE;IACrE,kBAAkB,CAChB,eAAuB,EACvB,aAAsB,EACtB,OAAgB;QAEhB,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,CAAC;CACF;AAxID,kCAwIC","sourcesContent":["// Copyright 2020-2022 OnFinality Limited authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n Block,\n BlockTag,\n BlockWithTransactions,\n EventType,\n Filter,\n Listener,\n Log,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse,\n Provider,\n} from '@ethersproject/abstract-provider';\nimport { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport type { Network } from '@ethersproject/networks';\nimport type { Deferrable } from '@ethersproject/properties';\nimport { getLogger } from '@subql/node-core';\n\nconst logger = getLogger('safe.api.ethereum');\n\nexport default class SafeEthProvider extends Provider {\n private network?: Network;\n constructor(\n private baseApi: Provider,\n private blockHeight: BlockTag | Promise<BlockTag>,\n ) {\n super();\n }\n\n async getBalance(\n addressOrName: string | Promise<string>,\n blockTag?: BlockTag | Promise<BlockTag>,\n ): Promise<BigNumber> {\n if (blockTag) logger.warn(`Provided parameter 'blockTag' will not be used`);\n return this.baseApi.getBalance(addressOrName, this.blockHeight);\n }\n\n async getTransactionCount(\n addressOrName: string | Promise<string>,\n blockTag?: BlockTag | Promise<BlockTag>,\n ): Promise<number> {\n if (blockTag) logger.warn(`Provided parameter 'blockTag' will not be used`);\n return this.baseApi.getTransactionCount(addressOrName, this.blockHeight);\n }\n\n async getCode(\n addressOrName: string | Promise<string>,\n blockTag?: BlockTag | Promise<BlockTag>,\n ): Promise<string> {\n if (blockTag) logger.warn(`Provided parameter 'blockTag' will not be used`);\n return this.baseApi.getCode(addressOrName, this.blockHeight);\n }\n\n async getStorageAt(\n addressOrName: string | Promise<string>,\n position: BigNumberish | Promise<BigNumberish>,\n blockTag?: BlockTag | Promise<BlockTag>,\n ): Promise<string> {\n if (blockTag) logger.warn(`Provided parameter 'blockTag' will not be used`);\n return this.baseApi.getStorageAt(addressOrName, position, this.blockHeight);\n }\n\n async call(\n transaction: Deferrable<TransactionRequest>,\n blockTag?: BlockTag | Promise<BlockTag>,\n ): Promise<string> {\n if (blockTag) logger.warn(`Provided parameter 'blockTag' will not be used`);\n\n return this.baseApi.call(transaction, this.blockHeight);\n }\n\n async getNetwork(): Promise<Network> {\n if (!this.network) {\n this.network = await this.baseApi.getNetwork();\n }\n return this.network;\n }\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getBlockWithTransactions(\n blockHashOrBlockTag: BlockTag | Promise<BlockTag>,\n ): Promise<BlockWithTransactions> {\n throw new Error('Method `getBlockWithTransactions` not supported.');\n }\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getBlock(blockHashOrBlockTag: BlockTag | Promise<BlockTag>): Promise<Block> {\n throw new Error('Method `getBlock` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getTransaction(transactionHash: string): Promise<TransactionResponse> {\n throw new Error('Method `getTransaction` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt> {\n throw new Error('Method `getTransactionReceipt` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getLogs(filter: Filter): Promise<Log[]> {\n throw new Error('Method `getLogs` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getBlockNumber(): Promise<number> {\n throw new Error('Method `getBlockNumber` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n getGasPrice(): Promise<BigNumber> {\n throw new Error('Method `getGasPrice` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber> {\n throw new Error('Method `estimateGas` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n sendTransaction(\n signedTransaction: string | Promise<string>,\n ): Promise<TransactionResponse> {\n throw new Error('Method `sendTransaction` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n resolveName(name: string | Promise<string>): Promise<string | null> {\n throw new Error('Method `resolveName` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n lookupAddress(address: string | Promise<string>): Promise<string | null> {\n throw new Error('Method `lookupAddress` not supported.');\n }\n on(eventName: EventType, listener: Listener): Provider {\n throw new Error('Method `on` not supported.');\n }\n once(eventName: EventType, listener: Listener): Provider {\n throw new Error('Method `once` not supported.');\n }\n emit(eventName: EventType, ...args: any[]): boolean {\n throw new Error('Method `emit` not supported.');\n }\n listenerCount(eventName?: EventType): number {\n throw new Error('Method `listenerCount` not supported.');\n }\n listeners(eventName?: EventType): Listener[] {\n throw new Error('Method `listeners` not supported.');\n }\n off(eventName: EventType, listener?: Listener): Provider {\n throw new Error('Method `off` not supported.');\n }\n removeAllListeners(eventName?: EventType): Provider {\n throw new Error('Method `removeAllListeners` not supported.');\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n waitForTransaction(\n transactionHash: string,\n confirmations?: number,\n timeout?: number,\n ): Promise<TransactionReceipt> {\n throw new Error('Method `waitForTransaction` not supported.');\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subql/node-ethereum",
3
- "version": "2.6.2-6",
3
+ "version": "2.8.1-0",
4
4
  "description": "",
5
5
  "author": "Ian He",
6
6
  "license": "Apache-2.0",
@@ -25,7 +25,7 @@
25
25
  "@nestjs/platform-express": "^9.4.0",
26
26
  "@nestjs/schedule": "^3.0.1",
27
27
  "@subql/common": "^2.3.0",
28
- "@subql/common-ethereum": "2.1.4-0",
28
+ "@subql/common-ethereum": "2.2.0",
29
29
  "@subql/node-core": "^3.0.0",
30
30
  "@subql/testing": "^2.0.0",
31
31
  "@subql/types": "^2.1.2",
@@ -49,8 +49,8 @@
49
49
  "@subql/utils": "*"
50
50
  },
51
51
  "devDependencies": {
52
- "@nestjs/schematics": "^8.0.5",
53
- "@nestjs/testing": "^8.2.6",
52
+ "@nestjs/schematics": "^9.2.0",
53
+ "@nestjs/testing": "^9.4.0",
54
54
  "@types/express": "^4.17.13",
55
55
  "@types/jest": "^27.4.0",
56
56
  "@types/lodash": "^4.14.178",
@@ -67,5 +67,5 @@
67
67
  "/dist",
68
68
  "/bin"
69
69
  ],
70
- "stableVersion": "2.6.2-5"
70
+ "stableVersion": "2.8.0"
71
71
  }