telosnetwork / teloscan

Telos EVM block explorer for viewing blocks, transactions, contracts, staking, and more
https://teloscan.io
Apache License 2.0
22 stars 25 forks source link

Download Table Data Feature #583

Open pmjanus opened 8 months ago

pmjanus commented 8 months ago

Overview

Allow user to download the data as viewed on the table as a CSV by clicking a button titled Download Table Data on top of the page.

Links

Acceptance Criteria

Clicking the button should cause save file dialog to appear and the user able to download the data visible on the table, formatted as per the example below for tx data and similarly for other tables. On mobile the download will happen as soon as you click the download button, name of the file should follow this convention: export-routename-address.csv

Data export example: Txhash Status Method BlockNo DateTime (UTC) From From_Nametag To To_Nametag Quantity
0x10f736cad87c1701e8764673bc2f1dd8cfeb4985abb1395219e234fa5bc8659c Success Interchain Transfer 19434742 3/14/2024 17:32 0x4d87EF46C102D6470fF3e782A940a320Aa9545aF 0x1bdd9674B0ad54906CAA662CcD4D946Ae37Cd048 500,000

Tasks

pmjanus commented 8 months ago

export-transaction-list-1711620950086 export-0x266c9119dC2dF29CE7fD8F60EcFF80E417Ba596F export-address-token-0x266c9119dC2dF29CE7fD8F60EcFF80E417Ba596F

that's how etherscan does it, first one is directly from transaction table second is from csv export then transactions for an address third one is choosing from csv exports Token Transfers (ERC-20)

I think we should add parameter here for the network, I think we should use the - to separate instead of _ to keep it like etherscan and make scripting the use of these files easier for the user if needed. I am not against adding the parameters used in the export to the file following the base filename, all separated by -