getPrice static method

Future getPrice(
  1. List<String> tokenAddresses,
  2. List<String> currencies
)

Get token price,

tokenAddresses is a token address list, for native token, pass "native"

currencies is currency array, like "usd", "cny"

Implementation

static Future<dynamic> getPrice(
    List<String> tokenAddresses, List<String> currencies) async {
  const method = "particle_getPrice";
  final params = [tokenAddresses, currencies];
  return await EvmService.rpc(method, params);
}