Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for ERC-721 (NFT) Tokens#13

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
GoodforGod merged 4 commits intoGoodforGod:devfromNGuggs:master
Dec 2, 2021
Merged

Add support for ERC-721 (NFT) Tokens#13

GoodforGod merged 4 commits intoGoodforGod:devfromNGuggs:master
Dec 2, 2021

Conversation

@NGuggs
Copy link

I noticed there was currently only support for ERC-20 tokens and that Ertherscan used a different endpoint to get ERC-721 (NFT) Tokens.

Changes

I followed the same paradigm used for the ERC-20 tokens and just duplicated and changed for the new endpoint.

Considerations

With how similar the tokens are in requests, the methods could be combined into a single set with an enum or parameter (or similar in function) that determines which token type your are intending and reduces nearly duplicate code. Though it would take extra work to support backwards compatible upgrades to the new version.

Testing

Manually tested against a random account (0x51b1501420C50aDdA1C4942720bC0e7e8C6D768e) which includes both ERC-20 and ERC-721 tokens.

Still need to add test cases for this. But... was curious how you chose the account for the initial set of test cases. I noticed that account did not have ERC-721 tokens and I would be hesitant to use a random account knowing there could be additional tokens in the future and break the tests.

Let me know your throughts.

@GoodforGod
Copy link
Owner

Hello, Nathan

Thanks for your PR!

Everything looks good! You are correct, only test cases are needed for regression testing of such API. Thats a good question actually, I can't remember like proper strategy I was using at that time, something like "found unused account that barely move assets (probably forgotten) and reinforce tests as mush as possible".

I think such strategy is applicable here also, will be waiting test cases for your changes and they will be ready to go!

@GoodforGodGoodforGod added the enhancementNew feature or request labelNov 29, 2021
@GoodforGodGoodforGod self-assigned thisNov 29, 2021
@GoodforGodGoodforGod added this to thev1.2.0 milestoneNov 29, 2021
@GoodforGodGoodforGod self-requested a reviewNovember 29, 2021 16:14
@GoodforGod
Copy link
Owner

Looks like rate limit wasn't expecting PR and API key is not propagated and API is rate limited, I'll merge and release it in 1.2.0

@GoodforGodGoodforGod changed the base branch frommaster todevDecember 2, 2021 23:10
@GoodforGodGoodforGod merged commit4bb51f6 intoGoodforGod:devDec 2, 2021
@GoodforGod
Copy link
Owner

Thanks for your contribution@NGuggs !

NGuggs reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@GoodforGodGoodforGodGoodforGod approved these changes

Assignees

@GoodforGodGoodforGod

Labels

enhancementNew feature or request

Projects

None yet

Milestone

v1.2.0

Development

Successfully merging this pull request may close these issues.

2 participants

@NGuggs@GoodforGod

[8]ページ先頭

©2009-2025 Movatter.jp