blockscout / frontend

Front-end application for Blockscout
https://blockscout.com
GNU General Public License v3.0
160 stars 428 forks source link

Filecoin native addresses #2195

Open fedor-ivn opened 4 weeks ago

fedor-ivn commented 4 weeks ago

After https://github.com/blockscout/blockscout/pull/10468 lands, API endpoints that render address objects will include Filecoin’s native addressing format. Please refer to the PR description for details on the updated API response format.

API

Here are some of the examples of addresses indexed by filecoin.blockscout.com:

I can provide more examples by request.

Requested Customizations

General UI Updates

The Filecoin community prefers native Filecoin addresses over Ethereum 0x-style addresses. For example, use f3uc2czji2lq5v2mii2brulqsf2x7ndbwbewziulvx4y4fgk2cc3t7qrnzef56embyqxsuzfkf2kkauopggcsa (Filecoin native address) instead of 0xfF000000000000000000000000000000003053b4 (0x-style address).

All UI components displaying Ethereum 0x-style addresses should be updated to show the Filecoin native address. This change applies to lists, views, and other relevant components.

Address Details Page

In addition to displaying the Filecoin address instead of the Ethereum address (as mentioned above), the address details page should include the following fields:

Field Name Format Tooltip Implementation Notes
ID Text Short identifier of an address that may change with chain state updates. Consider adding a Copy to clipboard button next to this field.
Actor Tag Identifies the purpose and behavior of the address on the Filecoin network. Map API values to human-readable tags as follows:

- account: Account
- cron: Scheduled Tasks
- datacap: Data Cap Management
- eam: Ethereum Address Manager
- ethaccount: Ethereum-Compatible Account
- evm: Ethereum Virtual Machine
- init: Initialization
- market: Storage Market
- miner: Storage Provider
- multisig: Multi-Signature Wallet
- paych: Payment Channel
- placeholder: Placeholder Address
- power: Power Management
- reward: Incentives and Rewards
- system: System Operations
- verifreg: Verification Registry
Ethereum Address Text 0x-style address to which the Filecoin address is assigned by the Ethereum Address Manager Filecoin’s 0x-style addresses fall into two categories:

1. Real Ethereum Addresses: These start with the f410 prefix and map to actual Ethereum addresses. They have an actor_type of evm.
2. Dummy Addresses: These do not map to real Ethereum addresses, starting with 0xff0000000000000000000000, followed by a hex-encoded Filecoin native ID. They have an actor_type other than evm.

Display Ethereum addresses only for the first category.

Consider adding a Copy to clipboard button next to this field.

Layout Example

Current State:

Current State

Updated Layout:

Updated Layout

isstuev commented 6 days ago

found some additional api endpoints to be updated