From 5caa827580f83a4b1f91b4a7e645686a8131f9fa Mon Sep 17 00:00:00 2001 From: Bart Tadych Date: Fri, 23 Feb 2024 13:34:40 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20added=20getTopCryptoCurrenciesByMarketC?= =?UTF-8?q?ap,=20getTopCryptoCurrencies=E2=80=A6=20(#1181)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: added getTopCryptoCurrenciesByMarketCap, getTopCryptoCurrenciesByTradingVolume methods. --- .changeset/lazy-pots-explain.md | 7 + .../common/evmUtils/generator.config.json | 4 +- .../src/generated/client/abstractClient.ts | 25 ++ ...TopCryptoCurrenciesByMarketCapOperation.ts | 32 +++ ...ryptoCurrenciesByTradingVolumeOperation.ts | 32 +++ .../src/generated/operations/index.ts | 2 + .../src/generated/operations/operations.ts | 4 + ...tDataTopCryptoCurrenciesByMarketCapItem.ts | 223 ++++++++++++++++++ .../evmUtils/src/generated/types/index.ts | 1 + packages/evmApi/src/generated/ClientEvmApi.ts | 8 +- 10 files changed, 336 insertions(+), 2 deletions(-) create mode 100644 .changeset/lazy-pots-explain.md create mode 100644 packages/common/evmUtils/src/generated/operations/GetTopCryptoCurrenciesByMarketCapOperation.ts create mode 100644 packages/common/evmUtils/src/generated/operations/GetTopCryptoCurrenciesByTradingVolumeOperation.ts create mode 100644 packages/common/evmUtils/src/generated/types/EvmMarketDataTopCryptoCurrenciesByMarketCapItem.ts diff --git a/.changeset/lazy-pots-explain.md b/.changeset/lazy-pots-explain.md new file mode 100644 index 0000000000..95fbfa60d9 --- /dev/null +++ b/.changeset/lazy-pots-explain.md @@ -0,0 +1,7 @@ +--- +'@moralisweb3/common-evm-utils': patch +'@moralisweb3/evm-api': patch +'moralis': patch +--- + +Added `getTopCryptoCurrenciesByMarketCap` and `getTopCryptoCurrenciesByTradingVolume` methods to the EVM API. diff --git a/packages/common/evmUtils/generator.config.json b/packages/common/evmUtils/generator.config.json index ebf4de762f..2de7991da1 100644 --- a/packages/common/evmUtils/generator.config.json +++ b/packages/common/evmUtils/generator.config.json @@ -107,7 +107,9 @@ "getWalletTokenBalancesPrice", "getPairPrice", "resolveAddressToDomain", - "resolveENSAddress" + "resolveENSAddress", + "getTopCryptoCurrenciesByMarketCap", + "getTopCryptoCurrenciesByTradingVolume" ] } } diff --git a/packages/common/evmUtils/src/generated/client/abstractClient.ts b/packages/common/evmUtils/src/generated/client/abstractClient.ts index cd4378b285..2b7187ba3c 100644 --- a/packages/common/evmUtils/src/generated/client/abstractClient.ts +++ b/packages/common/evmUtils/src/generated/client/abstractClient.ts @@ -23,6 +23,9 @@ import { GetTopNFTCollectionsByMarketCapOperation, GetTopNFTCollectionsByMarketC import { EvmMarketDataTopNFTCollectionByMarketCapItem, EvmMarketDataTopNFTCollectionByMarketCapItemJSON } from '../types/EvmMarketDataTopNFTCollectionByMarketCapItem'; import { GetHottestNFTCollectionsByTradingVolumeOperation, GetHottestNFTCollectionsByTradingVolumeOperationRequest, GetHottestNFTCollectionsByTradingVolumeOperationRequestJSON } from '../operations/GetHottestNFTCollectionsByTradingVolumeOperation'; import { EvmMarketDataHottestNFTCollectionByTradingVolumeItem, EvmMarketDataHottestNFTCollectionByTradingVolumeItemJSON } from '../types/EvmMarketDataHottestNFTCollectionByTradingVolumeItem'; +import { GetTopCryptoCurrenciesByMarketCapOperation, GetTopCryptoCurrenciesByMarketCapOperationRequest, GetTopCryptoCurrenciesByMarketCapOperationRequestJSON } from '../operations/GetTopCryptoCurrenciesByMarketCapOperation'; +import { EvmMarketDataTopCryptoCurrenciesByMarketCapItem, EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON } from '../types/EvmMarketDataTopCryptoCurrenciesByMarketCapItem'; +import { GetTopCryptoCurrenciesByTradingVolumeOperation, GetTopCryptoCurrenciesByTradingVolumeOperationRequest, GetTopCryptoCurrenciesByTradingVolumeOperationRequestJSON } from '../operations/GetTopCryptoCurrenciesByTradingVolumeOperation'; import { ReviewContractsOperation, ReviewContractsOperationRequest, ReviewContractsOperationRequestJSON } from '../operations/ReviewContractsOperation'; import { EvmReviewContracts, EvmReviewContractsJSON } from '../types/EvmReviewContracts'; import { EvmContractsReviewDto, EvmContractsReviewDtoInput, EvmContractsReviewDtoJSON } from '../types/EvmContractsReviewDto'; @@ -141,6 +144,28 @@ export abstract class AbstractClient { EvmMarketDataHottestNFTCollectionByTradingVolumeItem[], EvmMarketDataHottestNFTCollectionByTradingVolumeItemJSON[] >(GetHottestNFTCollectionsByTradingVolumeOperation), + /** + * @description Get the top crypto currencies by market cap + * @param request Request with parameters. + * @returns {Object[]} Response for the request. + */ + getTopCryptoCurrenciesByMarketCap: this.createEndpoint< + GetTopCryptoCurrenciesByMarketCapOperationRequest, + GetTopCryptoCurrenciesByMarketCapOperationRequestJSON, + EvmMarketDataTopCryptoCurrenciesByMarketCapItem[], + EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON[] + >(GetTopCryptoCurrenciesByMarketCapOperation), + /** + * @description Get the top crypto currencies by trading volume + * @param request Request with parameters. + * @returns {Object[]} Response for the request. + */ + getTopCryptoCurrenciesByTradingVolume: this.createEndpoint< + GetTopCryptoCurrenciesByTradingVolumeOperationRequest, + GetTopCryptoCurrenciesByTradingVolumeOperationRequestJSON, + EvmMarketDataTopCryptoCurrenciesByMarketCapItem[], + EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON[] + >(GetTopCryptoCurrenciesByTradingVolumeOperation), }; public readonly nft = { /** diff --git a/packages/common/evmUtils/src/generated/operations/GetTopCryptoCurrenciesByMarketCapOperation.ts b/packages/common/evmUtils/src/generated/operations/GetTopCryptoCurrenciesByMarketCapOperation.ts new file mode 100644 index 0000000000..df4aa1cc26 --- /dev/null +++ b/packages/common/evmUtils/src/generated/operations/GetTopCryptoCurrenciesByMarketCapOperation.ts @@ -0,0 +1,32 @@ +import { EvmMarketDataTopCryptoCurrenciesByMarketCapItem, EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON } from '../types/EvmMarketDataTopCryptoCurrenciesByMarketCapItem'; + +// request parameters: + +export interface GetTopCryptoCurrenciesByMarketCapOperationRequest { +} + +export interface GetTopCryptoCurrenciesByMarketCapOperationRequestJSON { +} + +export type GetTopCryptoCurrenciesByMarketCapOperationResponse = EvmMarketDataTopCryptoCurrenciesByMarketCapItem[]; +export type GetTopCryptoCurrenciesByMarketCapOperationResponseJSON = EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON[]; + +export const GetTopCryptoCurrenciesByMarketCapOperation = { + operationId: "getTopCryptoCurrenciesByMarketCap", + groupName: "marketData", + httpMethod: "get", + routePattern: "/market-data/global/market-cap", + parameterNames: [], + hasResponse: true, + hasBody: false, + + parseResponse(json: EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON[]): EvmMarketDataTopCryptoCurrenciesByMarketCapItem[] { + return json.map((item) => EvmMarketDataTopCryptoCurrenciesByMarketCapItem.fromJSON(item)); + }, + + serializeRequest(request: GetTopCryptoCurrenciesByMarketCapOperationRequest): GetTopCryptoCurrenciesByMarketCapOperationRequestJSON { + return { + }; + }, + +} diff --git a/packages/common/evmUtils/src/generated/operations/GetTopCryptoCurrenciesByTradingVolumeOperation.ts b/packages/common/evmUtils/src/generated/operations/GetTopCryptoCurrenciesByTradingVolumeOperation.ts new file mode 100644 index 0000000000..352bd65d8b --- /dev/null +++ b/packages/common/evmUtils/src/generated/operations/GetTopCryptoCurrenciesByTradingVolumeOperation.ts @@ -0,0 +1,32 @@ +import { EvmMarketDataTopCryptoCurrenciesByMarketCapItem, EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON } from '../types/EvmMarketDataTopCryptoCurrenciesByMarketCapItem'; + +// request parameters: + +export interface GetTopCryptoCurrenciesByTradingVolumeOperationRequest { +} + +export interface GetTopCryptoCurrenciesByTradingVolumeOperationRequestJSON { +} + +export type GetTopCryptoCurrenciesByTradingVolumeOperationResponse = EvmMarketDataTopCryptoCurrenciesByMarketCapItem[]; +export type GetTopCryptoCurrenciesByTradingVolumeOperationResponseJSON = EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON[]; + +export const GetTopCryptoCurrenciesByTradingVolumeOperation = { + operationId: "getTopCryptoCurrenciesByTradingVolume", + groupName: "marketData", + httpMethod: "get", + routePattern: "/market-data/global/volume", + parameterNames: [], + hasResponse: true, + hasBody: false, + + parseResponse(json: EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON[]): EvmMarketDataTopCryptoCurrenciesByMarketCapItem[] { + return json.map((item) => EvmMarketDataTopCryptoCurrenciesByMarketCapItem.fromJSON(item)); + }, + + serializeRequest(request: GetTopCryptoCurrenciesByTradingVolumeOperationRequest): GetTopCryptoCurrenciesByTradingVolumeOperationRequestJSON { + return { + }; + }, + +} diff --git a/packages/common/evmUtils/src/generated/operations/index.ts b/packages/common/evmUtils/src/generated/operations/index.ts index f8e28f1388..018de417ff 100644 --- a/packages/common/evmUtils/src/generated/operations/index.ts +++ b/packages/common/evmUtils/src/generated/operations/index.ts @@ -10,6 +10,8 @@ export * from './GetTopERC20TokensByMarketCapOperation'; export * from './GetTopERC20TokensByPriceMoversOperation'; export * from './GetTopNFTCollectionsByMarketCapOperation'; export * from './GetHottestNFTCollectionsByTradingVolumeOperation'; +export * from './GetTopCryptoCurrenciesByMarketCapOperation'; +export * from './GetTopCryptoCurrenciesByTradingVolumeOperation'; export * from './ReviewContractsOperation'; export * from './GetWalletActiveChainsOperation'; export * from './GetWalletStatsOperation'; diff --git a/packages/common/evmUtils/src/generated/operations/operations.ts b/packages/common/evmUtils/src/generated/operations/operations.ts index fe92c71034..2a6769e742 100644 --- a/packages/common/evmUtils/src/generated/operations/operations.ts +++ b/packages/common/evmUtils/src/generated/operations/operations.ts @@ -10,6 +10,8 @@ import { GetTopERC20TokensByMarketCapOperation } from './GetTopERC20TokensByMark import { GetTopERC20TokensByPriceMoversOperation } from './GetTopERC20TokensByPriceMoversOperation'; import { GetTopNFTCollectionsByMarketCapOperation } from './GetTopNFTCollectionsByMarketCapOperation'; import { GetHottestNFTCollectionsByTradingVolumeOperation } from './GetHottestNFTCollectionsByTradingVolumeOperation'; +import { GetTopCryptoCurrenciesByMarketCapOperation } from './GetTopCryptoCurrenciesByMarketCapOperation'; +import { GetTopCryptoCurrenciesByTradingVolumeOperation } from './GetTopCryptoCurrenciesByTradingVolumeOperation'; import { ReviewContractsOperation } from './ReviewContractsOperation'; import { GetWalletActiveChainsOperation } from './GetWalletActiveChainsOperation'; import { GetWalletStatsOperation } from './GetWalletStatsOperation'; @@ -31,6 +33,8 @@ export const operations = [ GetTopERC20TokensByPriceMoversOperation, GetTopNFTCollectionsByMarketCapOperation, GetHottestNFTCollectionsByTradingVolumeOperation, + GetTopCryptoCurrenciesByMarketCapOperation, + GetTopCryptoCurrenciesByTradingVolumeOperation, ReviewContractsOperation, GetWalletActiveChainsOperation, GetWalletStatsOperation, diff --git a/packages/common/evmUtils/src/generated/types/EvmMarketDataTopCryptoCurrenciesByMarketCapItem.ts b/packages/common/evmUtils/src/generated/types/EvmMarketDataTopCryptoCurrenciesByMarketCapItem.ts new file mode 100644 index 0000000000..babb66c086 --- /dev/null +++ b/packages/common/evmUtils/src/generated/types/EvmMarketDataTopCryptoCurrenciesByMarketCapItem.ts @@ -0,0 +1,223 @@ +// $ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items +// type: marketDataTopCryptoCurrenciesByMarketCap_Item +// properties: +// - symbol ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/symbol) +// - name ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/name) +// - logo ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/logo) +// - circulating_supply ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/circulating_supply) +// - total_supply ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/total_supply) +// - max_supply ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/max_supply) +// - market_cap_usd ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/market_cap_usd) +// - market_cap_rank ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/market_cap_rank) +// - market_cap_24h_change ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/market_cap_24h_change) +// - market_cap_24h_percent_change ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/market_cap_24h_percent_change) +// - total_volume ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/total_volume) +// - price_usd ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/price_usd) +// - usd_price_24h_high ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/usd_price_24h_high) +// - usd_price_24h_low ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/usd_price_24h_low) +// - usd_price_24h_change ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/usd_price_24h_change) +// - usd_price_24h_percent_change ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/usd_price_24h_percent_change) +// - usd_price_ath ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/usd_price_ath) +// - ath_percent_change ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/ath_percent_change) +// - ath_date ($ref: #/components/schemas/marketDataTopCryptoCurrenciesByMarketCap/items/properties/ath_date) + +export interface EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON { + readonly symbol: string; + readonly name: string; + readonly logo: string; + readonly circulating_supply: string; + readonly total_supply: string; + readonly max_supply: string; + readonly market_cap_usd: string; + readonly market_cap_rank: string; + readonly market_cap_24h_change: string; + readonly market_cap_24h_percent_change: string; + readonly total_volume: string; + readonly price_usd: string; + readonly usd_price_24h_high: string; + readonly usd_price_24h_low: string; + readonly usd_price_24h_change: string; + readonly usd_price_24h_percent_change: string; + readonly usd_price_ath: string; + readonly ath_percent_change: string; + readonly ath_date: string; +} + +export interface EvmMarketDataTopCryptoCurrenciesByMarketCapItemInput { + readonly symbol: string; + readonly name: string; + readonly logo: string; + readonly circulatingSupply: string; + readonly totalSupply: string; + readonly maxSupply: string; + readonly marketCapUsd: string; + readonly marketCapRank: string; + readonly marketCap24hChange: string; + readonly marketCap24hPercentChange: string; + readonly totalVolume: string; + readonly priceUsd: string; + readonly usdPrice24hHigh: string; + readonly usdPrice24hLow: string; + readonly usdPrice24hChange: string; + readonly usdPrice24hPercentChange: string; + readonly usdPriceAth: string; + readonly athPercentChange: string; + readonly athDate: string; +} + +export class EvmMarketDataTopCryptoCurrenciesByMarketCapItem { + public static create(input: EvmMarketDataTopCryptoCurrenciesByMarketCapItemInput | EvmMarketDataTopCryptoCurrenciesByMarketCapItem): EvmMarketDataTopCryptoCurrenciesByMarketCapItem { + if (input instanceof EvmMarketDataTopCryptoCurrenciesByMarketCapItem) { + return input; + } + return new EvmMarketDataTopCryptoCurrenciesByMarketCapItem(input); + } + + public static fromJSON(json: EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON): EvmMarketDataTopCryptoCurrenciesByMarketCapItem { + const input: EvmMarketDataTopCryptoCurrenciesByMarketCapItemInput = { + symbol: json.symbol, + name: json.name, + logo: json.logo, + circulatingSupply: json.circulating_supply, + totalSupply: json.total_supply, + maxSupply: json.max_supply, + marketCapUsd: json.market_cap_usd, + marketCapRank: json.market_cap_rank, + marketCap24hChange: json.market_cap_24h_change, + marketCap24hPercentChange: json.market_cap_24h_percent_change, + totalVolume: json.total_volume, + priceUsd: json.price_usd, + usdPrice24hHigh: json.usd_price_24h_high, + usdPrice24hLow: json.usd_price_24h_low, + usdPrice24hChange: json.usd_price_24h_change, + usdPrice24hPercentChange: json.usd_price_24h_percent_change, + usdPriceAth: json.usd_price_ath, + athPercentChange: json.ath_percent_change, + athDate: json.ath_date, + }; + return EvmMarketDataTopCryptoCurrenciesByMarketCapItem.create(input); + } + + /** + * @description The symbol of the token + */ + public readonly symbol: string; + /** + * @description The name of the token + */ + public readonly name: string; + /** + * @description The logo of the token + */ + public readonly logo: string; + /** + * @description The circulating supply + */ + public readonly circulatingSupply: string; + /** + * @description The total supply + */ + public readonly totalSupply: string; + /** + * @description The max supply + */ + public readonly maxSupply: string; + /** + * @description The market cap in USD + */ + public readonly marketCapUsd: string; + /** + * @description The market cap rank + */ + public readonly marketCapRank: string; + /** + * @description The market cap 24h change + */ + public readonly marketCap24hChange: string; + /** + * @description The market cap 24h percent change + */ + public readonly marketCap24hPercentChange: string; + /** + * @description The total volume + */ + public readonly totalVolume: string; + /** + * @description The price in USD + */ + public readonly priceUsd: string; + /** + * @description The price 24h high + */ + public readonly usdPrice24hHigh: string; + /** + * @description The price 24h low + */ + public readonly usdPrice24hLow: string; + /** + * @description The price 24h change + */ + public readonly usdPrice24hChange: string; + /** + * @description The price 24h percent change + */ + public readonly usdPrice24hPercentChange: string; + /** + * @description The price ath + */ + public readonly usdPriceAth: string; + /** + * @description The ath percent change + */ + public readonly athPercentChange: string; + /** + * @description The ath date + */ + public readonly athDate: string; + + private constructor(input: EvmMarketDataTopCryptoCurrenciesByMarketCapItemInput) { + this.symbol = input.symbol; + this.name = input.name; + this.logo = input.logo; + this.circulatingSupply = input.circulatingSupply; + this.totalSupply = input.totalSupply; + this.maxSupply = input.maxSupply; + this.marketCapUsd = input.marketCapUsd; + this.marketCapRank = input.marketCapRank; + this.marketCap24hChange = input.marketCap24hChange; + this.marketCap24hPercentChange = input.marketCap24hPercentChange; + this.totalVolume = input.totalVolume; + this.priceUsd = input.priceUsd; + this.usdPrice24hHigh = input.usdPrice24hHigh; + this.usdPrice24hLow = input.usdPrice24hLow; + this.usdPrice24hChange = input.usdPrice24hChange; + this.usdPrice24hPercentChange = input.usdPrice24hPercentChange; + this.usdPriceAth = input.usdPriceAth; + this.athPercentChange = input.athPercentChange; + this.athDate = input.athDate; + } + + public toJSON(): EvmMarketDataTopCryptoCurrenciesByMarketCapItemJSON { + return { + symbol: this.symbol, + name: this.name, + logo: this.logo, + circulating_supply: this.circulatingSupply, + total_supply: this.totalSupply, + max_supply: this.maxSupply, + market_cap_usd: this.marketCapUsd, + market_cap_rank: this.marketCapRank, + market_cap_24h_change: this.marketCap24hChange, + market_cap_24h_percent_change: this.marketCap24hPercentChange, + total_volume: this.totalVolume, + price_usd: this.priceUsd, + usd_price_24h_high: this.usdPrice24hHigh, + usd_price_24h_low: this.usdPrice24hLow, + usd_price_24h_change: this.usdPrice24hChange, + usd_price_24h_percent_change: this.usdPrice24hPercentChange, + usd_price_ath: this.usdPriceAth, + ath_percent_change: this.athPercentChange, + ath_date: this.athDate, + } + } +} diff --git a/packages/common/evmUtils/src/generated/types/index.ts b/packages/common/evmUtils/src/generated/types/index.ts index 212a45c24d..4cd98ca9dd 100644 --- a/packages/common/evmUtils/src/generated/types/index.ts +++ b/packages/common/evmUtils/src/generated/types/index.ts @@ -17,6 +17,7 @@ export * from './EvmMarketDataERC20TokenItem'; export * from './EvmMarketDataERC20TokensByPriceMovers'; export * from './EvmMarketDataTopNFTCollectionByMarketCapItem'; export * from './EvmMarketDataHottestNFTCollectionByTradingVolumeItem'; +export * from './EvmMarketDataTopCryptoCurrenciesByMarketCapItem'; export * from './EvmReviewContracts'; export * from './EvmContractsReviewDto'; export * from './EvmWalletActiveChains'; diff --git a/packages/evmApi/src/generated/ClientEvmApi.ts b/packages/evmApi/src/generated/ClientEvmApi.ts index 014196d3f2..78f60dad7e 100644 --- a/packages/evmApi/src/generated/ClientEvmApi.ts +++ b/packages/evmApi/src/generated/ClientEvmApi.ts @@ -1,6 +1,6 @@ // CAUTION: This file is automatically generated. Do not edit it manually! -import { getBlockOperation, GetBlockRequest, GetBlockResponseAdapter, getDateToBlockOperation, GetDateToBlockRequest, GetDateToBlockResponseAdapter, GetBlockStatsOperationResponseJSON, GetBlockStatsOperation, GetBlockStatsOperationRequest, GetBlockStatsOperationResponse, getContractEventsOperation, GetContractEventsRequest, GetContractEventsResponseAdapter, getContractLogsOperation, GetContractLogsRequest, GetContractLogsResponseAdapter, getContractNFTsOperation, GetContractNFTsRequest, GetContractNFTsResponseAdapter, getMultipleNFTsOperation, GetMultipleNFTsRequest, GetMultipleNFTsResponseAdapter, getNFTContractMetadataOperation, GetNFTContractMetadataRequest, GetNFTContractMetadataResponseAdapter, getNFTContractTransfersOperation, GetNFTContractTransfersRequest, GetNFTContractTransfersResponseAdapter, getNFTLowestPriceOperation, GetNFTLowestPriceRequest, GetNFTLowestPriceResponseAdapter, getNFTMetadataOperation, GetNFTMetadataRequest, GetNFTMetadataResponseAdapter, getNFTOwnersOperation, GetNFTOwnersRequest, GetNFTOwnersResponseAdapter, getNFTTokenIdOwnersOperation, GetNFTTokenIdOwnersRequest, GetNFTTokenIdOwnersResponseAdapter, getNFTTransfersByBlockOperation, GetNFTTransfersByBlockRequest, GetNFTTransfersByBlockResponseAdapter, getNFTTransfersFromToBlockOperation, GetNFTTransfersFromToBlockRequest, GetNFTTransfersFromToBlockResponseAdapter, getNFTTransfersOperation, GetNFTTransfersRequest, GetNFTTransfersResponseAdapter, getWalletNFTCollectionsOperation, GetWalletNFTCollectionsRequest, GetWalletNFTCollectionsResponseAdapter, getWalletNFTsOperation, GetWalletNFTsRequest, GetWalletNFTsResponseAdapter, getWalletNFTTransfersOperation, GetWalletNFTTransfersRequest, GetWalletNFTTransfersResponseAdapter, reSyncMetadataOperation, ReSyncMetadataRequest, ReSyncMetadataResponseAdapter, syncNFTContractOperation, SyncNFTContractRequest, SyncNFTContractResponseAdapter, GetNFTTradesOperationResponseJSON, GetNFTTradesOperation, GetNFTTradesOperationRequest, GetNFTTradesOperationResponse, GetNFTCollectionStatsOperationResponseJSON, GetNFTCollectionStatsOperation, GetNFTCollectionStatsOperationRequest, GetNFTCollectionStatsOperationResponse, GetNFTTokenStatsOperationResponseJSON, GetNFTTokenStatsOperation, GetNFTTokenStatsOperationRequest, GetNFTTokenStatsOperationResponse, getInternalTransactionsOperation, GetInternalTransactionsRequest, GetInternalTransactionsResponseAdapter, getTransactionOperation, GetTransactionRequest, GetTransactionResponseAdapter, getTransactionVerboseOperation, GetTransactionVerboseRequest, GetTransactionVerboseResponseAdapter, getWalletTransactionsOperation, GetWalletTransactionsRequest, GetWalletTransactionsResponseAdapter, getWalletTransactionsVerboseOperation, GetWalletTransactionsVerboseRequest, GetWalletTransactionsVerboseResponseAdapter, getNativeBalanceOperation, GetNativeBalanceRequest, GetNativeBalanceResponseAdapter, getNativeBalancesForAddressesOperation, GetNativeBalancesForAddressesRequest, GetNativeBalancesForAddressesResponseAdapter, getPairAddressOperation, GetPairAddressRequest, GetPairAddressResponseAdapter, getPairReservesOperation, GetPairReservesRequest, GetPairReservesResponseAdapter, GetPairPriceOperationResponseJSON, GetPairPriceOperation, GetPairPriceOperationRequest, GetPairPriceOperationResponse, getTokenAllowanceOperation, GetTokenAllowanceRequest, GetTokenAllowanceResponseAdapter, getTokenMetadataBySymbolOperation, GetTokenMetadataBySymbolRequest, GetTokenMetadataBySymbolResponseAdapter, getTokenMetadataOperation, GetTokenMetadataRequest, GetTokenMetadataResponseAdapter, getTokenPriceOperation, GetTokenPriceRequest, GetTokenPriceResponseAdapter, getTokenTransfersOperation, GetTokenTransfersRequest, GetTokenTransfersResponseAdapter, getWalletTokenBalancesOperation, GetWalletTokenBalancesRequest, GetWalletTokenBalancesResponseAdapter, getWalletTokenTransfersOperation, GetWalletTokenTransfersRequest, GetWalletTokenTransfersResponseAdapter, GetMultipleTokenPricesOperationResponseJSON, GetMultipleTokenPricesOperation, GetMultipleTokenPricesOperationRequest, GetMultipleTokenPricesOperationBody, GetMultipleTokenPricesOperationResponse, GetTokenStatsOperationResponseJSON, GetTokenStatsOperation, GetTokenStatsOperationRequest, GetTokenStatsOperationResponse, resolveAddressOperation, ResolveAddressRequest, ResolveAddressResponseAdapter, resolveDomainOperation, ResolveDomainRequest, ResolveDomainResponseAdapter, resolveENSDomainOperation, ResolveENSDomainRequest, ResolveENSDomainResponseAdapter, ResolveAddressToDomainOperationResponseJSON, ResolveAddressToDomainOperation, ResolveAddressToDomainOperationRequest, ResolveAddressToDomainOperationResponse, runContractFunctionOperation, RunContractFunctionRequest, RunContractFunctionResponseAdapter, Web3ApiVersionOperationResponseJSON, Web3ApiVersionOperation, Web3ApiVersionOperationResponse, EndpointWeightsOperationResponseJSON, EndpointWeightsOperation, EndpointWeightsOperationResponse, ReviewContractsOperationResponseJSON, ReviewContractsOperation, ReviewContractsOperationRequest, ReviewContractsOperationBody, ReviewContractsOperationResponse, uploadFolderOperation, UploadFolderRequest, UploadFolderResponseAdapter, GetWalletTokenBalancesPriceOperationResponseJSON, GetWalletTokenBalancesPriceOperation, GetWalletTokenBalancesPriceOperationRequest, GetWalletTokenBalancesPriceOperationResponse, GetWalletNetWorthOperationResponseJSON, GetWalletNetWorthOperation, GetWalletNetWorthOperationRequest, GetWalletNetWorthOperationResponse, GetWalletActiveChainsOperationResponseJSON, GetWalletActiveChainsOperation, GetWalletActiveChainsOperationRequest, GetWalletActiveChainsOperationResponse, GetWalletStatsOperationResponseJSON, GetWalletStatsOperation, GetWalletStatsOperationRequest, GetWalletStatsOperationResponse, GetTopERC20TokensByMarketCapOperationResponseJSON, GetTopERC20TokensByMarketCapOperation, GetTopERC20TokensByMarketCapOperationResponse, GetTopERC20TokensByPriceMoversOperationResponseJSON, GetTopERC20TokensByPriceMoversOperation, GetTopERC20TokensByPriceMoversOperationResponse, GetTopNFTCollectionsByMarketCapOperationResponseJSON, GetTopNFTCollectionsByMarketCapOperation, GetTopNFTCollectionsByMarketCapOperationResponse, GetHottestNFTCollectionsByTradingVolumeOperationResponseJSON, GetHottestNFTCollectionsByTradingVolumeOperation, GetHottestNFTCollectionsByTradingVolumeOperationResponse } from '@moralisweb3/common-evm-utils'; +import { getBlockOperation, GetBlockRequest, GetBlockResponseAdapter, getDateToBlockOperation, GetDateToBlockRequest, GetDateToBlockResponseAdapter, GetBlockStatsOperationResponseJSON, GetBlockStatsOperation, GetBlockStatsOperationRequest, GetBlockStatsOperationResponse, getContractEventsOperation, GetContractEventsRequest, GetContractEventsResponseAdapter, getContractLogsOperation, GetContractLogsRequest, GetContractLogsResponseAdapter, getContractNFTsOperation, GetContractNFTsRequest, GetContractNFTsResponseAdapter, getMultipleNFTsOperation, GetMultipleNFTsRequest, GetMultipleNFTsResponseAdapter, getNFTContractMetadataOperation, GetNFTContractMetadataRequest, GetNFTContractMetadataResponseAdapter, getNFTContractTransfersOperation, GetNFTContractTransfersRequest, GetNFTContractTransfersResponseAdapter, getNFTLowestPriceOperation, GetNFTLowestPriceRequest, GetNFTLowestPriceResponseAdapter, getNFTMetadataOperation, GetNFTMetadataRequest, GetNFTMetadataResponseAdapter, getNFTOwnersOperation, GetNFTOwnersRequest, GetNFTOwnersResponseAdapter, getNFTTokenIdOwnersOperation, GetNFTTokenIdOwnersRequest, GetNFTTokenIdOwnersResponseAdapter, getNFTTransfersByBlockOperation, GetNFTTransfersByBlockRequest, GetNFTTransfersByBlockResponseAdapter, getNFTTransfersFromToBlockOperation, GetNFTTransfersFromToBlockRequest, GetNFTTransfersFromToBlockResponseAdapter, getNFTTransfersOperation, GetNFTTransfersRequest, GetNFTTransfersResponseAdapter, getWalletNFTCollectionsOperation, GetWalletNFTCollectionsRequest, GetWalletNFTCollectionsResponseAdapter, getWalletNFTsOperation, GetWalletNFTsRequest, GetWalletNFTsResponseAdapter, getWalletNFTTransfersOperation, GetWalletNFTTransfersRequest, GetWalletNFTTransfersResponseAdapter, reSyncMetadataOperation, ReSyncMetadataRequest, ReSyncMetadataResponseAdapter, syncNFTContractOperation, SyncNFTContractRequest, SyncNFTContractResponseAdapter, GetNFTTradesOperationResponseJSON, GetNFTTradesOperation, GetNFTTradesOperationRequest, GetNFTTradesOperationResponse, GetNFTCollectionStatsOperationResponseJSON, GetNFTCollectionStatsOperation, GetNFTCollectionStatsOperationRequest, GetNFTCollectionStatsOperationResponse, GetNFTTokenStatsOperationResponseJSON, GetNFTTokenStatsOperation, GetNFTTokenStatsOperationRequest, GetNFTTokenStatsOperationResponse, getInternalTransactionsOperation, GetInternalTransactionsRequest, GetInternalTransactionsResponseAdapter, getTransactionOperation, GetTransactionRequest, GetTransactionResponseAdapter, getTransactionVerboseOperation, GetTransactionVerboseRequest, GetTransactionVerboseResponseAdapter, getWalletTransactionsOperation, GetWalletTransactionsRequest, GetWalletTransactionsResponseAdapter, getWalletTransactionsVerboseOperation, GetWalletTransactionsVerboseRequest, GetWalletTransactionsVerboseResponseAdapter, getNativeBalanceOperation, GetNativeBalanceRequest, GetNativeBalanceResponseAdapter, getNativeBalancesForAddressesOperation, GetNativeBalancesForAddressesRequest, GetNativeBalancesForAddressesResponseAdapter, getPairAddressOperation, GetPairAddressRequest, GetPairAddressResponseAdapter, getPairReservesOperation, GetPairReservesRequest, GetPairReservesResponseAdapter, GetPairPriceOperationResponseJSON, GetPairPriceOperation, GetPairPriceOperationRequest, GetPairPriceOperationResponse, getTokenAllowanceOperation, GetTokenAllowanceRequest, GetTokenAllowanceResponseAdapter, getTokenMetadataBySymbolOperation, GetTokenMetadataBySymbolRequest, GetTokenMetadataBySymbolResponseAdapter, getTokenMetadataOperation, GetTokenMetadataRequest, GetTokenMetadataResponseAdapter, getTokenPriceOperation, GetTokenPriceRequest, GetTokenPriceResponseAdapter, getTokenTransfersOperation, GetTokenTransfersRequest, GetTokenTransfersResponseAdapter, getWalletTokenBalancesOperation, GetWalletTokenBalancesRequest, GetWalletTokenBalancesResponseAdapter, getWalletTokenTransfersOperation, GetWalletTokenTransfersRequest, GetWalletTokenTransfersResponseAdapter, GetMultipleTokenPricesOperationResponseJSON, GetMultipleTokenPricesOperation, GetMultipleTokenPricesOperationRequest, GetMultipleTokenPricesOperationBody, GetMultipleTokenPricesOperationResponse, GetTokenStatsOperationResponseJSON, GetTokenStatsOperation, GetTokenStatsOperationRequest, GetTokenStatsOperationResponse, resolveAddressOperation, ResolveAddressRequest, ResolveAddressResponseAdapter, resolveDomainOperation, ResolveDomainRequest, ResolveDomainResponseAdapter, resolveENSDomainOperation, ResolveENSDomainRequest, ResolveENSDomainResponseAdapter, ResolveAddressToDomainOperationResponseJSON, ResolveAddressToDomainOperation, ResolveAddressToDomainOperationRequest, ResolveAddressToDomainOperationResponse, runContractFunctionOperation, RunContractFunctionRequest, RunContractFunctionResponseAdapter, Web3ApiVersionOperationResponseJSON, Web3ApiVersionOperation, Web3ApiVersionOperationResponse, EndpointWeightsOperationResponseJSON, EndpointWeightsOperation, EndpointWeightsOperationResponse, ReviewContractsOperationResponseJSON, ReviewContractsOperation, ReviewContractsOperationRequest, ReviewContractsOperationBody, ReviewContractsOperationResponse, uploadFolderOperation, UploadFolderRequest, UploadFolderResponseAdapter, GetWalletTokenBalancesPriceOperationResponseJSON, GetWalletTokenBalancesPriceOperation, GetWalletTokenBalancesPriceOperationRequest, GetWalletTokenBalancesPriceOperationResponse, GetWalletNetWorthOperationResponseJSON, GetWalletNetWorthOperation, GetWalletNetWorthOperationRequest, GetWalletNetWorthOperationResponse, GetWalletActiveChainsOperationResponseJSON, GetWalletActiveChainsOperation, GetWalletActiveChainsOperationRequest, GetWalletActiveChainsOperationResponse, GetWalletStatsOperationResponseJSON, GetWalletStatsOperation, GetWalletStatsOperationRequest, GetWalletStatsOperationResponse, GetTopERC20TokensByMarketCapOperationResponseJSON, GetTopERC20TokensByMarketCapOperation, GetTopERC20TokensByMarketCapOperationResponse, GetTopERC20TokensByPriceMoversOperationResponseJSON, GetTopERC20TokensByPriceMoversOperation, GetTopERC20TokensByPriceMoversOperationResponse, GetTopNFTCollectionsByMarketCapOperationResponseJSON, GetTopNFTCollectionsByMarketCapOperation, GetTopNFTCollectionsByMarketCapOperationResponse, GetHottestNFTCollectionsByTradingVolumeOperationResponseJSON, GetHottestNFTCollectionsByTradingVolumeOperation, GetHottestNFTCollectionsByTradingVolumeOperationResponse, GetTopCryptoCurrenciesByMarketCapOperationResponseJSON, GetTopCryptoCurrenciesByMarketCapOperation, GetTopCryptoCurrenciesByMarketCapOperationResponse, GetTopCryptoCurrenciesByTradingVolumeOperationResponseJSON, GetTopCryptoCurrenciesByTradingVolumeOperation, GetTopCryptoCurrenciesByTradingVolumeOperationResponse } from '@moralisweb3/common-evm-utils'; import { NullableOperationResolver, OperationResolver, OperationV3Resolver, PaginatedOperationResolver, PaginatedResponseV3Adapter, PaginatedOperationV3Resolver } from '@moralisweb3/api-utils'; import { ApiModule, ResponseAdapter } from '@moralisweb3/common-core'; export abstract class ClientEvmApi extends ApiModule { @@ -230,6 +230,12 @@ export abstract class ClientEvmApi extends ApiModule { getHottestNFTCollectionsByTradingVolume: (): Promise> => { return new OperationV3Resolver(GetHottestNFTCollectionsByTradingVolumeOperation, this.baseUrl, this.core).fetch({}, null); }, + getTopCryptoCurrenciesByMarketCap: (): Promise> => { + return new OperationV3Resolver(GetTopCryptoCurrenciesByMarketCapOperation, this.baseUrl, this.core).fetch({}, null); + }, + getTopCryptoCurrenciesByTradingVolume: (): Promise> => { + return new OperationV3Resolver(GetTopCryptoCurrenciesByTradingVolumeOperation, this.baseUrl, this.core).fetch({}, null); + }, };