@defillama/sdk 5.0.141 → 5.0.143
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.
- package/build/ChainApi.d.ts +3 -2
- package/build/ChainApi.js +7 -6
- package/build/abi/multicall3.js +1 -0
- package/build/providers.json +1 -1
- package/build/util/env.js +1 -1
- package/build/util/indexer.d.ts +5 -1
- package/build/util/indexer.js +246 -64
- package/build/util/transactions.d.ts +13 -0
- package/build/util/transactions.js +23 -0
- package/build/util/updateProviderList.js +1 -0
- package/package.json +1 -1
package/build/ChainApi.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Block, CallOptions, MulticallOptions, FetchListOptions, ByteCodeCallOptions, Balances as BalancesV1 } from "./types";
|
|
2
1
|
import Balances from "./Balances";
|
|
3
2
|
import { Chain } from "./general";
|
|
3
|
+
import { Balances as BalancesV1, Block, ByteCodeCallOptions, CallOptions, FetchListOptions, MulticallOptions } from "./types";
|
|
4
4
|
import { Provider } from "ethers";
|
|
5
5
|
import { GetLogsOptions } from "./util/logs";
|
|
6
|
+
import { GetTransactionOptions } from "./util/transactions";
|
|
6
7
|
type Erc4626SumOptions = {
|
|
7
8
|
calls: string[];
|
|
8
9
|
tokenAbi?: string;
|
|
@@ -75,7 +76,7 @@ export declare class ChainApi {
|
|
|
75
76
|
}>;
|
|
76
77
|
getLogs(params: GetLogsOptions): Promise<any[] | import("ethers").EventLog[] | import("ethers").EventLog[][]>;
|
|
77
78
|
getBalancesV2(): Balances;
|
|
78
|
-
|
|
79
|
+
getTransactions(params: GetTransactionOptions): Promise<any>;
|
|
79
80
|
getTransactionReceipt(tx: string): Promise<import("ethers").TransactionReceipt | null>;
|
|
80
81
|
}
|
|
81
82
|
export default ChainApi;
|
package/build/ChainApi.js
CHANGED
|
@@ -4,16 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ChainApi = void 0;
|
|
7
|
-
const Balances_1 = __importDefault(require("./Balances"));
|
|
8
|
-
const general_1 = require("./general");
|
|
9
7
|
const abi2_1 = require("./abi/abi2");
|
|
8
|
+
const Balances_1 = __importDefault(require("./Balances"));
|
|
10
9
|
const blocks_1 = require("./computeTVL/blocks");
|
|
10
|
+
const general_1 = require("./general");
|
|
11
11
|
const providers_json_1 = __importDefault(require("./providers.json"));
|
|
12
|
-
const debugLog_1 = require("./util/debugLog");
|
|
13
|
-
const generalUtil_1 = require("./generalUtil");
|
|
14
12
|
const multicall3_1 = require("./abi/multicall3");
|
|
15
13
|
const eth_1 = require("./eth");
|
|
14
|
+
const generalUtil_1 = require("./generalUtil");
|
|
15
|
+
const debugLog_1 = require("./util/debugLog");
|
|
16
16
|
const logs_1 = __importDefault(require("./util/logs"));
|
|
17
|
+
const transactions_1 = require("./util/transactions");
|
|
17
18
|
const nullAddress = '0x0000000000000000000000000000000000000000';
|
|
18
19
|
class ChainApi {
|
|
19
20
|
constructor(params) {
|
|
@@ -195,8 +196,8 @@ class ChainApi {
|
|
|
195
196
|
getBalancesV2() {
|
|
196
197
|
return this._balances;
|
|
197
198
|
}
|
|
198
|
-
async
|
|
199
|
-
return this.
|
|
199
|
+
async getTransactions(params) {
|
|
200
|
+
return (0, transactions_1.getTransactions)({ ...params, chain: this.chain });
|
|
200
201
|
}
|
|
201
202
|
async getTransactionReceipt(tx) {
|
|
202
203
|
return this.provider.getTransactionReceipt(tx);
|