@dhedge/backend-flatcoin-core 0.3.31 → 0.3.33
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.
|
@@ -3,6 +3,7 @@ import { TokenTransfer } from '../dto';
|
|
|
3
3
|
export declare class BlockscanService {
|
|
4
4
|
private readonly logger;
|
|
5
5
|
private readonly baseBlockscanUri;
|
|
6
|
+
private readonly optimismBlockscanUri;
|
|
6
7
|
constructor(logger: Logger);
|
|
7
8
|
getTokenTransfers(contractAddress: string, startBlock: number, endBlock: number, blockChainCode: string): Promise<TokenTransfer[]>;
|
|
8
9
|
private getUri;
|
|
@@ -24,6 +24,9 @@ let BlockscanService = class BlockscanService {
|
|
|
24
24
|
if (process.env.BASE_BLOCKSCAN_URI) {
|
|
25
25
|
this.baseBlockscanUri = process.env.BASE_BLOCKSCAN_URI;
|
|
26
26
|
}
|
|
27
|
+
if (process.env.OPTIMISM_BLOCKSCAN_URI) {
|
|
28
|
+
this.baseBlockscanUri = process.env.OPTIMISM_BLOCKSCAN_URI;
|
|
29
|
+
}
|
|
27
30
|
}
|
|
28
31
|
async getTokenTransfers(contractAddress, startBlock, endBlock, blockChainCode) {
|
|
29
32
|
try {
|
|
@@ -50,6 +53,9 @@ let BlockscanService = class BlockscanService {
|
|
|
50
53
|
if (constants_1.BlockchainCode.BASE == blockChainCode) {
|
|
51
54
|
return this.baseBlockscanUri;
|
|
52
55
|
}
|
|
56
|
+
if (constants_1.BlockchainCode.OPTIMISM == blockChainCode) {
|
|
57
|
+
return this.optimismBlockscanUri;
|
|
58
|
+
}
|
|
53
59
|
throw new Error(`BlockscanService -> blockchain code ${blockChainCode} is not supported`);
|
|
54
60
|
}
|
|
55
61
|
};
|