@defillama/sdk 5.0.141 → 5.0.142

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.
@@ -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
- getTransaction(tx: string): Promise<import("ethers").TransactionResponse | null>;
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 getTransaction(tx) {
199
- return this.provider.getTransaction(tx);
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);
@@ -200,6 +200,7 @@ const DEPLOYMENT_BLOCK = {
200
200
  sseed: 1,
201
201
  lens: 1,
202
202
  basecamp: 1,
203
+ platon: 1,
203
204
  };
204
205
  async function makeMultiCall(functionABI, calls, chain, block) {
205
206
  if (chain === 'tron')