Skip to content

Implement activity #703

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

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

Conversation

jinhojang6
Copy link

@jinhojang6 jinhojang6 commented Jun 4, 2025

Working on the issue: #676 (comment)

  • URL: /page.html#/activity

    • Example: chrome-extension://dbdopckibnkbapjohebcpomaeihajmfm/page.html#/activity
  • Using getAssetTransfers without fromAddress and toAddress:

Screenshot 2025-06-05 at 12 44 28 AM

Limitations

  1. The fromAddress / toAddress fields are not working yet.
    Currently deactivated them : https://github.com/status-im/status-web/pull/703/files#diff-912df96701a30d1254ed13d474cec37142ac015d5785a5517dc23b3d00434207R358-R359

  2. Currently using Ethereum only : https://github.com/status-im/status-web/pull/703/files#diff-7772699e7ca99c68edc57f7f752c4ad62e265c070af0a5739a75b4f5ac2b8672R62-R67

Copy link

changeset-bot bot commented Jun 4, 2025

⚠️ No Changeset found

Latest commit: 9f4564f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jun 4, 2025

@jinhojang6 is attempting to deploy a commit to the Status Team on Vercel.

A member of the Team first needs to authorize it.

@status-im-auto
Copy link
Member

status-im-auto commented Jun 4, 2025

Jenkins Builds

Click to see older builds (3)
Commit #️⃣ Finished (UTC) Duration Platform Result
48ec214 #1 2025-06-04 15:46:57 ~45 sec wallet 📄log
✔️ 8913980 #3 2025-06-06 04:00:28 ~49 sec wallet 📦zip
✔️ a918107 #4 2025-06-06 04:04:58 ~49 sec wallet 📦zip
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 7bfb13e #5 2025-06-10 13:22:07 ~57 sec wallet 📦zip
✔️ 9f4564f #6 2025-06-16 17:09:18 ~53 sec wallet 📦zip

@jinhojang6
Copy link
Author

jinhojang6 commented Jun 6, 2025

Screenshot 2025-06-06 at 12 39 09 PM

Fixed the bug with from/to address : ce6dd8d

We can now filter the transaction history by address

@jinhojang6 jinhojang6 marked this pull request as ready for review June 6, 2025 03:40
@jinhojang6
Copy link
Author

jinhojang6 commented Jun 6, 2025

Supports all networks: 8913980

const networks = searchParams.get('networks')?.split(',') ?? [
    'ethereum',
    'optimism',
    'arbitrum',
    'base',
    'polygon',
    'bsc',
  ]

Some networks don't support the internal category, so I handled it like

const unsupportedCategoriesByNetwork: Partial<Record<NetworkType, string[]>> = {
  bsc: ['internal'],
  arbitrum: ['internal'],
  base: ['internal'],
  optimism: ['internal'],
}

...

const supportedCategories = allCategories.filter(
    category => !unsupportedCategoriesByNetwork[network]?.includes(category),
  )
  
...

const body = await _retry(async () =>
    _fetch<TokenBalanceHistoryResponseBody>(url, 'POST', 3600, {
      jsonrpc: '2.0',
      method: 'alchemy_getAssetTransfers',
      params: [
        {
          category: supportedCategories,

@jinhojang6
Copy link
Author

jinhojang6 commented Jun 6, 2025

Alchemy redirects https://docs.alchemy.com to https://www.alchemy.com, so I updated the comment at
a918107#diff-912df96701a30d1254ed13d474cec37142ac015d5785a5517dc23b3d00434207L349

I didn’t change any other comments outside the scope of my work

@felicio felicio requested review from a team, jkbktl, felicio and marcelines June 9, 2025 13:51
Copy link
Collaborator

@felicio felicio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One step closer again, so thank you!

Could we

?

@jinhojang6 jinhojang6 force-pushed the implement-activity branch from a918107 to 7bfb13e Compare June 10, 2025 13:20
@jinhojang6
Copy link
Author

@felicio I did

But didn't fully understand what you mean. I am testing at chrome-extension://{ID}/page.html#/activity, can you please clarify what you mean by:

all supported transaction types, each shown in detail on the right side like then rebased base would for assets and collectibles routes

@felicio
Copy link
Collaborator

felicio commented Jun 10, 2025

@jinhojang6 thanks!

can you please clarify what you mean by:

In other words, how can we verify that all the transactions types from #676 (comment) are supported?

For example, chrome-extension://{ID}/page.html#/portfolio/assets/ETH shows a specific token similarly to what chrome-extension://pecddckhkmpgehedfobdfkkloaepmhma/page.html#/portfolio/activity/{ID} could? Or do you have other example fromAddress'es showcasing that?

@jinhojang6
Copy link
Author

jinhojang6 commented Jun 10, 2025

We can classify the transfer by using the category field : https://www.alchemy.com/docs/data/transfers-api/transfers-endpoints/alchemy-get-asset-transfers#request.body.category

and can filter specific tokens by using the contractAddresses field: https://www.alchemy.com/docs/data/transfers-api/transfers-endpoints/alchemy-get-asset-transfers#request.body.contractAddresses

I verified that the eth(internal + external), erc 20, erc 721, and erc 1155 all work with the contract address filtering.

Do you mean the team wants separate pages like the following?

  • ETH: chrome-extension://{ID}/page.html#/activity/eth
  • ERC-20: chrome-extension://{ID}/page.html#/activity/erc-20
  • Collectible (ERC-721): chrome-extension://{ID}/page.html#/activity/collectible
  • ERC-1155: chrome-extension://{ID}/page.html#/activity/erc-1155

@felicio

@felicio
Copy link
Collaborator

felicio commented Jun 10, 2025

I verified that the eth(internal + external), erc 20, erc 721, and erc 1155 all work with the contract address filtering.

How should those reviewing this verify that as well 🙂 ?

@jinhojang6
Copy link
Author

jinhojang6 commented Jun 11, 2025

Here: https://github.com/status-im/status-web/pull/703/files#diff-912df96701a30d1254ed13d474cec37142ac015d5785a5517dc23b3d00434207R376

@felicio You can replace supportedCategories with

  • ['external', 'internal'] : ETH
  • ['erc20'] : ERC-20
  • ['erc721'] : Collectibles
  • ['erc1155'] : ERC-1155

and add contractAddresses to verify specific tokens like this example below

params: [
        {
          category: ['erc1155'],
          fromAddress,
          contractAddresses: ['0x9dacaad1535ecccf27e60f719520e64cad208501'],
          excludeZeroValue: true,
          withMetadata: true,
          maxCount: '0x3e8',
        },
        'latest',
],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🚧 In Progress
Development

Successfully merging this pull request may close these issues.

4 participants