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

Feature: View & set ERC20/721/1155 balances #39

Open
jxom opened this issue Sep 5, 2023 · 3 comments
Open

Feature: View & set ERC20/721/1155 balances #39

jxom opened this issue Sep 5, 2023 · 3 comments
Labels
D: Intermediate Difficulty: Intermediate P: High Priority: High T: Feature Type: Feature

Comments

@jxom
Copy link
Member

jxom commented Sep 5, 2023

The Request

The ability to view & set ERC20, ERC721 and ERC1155 tokens & balances.

Problem

Right now, a user cannot view or set their ERC20/721/1155 tokens & balances.

Solution

As a user, I want the ability to drill into my account and view my ERC20/721/1155 tokens. I should be able to:

  • See a list of my ERC20 tokens & balances, as well as the ability to set balances & remove tokens,
  • See a list of my ERC721/1155 tokens & balances, as well as the ability to set balances on my ERC1155 tokens & remove tokens.
@jxom jxom added P: Medium Priority: Medium D: Intermediate Difficulty: Intermediate T: Feature Type: Feature labels Sep 5, 2023
@jxom
Copy link
Member Author

jxom commented Sep 5, 2023

Assigned to @ditto-eth

@jxom jxom added P: High Priority: High and removed P: Medium Priority: Medium labels Sep 6, 2023
@jxom jxom moved this to Backlog in Rivet Roadmap Sep 6, 2023
ditto-eth added a commit to ditto-eth/rivet that referenced this issue Sep 6, 2023
@jxom jxom moved this from Backlog to Working in Rivet Roadmap Sep 8, 2023
jxom added a commit that referenced this issue Sep 13, 2023
* Add Screen for viewing ERC20

* Add ability to set erc balances

* Add ability to set rebasing tokens or tokens that change balanceOf, add comment

* Remove multicall, fix need to reload page

* Check valid address, rename

* Fix button color

* Handle tokens with decimals other than 18

* Fix input if balance changes to 0

* Fix Token page to allow scrolling, allow removing addresses if invalid

* PR review: rename to erc20, split into balance/metadata, use Button.Symbol

* Use diff token store per account

* refactor: ui polish

* lint

---------

Co-authored-by: DittoETH <ditto-eth@users.noreply.github.com>
Co-authored-by: moxey.eth <jakemoxey@gmail.com>
@MimmyJau
Copy link
Contributor

@jxom Hey! I might be interested in tackling this. If I'm not mistaken, importing and setting ERC-20 tokens has already been implemented, so completing this issue will require adding:

  • importing ERC-721 tokens
  • importing and setting ERC-1155 tokens

Clarifications:

  1. Is the idea to let users manually import each token / NFT? Or should all tokens and NFTs automatically-populate (like in Etherscan)? If the latter, might have to discuss the feasibility of a couple different approaches.
  2. For the UI, my thought was to have another tab next to Tokens (see below) titled NFTs, and there would be two input fields: address and tokenId. That section can contain both ERC-721 and ERC-1155, distinguished by a tag next to their names (how Etherscan displays it).

Rivet

image

Etherscan

image

@ditto-eth
Copy link
Contributor

  1. Is the idea to let users manually import each token / NFT? Or should all tokens and NFTs automatically-populate (like in Etherscan)? If the latter, might have to discuss the feasibility of a couple different approaches.
  2. For the UI, my thought was to have another tab next to Tokens (see below) titled NFTs, and there would be two input fields: address and tokenId. That section can contain both ERC-721 and ERC-1155, distinguished by a tag next to their names (how Etherscan displays it).

yo I did the initial implementation. There are issues regarding token imports #56 (sync after fork, already done) and #57 (before fork). Only thought on auto populate is how far back to search and to ignore certain tokens potentially since some accounts are spammed with NFTs (say you import vitalik.eth or the default foundry ones).
For the UI yea there is already a commented out NFT section in the code that is separate. We discussed probably needing to separate the sections but also to separate it in the code, potentially as a separate store to store different metadata from erc20 (also need some code to check if it's an NFT, like checking getApproved, setApprovalForAll, isApprovedForAll, or even the different approve interface from erc20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D: Intermediate Difficulty: Intermediate P: High Priority: High T: Feature Type: Feature
Projects
Status: Working
Development

No branches or pull requests

3 participants