Facebook
From Chunky Kitten, 3 Years ago, written in Plain Text.
This paste is a reply to Untitled from Innocent Water Vole - view diff
Embed
Download Paste or View Raw
Hits: 73
  1. case .getTransactions(_, let server, let address, let startBlock, let endBlock, let sortOrder):
  2.             switch server {
  3.             case .main, .kovan, .ropsten, .rinkeby, .goerli:
  4.                 return .requestParameters(parameters: [
  5.                     "module": "account",
  6.                     "action": "txlist",
  7.                     "address": address,
  8.                     "startblock": startBlock,
  9.                     "endblock": endBlock,
  10.                     "sort": sortOrder.rawValue,
  11.                     //"apikey": Constants.Credentials.etherscanKey,
  12.                 ], encoding: URLEncoding())
  13.             case .classic, .callisto, .custom, .poa, .sokol, .xDai, .artis_sigma1, .artis_tau1, .binance_smart_chain, .binance_smart_chain_testnet, .heco, .heco_testnet, .fantom, .fantom_testnet, .avalanche, .avalanche_testnet, .polygon, .mumbai_testnet:
  14.                 return .requestParameters(parameters: [
  15.                     "module": "account",
  16.                     "action": "txlist",
  17.                     "address": address,
  18.                     "startblock": startBlock,
  19.                     "endblock": endBlock,
  20.                     "sort": sortOrder.rawValue,
  21.                 ], encoding: URLEncoding())
  22.             }