Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account activities tab #10

Closed
michele-franchi opened this issue Apr 3, 2023 · 8 comments · Fixed by #428
Closed

Account activities tab #10

michele-franchi opened this issue Apr 3, 2023 · 8 comments · Fixed by #428
Assignees
Labels
enhancement New feature or request

Comments

@michele-franchi
Copy link
Collaborator

michele-franchi commented Apr 3, 2023

Columns:

  • Hash: in some cases we won’t have any tx-hash, e.g. AENS expiration won’t have any tx-hash, the same for Beneficiary reward
  • Date
  • Type
  • Activity
  • Data
Type Activity Data Technical considerations
AE Transferred toReceived fromBeneficiary reward ak_… + Æ amountak_… + Æ amountÆ amount how to deal with SH-DEX activities to avoid duplications?
AENS ClaimedExpiredRevokedReceived fromTransferred to xyz.chainxyz.chainxyz.chainak_… + xyz.chainak_… + xyz.chain  
AEX-9 Token createdTransferred toReceived fromMint receivedBurned TOKEN_SYMBOLak_… + TOKEN_SYMBOL & amountak_… + TOKEN_SYMBOL & amountTOKEN_SYMBOL & amountTOKEN_SYMBOL & amount how to deal with SH-DEX activities to avoid duplications?can we distinguish transfers, mints and burns?
AEX-141 Collection createdTransferred toReceived fromMint receivedBurned COLLECTION_NAMEak_… + COLLECTION_NAME & nft_idak_… + COLLECTION_NAME & nft_idCOLLECTION_NAME & nft_idCOLLECTION_NAME & nft_id can we distinguish transfers, mints and burns?
SH-DEX(to be checked) SwappedAdded liquidityRemoved liquidity TOKEN_SYMBOL & amount ↔︎ TOKEN_SYMBOL & amountTOKEN_SYMBOL & amount +TOKEN_SYMBOL & amount ↔︎ POOL_SYMBOL & amountPOOL_SYMBOL ↔︎ TOKEN_SYMBOL & amount + TOKEN_SYMBOL & amount see AE and AEX-9 comments, avoid duplicated outputmaybe we need to include that in the type “AEX-9” and cannot have it separately in SH-DEX as type
? ? ? ?

Endpoint: GET /v2/accounts/:id/activities

@michele-franchi michele-franchi added the enhancement New feature or request label Apr 3, 2023
@michele-franchi michele-franchi added this to the Improve account details milestone May 26, 2023
@lukeromanowicz lukeromanowicz self-assigned this Jul 27, 2023
@marc0olo
Copy link
Contributor

@lukeromanowicz @michele-franchi I just provide the screenshot here for better readability:

image

@lukeromanowicz
Copy link
Contributor

lukeromanowicz commented Jul 31, 2023

@marc0olo would you be able to provide accounts where the mentioned activities happened? Especially those AEX-9, AEX-141 and SH-DEX are hard to find

Edit: SH-DEX is covered

@lukeromanowicz
Copy link
Contributor

Looks like we need to simplify Contract-related fields due to insufficient information available in mdw. Here is a mdw issue to track:
aeternity/ae_mdw#1497

@lukeromanowicz
Copy link
Contributor

lukeromanowicz commented Aug 4, 2023

Another (non-blocking) related issue that has been reported: aeternity/ae_mdw#1498

@michele-franchi michele-franchi added the waiting for mdw Waiting for middleware release to unlock it label Aug 10, 2023
@davidyuk
Copy link
Member

the same for Beneficiary reward

the block hash may be used instead. Also, consider showing reward transfers to BRI account.

@marc0olo
Copy link
Contributor

the block hash may be used instead

if we do that I would prefer to include the block hash in "data" column 😅

Also, consider showing reward transfers to BRI account.

yes, absolutely! but this is only relevant for one specific account IMO (or in the future for another BRI account in case that changes) @michele-franchi

@lukeromanowicz
Copy link
Contributor

I checked again the state of things and it looks like the issue is mostly unblocked with a few limitations:

  • it's not possible to implement events count for pagination information - Mdw team doesn't plan to implement an endpoint providing that information - Activities Count endpoint ae_mdw#1506
  • it's not possible to tell what ContractCallTxEvent is referring to (aex-n tokens, dex or something else). You can though take a wild guess based on the name of the contract call endpoint e.g. calls to these endpoints are most likely related to superhero dex unless somebody created custom contracts with the same endpoint names
export const SWAP_CONTRACT_CALLS = [
  'swap_exact_tokens_for_tokens',
  'swap_tokens_for_exact_tokens',
  'swap_exact_ae_for_tokens',
  'swap_tokens_for_exact_ae',
  'swap_exact_tokens_for_ae',
  'swap_ae_for_exact_tokens',
]
export const ADD_LIQUIDITY_CONTRACT_CALLS = [
  'add_liquidity',
  'add_liquidity_ae',
]
export const REMOVE_LIQUIDITY_CONTRACT_CALLS = [
  'remove_liquidity',
  'remove_liquidity_ae',
]
  • It's not possible to deduplicate events because it affects pagination capabilities. For instance, you will see:
- [th_aaaaaaaaaaaaaa            Internal Transfer                       (2 AE)]
- [th_aaaaaaaaaaaaaa            Name Claim                mynewname.chain (2 AE)]

Everything else (transfers of AEX-9 and AEX-141) at first glance can now be easily presented to the user as proposed in the designs. The only difference is that we might need to alter the activity name slightly.

@michele-franchi michele-franchi removed the waiting for mdw Waiting for middleware release to unlock it label Sep 7, 2023
@michele-franchi
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants