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

EN-9416/new api to get NFT data #2925

Merged
merged 7 commits into from
Mar 24, 2021
Merged

Conversation

sasurobert
Copy link
Contributor

implemented new api to get NFT data

@bogdan-rosianu bogdan-rosianu self-requested a review March 24, 2021 11:58
api/address/routes.go Outdated Show resolved Hide resolved
api/address/routes.go Outdated Show resolved Hide resolved
api/address/routes.go Outdated Show resolved Hide resolved
api/address/routes.go Show resolved Hide resolved
node/node_test.go Outdated Show resolved Hide resolved
api/address/routes.go Show resolved Hide resolved
bogdan-rosianu
bogdan-rosianu previously approved these changes Mar 24, 2021
cmd/node/config/api.toml Outdated Show resolved Hide resolved
Co-authored-by: bogdan-rosianu <51945539+bogdan-rosianu@users.noreply.github.com>
Name string `json:"name"`
Creator string `json:"creator"`
Royalties string `json:"royalties"`
Hash []byte `json:"hash"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Why Hash field is not a string?
Ask this question because everywhere on the API we return hash (hash of a block or hash of a transaction, etc) as string hex-encoded.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in case of address codehash is returned as byte array.

return
}

nonceAsStr := c.Param("nonce")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make a method here getNonceParam where you read the nonce parameter and do the cast?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

would leave as it is.

@@ -34,12 +34,18 @@ var ErrGetESDTTokens = errors.New("get esdt tokens for account error")
// ErrGetESDTBalance signals an error in getting esdt balance for given address
var ErrGetESDTBalance = errors.New("get esdt balance for account error")

// ErrGetESDTNFTData signals an error in getting esdt nft data for given address, tokenID and nonce
var ErrGetESDTNFTData = errors.New("get esdt nft data for account error")
Copy link
Contributor

Choose a reason for hiding this comment

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

can you change please the text of this error? ("cannot get esdt nft data for account" )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

followed all the error messages from this file

@sasurobert sasurobert merged commit 5712e21 into feat/eip-esdt-local-mint Mar 24, 2021
@sasurobert sasurobert deleted the EN-9416/NFT-api branch March 24, 2021 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants